mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-19 19:07:48 +02:00
The tracer records every basic block the CPU executes and can write the instruction stream out to a file, which is the tool you want when something corrupts state and the question is "what actually ran just before". It was only reachable from Developer Tools in the UI, so a scripted session had no way to turn it on, and reconstructing the same thing from log-only breakpoints means guessing what to watch before you know what happened. Five events: cpu.tracer.start/stop/flush/clear/status. start takes the two buffer sizes and clears the JIT cache by default, because blocks compiled before tracing was on don't carry the LogIRBlock instruction the tracer feeds on - without that a hot loop compiled earlier simply never appears. The trace ring is cyclic, so a finished recording holds the last maxTraceSize blocks: start it, run into a crash, and the tail of the file is the instructions that led there. Only the IR cores drive the tracer, so start refuses on the others and says which core is loaded rather than recording nothing; status reports the same thing as `supported` so a client can tell that apart from "nothing executed". Everything that mutates tracer state goes through Core_RunOnCPUThread, per docs/DebuggerThreading.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
================================================================ NOTE: These are legacy instructions for building using ndk-build. We mostly only use this on CI because it's faster than gradle. There might also be some holdouts around still using eclipse. ================================================================ First, build the C++ static library: > cd android > ./ab.sh Or > ./ab.cmd as appropriate. Start Eclipse, import the android directory as an existing project You need to also load the "native" project into your eclipse workspace Build and run. If you modify the C++ code, you need to rebuild the static library, of course. To get Eclipse to understand that you have in fact changed something if you haven't also changed any Java code, just add a space character to PPSSPPActivity.java, or right click the project and choose Refresh, and then relaunch the app on the device. A real Android device is strongly recommended for testing. Don't trust the emulator.