diff options
author | Alexander van Heukelum <heukelum@mailshack.com> | 2008-07-10 15:16:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-18 10:21:17 -0400 |
commit | 7dedcee394a3f61475d08002bd12e8068d044216 (patch) | |
tree | 1a6ee77e377416ad66fc57e258feb82f52f2ff98 /arch/x86 | |
parent | 78cbac65fd77242f3e5d77f4d7a71e8bc869fe4d (diff) |
x86: traps_xx: modify x86_64 to use _log_lvl variants
i386 has show_trace_log_lvl and show_stack_log_lvl, allowing
traces to be emitted with log-level annotations. This patch
introduces them to x86_64, but log_lvl is only ever set to
an empty string. Output of traces is unchanged.
i386-chunk is whitespace-only.
Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/traps_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/traps_64.c | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 51cccde376a5..c971dce3847b 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -256,7 +256,7 @@ static const struct stacktrace_ops print_trace_ops = { | |||
256 | 256 | ||
257 | static void | 257 | static void |
258 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, | 258 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, |
259 | unsigned long *stack, unsigned long bp, char *log_lvl) | 259 | unsigned long *stack, unsigned long bp, char *log_lvl) |
260 | { | 260 | { |
261 | dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl); | 261 | dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl); |
262 | printk("%s =======================\n", log_lvl); | 262 | printk("%s =======================\n", log_lvl); |
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index babdbe673b7f..c664e6962009 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -355,17 +355,24 @@ static const struct stacktrace_ops print_trace_ops = { | |||
355 | .address = print_trace_address, | 355 | .address = print_trace_address, |
356 | }; | 356 | }; |
357 | 357 | ||
358 | void show_trace(struct task_struct *task, struct pt_regs *regs, | 358 | static void |
359 | unsigned long *stack, unsigned long bp) | 359 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, |
360 | unsigned long *stack, unsigned long bp, char *log_lvl) | ||
360 | { | 361 | { |
361 | printk("\nCall Trace:\n"); | 362 | printk("\nCall Trace:\n"); |
362 | dump_trace(task, regs, stack, bp, &print_trace_ops, NULL); | 363 | dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl); |
363 | printk("\n"); | 364 | printk("\n"); |
364 | } | 365 | } |
365 | 366 | ||
367 | void show_trace(struct task_struct *task, struct pt_regs *regs, | ||
368 | unsigned long *stack, unsigned long bp) | ||
369 | { | ||
370 | show_trace_log_lvl(task, regs, stack, bp, ""); | ||
371 | } | ||
372 | |||
366 | static void | 373 | static void |
367 | _show_stack(struct task_struct *task, struct pt_regs *regs, | 374 | show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, |
368 | unsigned long *sp, unsigned long bp) | 375 | unsigned long *sp, unsigned long bp, char *log_lvl) |
369 | { | 376 | { |
370 | unsigned long *stack; | 377 | unsigned long *stack; |
371 | int i; | 378 | int i; |
@@ -399,12 +406,12 @@ _show_stack(struct task_struct *task, struct pt_regs *regs, | |||
399 | printk(" %016lx", *stack++); | 406 | printk(" %016lx", *stack++); |
400 | touch_nmi_watchdog(); | 407 | touch_nmi_watchdog(); |
401 | } | 408 | } |
402 | show_trace(task, regs, sp, bp); | 409 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); |
403 | } | 410 | } |
404 | 411 | ||
405 | void show_stack(struct task_struct *task, unsigned long *sp) | 412 | void show_stack(struct task_struct *task, unsigned long *sp) |
406 | { | 413 | { |
407 | _show_stack(task, NULL, sp, 0); | 414 | show_stack_log_lvl(task, NULL, sp, 0, ""); |
408 | } | 415 | } |
409 | 416 | ||
410 | /* | 417 | /* |
@@ -454,7 +461,8 @@ void show_registers(struct pt_regs *regs) | |||
454 | u8 *ip; | 461 | u8 *ip; |
455 | 462 | ||
456 | printk("Stack: "); | 463 | printk("Stack: "); |
457 | _show_stack(NULL, regs, (unsigned long *)sp, regs->bp); | 464 | show_stack_log_lvl(NULL, regs, (unsigned long *)sp, |
465 | regs->bp, ""); | ||
458 | printk("\n"); | 466 | printk("\n"); |
459 | 467 | ||
460 | printk(KERN_EMERG "Code: "); | 468 | printk(KERN_EMERG "Code: "); |