dumpstack_64.c (dfdc5437bd62dd6a26961e27f26b671374749875) | dumpstack_64.c (7ee991fbc6f947e9b04f29c9c6c1d057d0671a16) |
---|---|
1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 */ 5#include <linux/kallsyms.h> 6#include <linux/kprobes.h> 7#include <linux/uaccess.h> 8#include <linux/utsname.h> --- 95 unchanged lines hidden (view full) --- 104void dump_trace(struct task_struct *task, struct pt_regs *regs, 105 unsigned long *stack, unsigned long bp, 106 const struct stacktrace_ops *ops, void *data) 107{ 108 const unsigned cpu = get_cpu(); 109 unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; 110 unsigned used = 0; 111 struct thread_info *tinfo; | 1/* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2000, 2001, 2002 Andi Kleen, SuSE Labs 4 */ 5#include <linux/kallsyms.h> 6#include <linux/kprobes.h> 7#include <linux/uaccess.h> 8#include <linux/utsname.h> --- 95 unchanged lines hidden (view full) --- 104void dump_trace(struct task_struct *task, struct pt_regs *regs, 105 unsigned long *stack, unsigned long bp, 106 const struct stacktrace_ops *ops, void *data) 107{ 108 const unsigned cpu = get_cpu(); 109 unsigned long *irqstack_end = (unsigned long *)cpu_pda(cpu)->irqstackptr; 110 unsigned used = 0; 111 struct thread_info *tinfo; |
112 int graph = 0; |
|
112 113 if (!task) 114 task = current; 115 116 if (!stack) { 117 unsigned long dummy; 118 stack = &dummy; 119 if (task && task != current) --- 24 unchanged lines hidden (view full) --- 144 estack_end = in_exception_stack(cpu, (unsigned long)stack, 145 &used, &id); 146 147 if (estack_end) { 148 if (ops->stack(data, id) < 0) 149 break; 150 151 bp = print_context_stack(tinfo, stack, bp, ops, | 113 114 if (!task) 115 task = current; 116 117 if (!stack) { 118 unsigned long dummy; 119 stack = &dummy; 120 if (task && task != current) --- 24 unchanged lines hidden (view full) --- 145 estack_end = in_exception_stack(cpu, (unsigned long)stack, 146 &used, &id); 147 148 if (estack_end) { 149 if (ops->stack(data, id) < 0) 150 break; 151 152 bp = print_context_stack(tinfo, stack, bp, ops, |
152 data, estack_end); | 153 data, estack_end, &graph); |
153 ops->stack(data, "<EOE>"); 154 /* 155 * We link to the next stack via the 156 * second-to-last pointer (index -2 to end) in the 157 * exception stack: 158 */ 159 stack = (unsigned long *) estack_end[-2]; 160 continue; 161 } 162 if (irqstack_end) { 163 unsigned long *irqstack; 164 irqstack = irqstack_end - 165 (IRQSTACKSIZE - 64) / sizeof(*irqstack); 166 167 if (stack >= irqstack && stack < irqstack_end) { 168 if (ops->stack(data, "IRQ") < 0) 169 break; 170 bp = print_context_stack(tinfo, stack, bp, | 154 ops->stack(data, "<EOE>"); 155 /* 156 * We link to the next stack via the 157 * second-to-last pointer (index -2 to end) in the 158 * exception stack: 159 */ 160 stack = (unsigned long *) estack_end[-2]; 161 continue; 162 } 163 if (irqstack_end) { 164 unsigned long *irqstack; 165 irqstack = irqstack_end - 166 (IRQSTACKSIZE - 64) / sizeof(*irqstack); 167 168 if (stack >= irqstack && stack < irqstack_end) { 169 if (ops->stack(data, "IRQ") < 0) 170 break; 171 bp = print_context_stack(tinfo, stack, bp, |
171 ops, data, irqstack_end); | 172 ops, data, irqstack_end, &graph); |
172 /* 173 * We link to the next stack (which would be 174 * the process stack normally) the last 175 * pointer (index -1 to end) in the IRQ stack: 176 */ 177 stack = (unsigned long *) (irqstack_end[-1]); 178 irqstack_end = NULL; 179 ops->stack(data, "EOI"); 180 continue; 181 } 182 } 183 break; 184 } 185 186 /* 187 * This handles the process stack: 188 */ | 173 /* 174 * We link to the next stack (which would be 175 * the process stack normally) the last 176 * pointer (index -1 to end) in the IRQ stack: 177 */ 178 stack = (unsigned long *) (irqstack_end[-1]); 179 irqstack_end = NULL; 180 ops->stack(data, "EOI"); 181 continue; 182 } 183 } 184 break; 185 } 186 187 /* 188 * This handles the process stack: 189 */ |
189 bp = print_context_stack(tinfo, stack, bp, ops, data, NULL); | 190 bp = print_context_stack(tinfo, stack, bp, ops, data, NULL, &graph); |
190 put_cpu(); 191} 192EXPORT_SYMBOL(dump_trace); 193 194void 195show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, 196 unsigned long *sp, unsigned long bp, char *log_lvl) 197{ --- 100 unchanged lines hidden --- | 191 put_cpu(); 192} 193EXPORT_SYMBOL(dump_trace); 194 195void 196show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, 197 unsigned long *sp, unsigned long bp, char *log_lvl) 198{ --- 100 unchanged lines hidden --- |