Skip to content

Commit

Permalink
add another record-to-profile-buffer call
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrobinson251 committed Sep 23, 2024
1 parent 78e24a5 commit 481d13b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/stackwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,18 @@ void jl_rec_backtrace(jl_task_t *t) JL_NOTSAFEPOINT
jl_ptls_t ptls = ct->ptls;
ptls->bt_size = 0;
if (t == ct) {
ptls->bt_size = rec_backtrace(ptls->bt_data, JL_MAX_BT_SIZE, 0);
return;
// Record into the profile buffer
if (running && profile_all_tasks) {
bt_size_cur += rec_backtrace(
(jl_bt_element_t*)bt_data_prof + bt_size_cur,
bt_size_max - bt_size_cur - 1,
0);
return;
}
else {
ptls->bt_size = rec_backtrace(ptls->bt_data, JL_MAX_BT_SIZE, 0);
return;
}
}
bt_context_t *context = NULL;
bt_context_t c;
Expand Down

0 comments on commit 481d13b

Please sign in to comment.