Skip to content

Commit

Permalink
Update src/gc-alloc-profiler.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Jameson Nash <[email protected]>
  • Loading branch information
NHDaly and vtjnash authored Feb 17, 2022
1 parent 581374d commit e7fe3fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gc-alloc-profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jl_raw_backtrace_t get_raw_backtrace() JL_NOTSAFEPOINT {
// per-thread backtrace buffer.
jl_ptls_t ptls = jl_current_task->ptls;
jl_bt_element_t *shared_bt_data_buffer = ptls->profiling_bt_buffer;
if (shared_bt_data_buffer == NULL)
ptls->profiling_bt_buffer = shared_bt_data_buffer = \
malloc_s(sizeof(jl_bt_element_t) * (JL_MAX_BT_SIZE + 1));

size_t bt_size = rec_backtrace(shared_bt_data_buffer, JL_MAX_BT_SIZE, 2);

Expand Down

0 comments on commit e7fe3fb

Please sign in to comment.