File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,10 @@ jl_combined_results g_combined_results; // Will live forever.
5050
5151jl_raw_backtrace_t get_raw_backtrace () JL_NOTSAFEPOINT {
5252 // We first record the backtrace onto a MAX-sized buffer, so that we don't have to
53- // allocate the buffer until we know the size. To ensure thread-safety, we *re-use the
54- // per-thread backtrace buffer*, which is shared with Julia's exception throwing
55- // mechanism. This sharing is safe, because this function cannot be interleaved with
56- // exception throwing.
53+ // allocate the buffer until we know the size. To ensure thread-safety, we use a
54+ // per-thread backtrace buffer.
5755 jl_ptls_t ptls = jl_current_task->ptls ;
58- jl_bt_element_t *shared_bt_data_buffer = ptls->bt_data ;
56+ jl_bt_element_t *shared_bt_data_buffer = ptls->profiling_bt_buffer ;
5957
6058 size_t bt_size = rec_backtrace (shared_bt_data_buffer, JL_MAX_BT_SIZE, 2 );
6159
Original file line number Diff line number Diff line change @@ -246,6 +246,8 @@ typedef struct _jl_tls_states_t {
246246 // Temporary backtrace buffer. Scanned for gc roots when bt_size > 0.
247247 struct _jl_bt_element_t * bt_data ; // JL_MAX_BT_SIZE + 1 elements long
248248 size_t bt_size ; // Size for backtrace in transit in bt_data
249+ // Temporary backtrace buffer used only for allocations profiler.
250+ struct _jl_bt_element_t * profiling_bt_buffer ;
249251 // Atomically set by the sender, reset by the handler.
250252 volatile _Atomic (sig_atomic_t ) signal_request ; // TODO: no actual reason for this to be _Atomic
251253 // Allow the sigint to be raised asynchronously
You can’t perform that action at this time.
0 commit comments