(stack, jit_enabled)
| 95 | |
| 96 | |
| 97 | def _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 | |
| 116 | def _annotate_unwind(): |
no test coverage detected
searching dependent graphs…