|
Port intel-pt-events.py and libxed.py from tools/perf/scripts/python/
to standalone modules in tools/perf/python/:
- Refactor intel-pt-events.py into an IntelPTAnalyzer class with full
type annotations to encapsulate trace state and stashed output.
- Configure instruction trace decoding directly via perf.session's
itrace option and context_switch callback.
- Dynamically select 32-bit vs 64-bit disassembly mode in libxed.py
using session.is_64_bit and annotate instructions with source lines
via sample.srccode().
- Rename methods in libxed.py to snake_case (instruction, set_mode,
disassemble_one) and remove Python 2 compatibility code.
Add a shell test (test_intel_pt_events_python.sh) to verify the
standalone script.
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|