@@ -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);
}
@@ -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;
We're about to get rid of __backtrace() and __print_backtrace(), convert the stack check code to not use them. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> --- Someone wanna review this to make sure I haven't subtly broken it? --- core/stack.c | 10 +++++----- include/cpu.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)