mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 10:19:47 -04:00
6f7fcdc89b
The "v4" suffix was a holdover from iterative project restarts. There is now one psxrecomp; all identifiers, include guards, cmake variables, function names, log strings, schema tags, and tool paths drop the v4 suffix. Changes: - PSXRECOMP_V4_ROOT → PSXRECOMP_ROOT (cmake) - PSXRECOMP_V4_RUNTIME_SOURCES/_INCLUDE_DIRS/_BIOS_GENERATED → no V4 - psxrecomp_v4_add_runtime_target → psxrecomp_add_runtime_target - PSXRECOMP_V4_*_H include guards → PSXRECOMP_*_H - "psxrecomp-v4" log/window strings → "psxrecomp" - Schema version strings in recompiler JSON output - Tool script hardcoded absolute paths updated Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
"""Query live thread_trace and see if ChangeTh ping-pong is active now."""
|
|
import sys, json, collections
|
|
sys.path.insert(0, 'F:/Projects/psxrecomp/psxrecomp/tools/_options_session')
|
|
import _dbg
|
|
|
|
try:
|
|
tt = _dbg.call(4470, "thread_trace", count=512, timeout=4)
|
|
if not tt.get('ok'):
|
|
print(f"err: {tt}")
|
|
sys.exit(1)
|
|
es = tt.get('entries', [])
|
|
print(f"thread_trace: {len(es)} entries (total={tt.get('total')}, available={tt.get('available')})")
|
|
if not es:
|
|
print("(empty)")
|
|
sys.exit(0)
|
|
# Last 20
|
|
print(f"Last 20 (newest first):")
|
|
for e in es[:20]:
|
|
print(f" seq={e.get('seq')} fr={e.get('frame')} kind={e.get('kind')} name={e.get('name')} "
|
|
f"cur={e.get('current_tcb')} tgt={e.get('target_tcb')} pc={e.get('target_pc')}")
|
|
|
|
# Pairs of (cur_tcb, target_tcb)
|
|
pairs = collections.Counter((e['current_tcb'], e['target_tcb'], e['name']) for e in es)
|
|
print()
|
|
print("Top transition signatures:")
|
|
for (c,t,n), cnt in pairs.most_common(15):
|
|
print(f" {n}: {c} -> {t}: {cnt}")
|
|
except Exception as e:
|
|
print(f"err: {e}")
|