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

Function get_frames

Lib/test/test_tracemalloc.py:28–39  ·  view source on GitHub ↗
(nframe, lineno_delta)

Source from the content-addressed store, hash-verified

26
27
28def get_frames(nframe, lineno_delta):
29 frames = []
30 frame = sys._getframe(1)
31 for index in range(nframe):
32 code = frame.f_code
33 lineno = frame.f_lineno + lineno_delta
34 frames.append((code.co_filename, lineno))
35 lineno_delta = 0
36 frame = frame.f_back
37 if frame is None:
38 break
39 return tuple(frames)
40
41def allocate_bytes(size):
42 nframe = tracemalloc.get_traceback_limit()

Callers 3

allocate_bytesFunction · 0.85
test_new_referenceMethod · 0.85
trackMethod · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…