Skip to content

Commit 748f29b

Browse files
committed
add frozen check for heap tracker
1 parent 22905de commit 748f29b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ddtrace/profiling/collector/_memalloc_heap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@ memalloc_heap_add_sample_no_cpython(heap_tracker_t* heap_tracker, traceback_t* t
334334
old = memalloc_heap_map_insert(heap_tracker->allocs_m, tb->ptr, tb);
335335
}
336336
} else {
337-
traceback_array_append(&heap_tracker->unreported_samples, tb);
337+
if (!heap_tracker->frozen) {
338+
// TODO: figure out if there is anything to do if we're frozen.
339+
traceback_array_append(&heap_tracker->unreported_samples, tb);
340+
}
338341
}
339342

340343
/* Reset the counter to 0 */

0 commit comments

Comments
 (0)