Files
ARMSX2/pcsx2/AndroidEEOpHist.h
T
David IsztlandClaude Opus 4.8 2eb9ec659c refactor: move Android frontend to platforms/android on single shared core
Snapshot the refresh-experimental Android app (Gradle + JNI + Android-only
3rdparty) into platforms/android/. Delete its vendored PCSX2 core copy and
relocate the ~24 genuinely Android-specific core additions (Oboe audio, Android
stubs, EGL-Android GL context, NEON SPU2, GSGPUProfile, VU1Fingerprint, Android
HTTP downloader) into the root core, guarded by if(ANDROID) in
pcsx2/CMakeLists.txt and common/CMakeLists.txt.

The superseded arm64 JIT experiment (arm64/mac/* IR-VU backend, split
aVU0/aDMAC/aVTLB/aR5900COP*) is dropped: the root macOS arm64 JIT (127 unique
commits, newer) is the canonical recompiler.

Rewire the Android native build to a thin CMakeLists that sources the root
{common,pcsx2,3rdparty} instead of the deleted vendored copy.

NOT yet compiled against a real NDK -- build validation is CI's job.
See REFACTOR_STATUS.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:29:23 +02:00

30 lines
1.2 KiB
C++

// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include "common/Pcsx2Types.h"
// Gated EE opcode histogram for diagnosing interpreter-fallback hotspots on the mac
// ARM64 backend. Counts how often each opcode runs through the two fallback paths:
// - STEP : block-terminating single-step (intExecuteOneInst) — the expensive one
// - INLINE : in-block interpreter call (recEmitInterpInline)
// Every ~8M recorded fallback ops the EE thread prints "@@ANDROID_EE_OPHIST@@" lines
// listing the hottest primary opcodes + SPECIAL/REGIMM/COP2/MMI sub-ops, then resets.
// EE-thread-only (no atomics). Default 0 = zero overhead; flip to 1 for a diag build.
#ifndef ARMSX2_ANDROID_EE_OPHIST
#define ARMSX2_ANDROID_EE_OPHIST 0
#endif
#if ARMSX2_ANDROID_EE_OPHIST
namespace AndroidEEOpHist
{
// path: 0 = STEP (single-step), 1 = INLINE (in-block interp).
void Record(int path, u32 op);
// Emit-time tally of natively-compiled trap ops (proves the trap codegen engaged).
void NoteTrapCompiled();
}
// Counting thunk emitted by recEmitInterpInline in place of the raw interp handler
// when the histogram is on: records cpuRegs.code on the INLINE path, then dispatches.
void recOphistInlineThunk();
#endif