mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Add opcode utilities and --opcodes CLI flag
New opcode_utils.py maps opcode numbers to names and detects specialized variants using opcode module metadata. Adds normalize_location() and extract_lineno() helpers to collector base for uniform location handling. CLI gains --opcodes flag, validated against compatible formats (gecko, flamegraph, heatmap, live).
This commit is contained in:
parent
dd27e5e679
commit
70f2ae025f
5 changed files with 161 additions and 7 deletions
|
|
@ -14,6 +14,10 @@
|
|||
SORT_MODE_CUMUL_PCT = 4
|
||||
SORT_MODE_NSAMPLES_CUMUL = 5
|
||||
|
||||
# Default location for synthetic frames (native, GC) that have no source location
|
||||
# Format: (lineno, end_lineno, col_offset, end_col_offset)
|
||||
DEFAULT_LOCATION = (0, 0, -1, -1)
|
||||
|
||||
# Thread status flags
|
||||
try:
|
||||
from _remote_debugging import (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue