Release 4.10 arch/powerpc/kernel/stacktrace.c
/*
* Stack trace utility
*
* Copyright 2008 Christoph Hellwig, IBM Corp.
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/export.h>
#include <linux/sched.h>
#include <linux/stacktrace.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
/*
* Save stack-backtrace addresses into a stack_trace buffer.
*/
static void save_context_stack(struct stack_trace *trace, unsigned long sp,
struct task_struct *tsk, int savesched)
{
for (;;) {
unsigned long *stack = (unsigned long *) sp;
unsigned long newsp, ip;
if (!validate_sp(sp, tsk, STACK_FRAME_OVERHEAD))
return;
newsp = stack[0];
ip = stack[STACK_FRAME_LR_SAVE];
if (savesched || !in_sched_functions(ip)) {
if (!trace->skip)
trace->entries[trace->nr_entries++] = ip;
else
trace->skip--;
}
if (trace->nr_entries >= trace->max_entries)
return;
sp = newsp;
}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
christoph hellwig | christoph hellwig | 101 | 79.53% | 1 | 50.00% |
arnd bergmann | arnd bergmann | 26 | 20.47% | 1 | 50.00% |
| Total | 127 | 100.00% | 2 | 100.00% |
void save_stack_trace(struct stack_trace *trace)
{
unsigned long sp;
sp = current_stack_pointer();
save_context_stack(trace, sp, current, 1);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
arnd bergmann | arnd bergmann | 25 | 83.33% | 1 | 33.33% |
anton blanchard | anton blanchard | 5 | 16.67% | 2 | 66.67% |
| Total | 30 | 100.00% | 3 | 100.00% |
EXPORT_SYMBOL_GPL(save_stack_trace);
void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{
save_context_stack(trace, tsk->thread.ksp, tsk, 0);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
arnd bergmann | arnd bergmann | 30 | 100.00% | 2 | 100.00% |
| Total | 30 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
void
save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
{
save_context_stack(trace, regs->gpr[1], current, 0);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
steven rostedt | steven rostedt | 31 | 100.00% | 1 | 100.00% |
| Total | 31 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL_GPL(save_stack_trace_regs);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
christoph hellwig | christoph hellwig | 112 | 44.80% | 1 | 14.29% |
arnd bergmann | arnd bergmann | 96 | 38.40% | 2 | 28.57% |
steven rostedt | steven rostedt | 36 | 14.40% | 1 | 14.29% |
anton blanchard | anton blanchard | 5 | 2.00% | 2 | 28.57% |
paul gortmaker | paul gortmaker | 1 | 0.40% | 1 | 14.29% |
| Total | 250 | 100.00% | 7 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.