MCPcopy Index your code
hub / github.com/python/cpython / _classify_stack

Function _classify_stack

Lib/test/test_frame_pointer_unwind.py:97–113  ·  view source on GitHub ↗
(stack, jit_enabled)

Source from the content-addressed store, hash-verified

95
96
97def _classify_stack(stack, jit_enabled):
98 labels = _testinternalcapi.classify_stack_addresses(stack, jit_enabled)
99
100 annotated = []
101 jit_frames = 0
102 python_frames = 0
103 other_frames = 0
104 for idx, (frame, tag) in enumerate(zip(stack, labels)):
105 addr = int(frame)
106 if tag == "jit":
107 jit_frames += 1
108 elif tag == "python":
109 python_frames += 1
110 else:
111 other_frames += 1
112 annotated.append((idx, addr, tag))
113 return annotated, python_frames, jit_frames, other_frames
114
115
116def _annotate_unwind():

Callers 1

_annotate_unwindFunction · 0.85

Calls 2

enumerateFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…