• Home
  • Raw
  • Download

Lines Matching refs:traceback

99     traceback_t *traceback;  member
267 const traceback_t *traceback = (const traceback_t *)key; in hashtable_hash_traceback() local
268 return traceback->hash; in hashtable_hash_traceback()
362 traceback_hash(traceback_t *traceback) in traceback_hash() argument
366 int len = traceback->nframe; in traceback_hash()
371 frame = traceback->frames; in traceback_hash()
381 x ^= traceback->total_nframe; in traceback_hash()
388 traceback_get_frames(traceback_t *traceback) in traceback_get_frames() argument
400 if (traceback->nframe < _Py_tracemalloc_config.max_nframe) { in traceback_get_frames()
401 tracemalloc_get_frame(pyframe, &traceback->frames[traceback->nframe]); in traceback_get_frames()
402 assert(traceback->frames[traceback->nframe].filename != NULL); in traceback_get_frames()
403 traceback->nframe++; in traceback_get_frames()
405 if (traceback->total_nframe < UINT16_MAX) { in traceback_get_frames()
406 traceback->total_nframe++; in traceback_get_frames()
419 traceback_t *traceback; in traceback_new() local
425 traceback = tracemalloc_traceback; in traceback_new()
426 traceback->nframe = 0; in traceback_new()
427 traceback->total_nframe = 0; in traceback_new()
428 traceback_get_frames(traceback); in traceback_new()
429 if (traceback->nframe == 0) in traceback_new()
431 traceback->hash = traceback_hash(traceback); in traceback_new()
434 entry = _Py_hashtable_get_entry(tracemalloc_tracebacks, traceback); in traceback_new()
436 traceback = (traceback_t *)entry->key; in traceback_new()
442 traceback_size = TRACEBACK_SIZE(traceback->nframe); in traceback_new()
451 memcpy(copy, traceback, traceback_size); in traceback_new()
460 traceback = copy; in traceback_new()
462 return traceback; in traceback_new()
526 traceback_t *traceback = traceback_new(); in tracemalloc_add_trace() local
527 if (traceback == NULL) { in tracemalloc_add_trace()
551 trace->traceback = traceback; in tracemalloc_add_trace()
559 trace->traceback = traceback; in tracemalloc_add_trace()
1102 traceback_to_pyobject(traceback_t *traceback, _Py_hashtable_t *intern_table) in traceback_to_pyobject() argument
1107 frames = _Py_hashtable_get(intern_table, (const void *)traceback); in traceback_to_pyobject()
1114 frames = PyTuple_New(traceback->nframe); in traceback_to_pyobject()
1118 for (int i=0; i < traceback->nframe; i++) { in traceback_to_pyobject()
1119 PyObject *frame = frame_to_pyobject(&traceback->frames[i]); in traceback_to_pyobject()
1128 if (_Py_hashtable_set(intern_table, traceback, frames) < 0) { in traceback_to_pyobject()
1165 obj = traceback_to_pyobject(trace->traceback, intern_tracebacks); in trace_to_pyobject()
1172 obj = PyLong_FromUnsignedLong(trace->traceback->total_nframe); in trace_to_pyobject()
1437 return trace->traceback; in tracemalloc_get_traceback()
1461 traceback_t *traceback; in _tracemalloc__get_object_traceback() local
1471 traceback = tracemalloc_get_traceback(DEFAULT_DOMAIN, (uintptr_t)ptr); in _tracemalloc__get_object_traceback()
1472 if (traceback == NULL) in _tracemalloc__get_object_traceback()
1475 return traceback_to_pyobject(traceback, NULL); in _tracemalloc__get_object_traceback()
1496 traceback_t *traceback; in _PyMem_DumpTraceback() local
1505 traceback = tracemalloc_get_traceback(DEFAULT_DOMAIN, (uintptr_t)ptr); in _PyMem_DumpTraceback()
1506 if (traceback == NULL) in _PyMem_DumpTraceback()
1510 for (i=0; i < traceback->nframe; i++) { in _PyMem_DumpTraceback()
1511 _PyMem_DumpFrame(fd, &traceback->frames[i]); in _PyMem_DumpTraceback()
1798 traceback_t *traceback = traceback_new(); in _PyTraceMalloc_NewReference() local
1799 if (traceback != NULL) { in _PyTraceMalloc_NewReference()
1800 trace->traceback = traceback; in _PyTraceMalloc_NewReference()
1814 traceback_t *traceback; in _PyTraceMalloc_GetTraceback() local
1816 traceback = tracemalloc_get_traceback(domain, ptr); in _PyTraceMalloc_GetTraceback()
1817 if (traceback == NULL) in _PyTraceMalloc_GetTraceback()
1820 return traceback_to_pyobject(traceback, NULL); in _PyTraceMalloc_GetTraceback()