diff options
-rw-r--r-- | core/stack.c | 10 | ||||
-rw-r--r-- | include/cpu.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/stack.c b/core/stack.c index f7eca1f..2e47cd4 100644 --- a/core/stack.c +++ b/core/stack.c @@ -175,13 +175,12 @@ void __nomcount __mcount_stack_check(uint64_t sp, uint64_t lr) /* Capture lowest stack for this thread */ if (mark < c->stack_bot_mark) { - unsigned int count = CPU_BACKTRACE_SIZE; lock(&stack_check_lock); c->stack_bot_mark = mark; c->stack_bot_pc = lr; c->stack_bot_tok = c->current_token; - __backtrace(c->stack_bot_bt, &count); - c->stack_bot_bt_count = count; + backtrace_create(c->stack_bot_bt, CPU_BACKTRACE_SIZE, + &c->stack_bot_bt_metadata); unlock(&stack_check_lock); } @@ -232,8 +231,9 @@ void check_stacks(void) " pc=%08llx token=%lld\n", lowest->pir, lowest->stack_bot_mark, lowest->stack_bot_pc, lowest->stack_bot_tok); - __print_backtrace(lowest->pir, lowest->stack_bot_bt, - lowest->stack_bot_bt_count, NULL, NULL, true); + backtrace_print(lowest->stack_bot_bt, + &lowest->stack_bot_bt_metadata, + NULL, NULL, true); unlock(&stack_check_lock); } diff --git a/include/cpu.h b/include/cpu.h index 06d5c0d..39071a1 100644 --- a/include/cpu.h +++ b/include/cpu.h @@ -81,7 +81,7 @@ struct cpu_thread { uint64_t stack_bot_tok; #define CPU_BACKTRACE_SIZE 60 struct bt_entry stack_bot_bt[CPU_BACKTRACE_SIZE]; - unsigned int stack_bot_bt_count; + struct bt_metadata stack_bot_bt_metadata; #endif struct lock job_lock; struct list_head job_queue; |