Lines Matching defs:trace
131 /* pointer (void*) => trace (trace_t*).
515 trace_t *trace = _Py_hashtable_steal(traces, TO_PTR(ptr));
516 if (!trace) {
519 assert(tracemalloc_traced_memory >= trace->size);
520 tracemalloc_traced_memory -= trace->size;
521 raw_free(trace);
552 trace_t *trace = _Py_hashtable_get(traces, TO_PTR(ptr));
553 if (trace != NULL) {
555 assert(tracemalloc_traced_memory >= trace->size);
556 tracemalloc_traced_memory -= trace->size;
558 trace->size = size;
559 trace->traceback = traceback;
562 trace = raw_malloc(sizeof(trace_t));
563 if (trace == NULL) {
566 trace->size = size;
567 trace->traceback = traceback;
569 int res = _Py_hashtable_set(traces, TO_PTR(ptr), trace);
571 raw_free(trace);
605 /* Failed to allocate a trace for the new memory block */
630 /* tracemalloc_add_trace() updates the trace if there is already
631 a trace at address ptr2 */
646 Py_FatalError("tracemalloc_realloc() failed to allocate a trace");
655 /* Failed to allocate a trace for the new memory block */
699 allocations larger than 512 bytes, don't trace the same memory
746 allocations larger than 512 bytes. Don't trace the same memory
1142 trace_to_pyobject(unsigned int domain, const trace_t *trace,
1159 obj = PyLong_FromSize_t(trace->size);
1166 obj = traceback_to_pyobject(trace->traceback, intern_tracebacks);
1173 obj = PyLong_FromUnsignedLong(trace->traceback->total_nframe);
1200 trace_t *trace = (trace_t *)value;
1206 *trace2 = *trace;
1282 const trace_t *trace = (const trace_t *)value;
1284 PyObject *tuple = trace_to_pyobject(get_traces->domain, trace,
1426 trace_t *trace;
1430 trace = _Py_hashtable_get(traces, TO_PTR(ptr));
1433 trace = NULL;
1437 if (!trace) {
1441 return trace->traceback;
1456 trace the allocation of the object.
1533 trace to nframe.
1567 Get the maximum number of frames stored in the traceback of a trace.
1569 By default, a trace of an allocated memory block only stores
1598 This memory is used internally to trace memory allocations.
1687 "Debug module to trace memory blocks allocated by Python.");
1772 /* If the object memory block is already traced, update its trace
1799 trace_t *trace = _Py_hashtable_get(tracemalloc_traces, TO_PTR(ptr));
1800 if (trace != NULL) {
1804 trace->traceback = traceback;