-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ingo Molnar
authored and
Linus Torvalds
committed
Jul 3, 2006
1 parent
fe4cac8
commit 5fd10ae
Showing
5 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: f0a5c315eb266edc608a29971bb4ff1a3025c58f | ||
refs/heads/master: 8637c09901049f061b94f684915d4f18ecf91d79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef __LINUX_STACKTRACE_H | ||
#define __LINUX_STACKTRACE_H | ||
|
||
#ifdef CONFIG_STACKTRACE | ||
struct stack_trace { | ||
unsigned int nr_entries, max_entries; | ||
unsigned long *entries; | ||
}; | ||
|
||
extern void save_stack_trace(struct stack_trace *trace, | ||
struct task_struct *task, int all_contexts, | ||
unsigned int skip); | ||
|
||
extern void print_stack_trace(struct stack_trace *trace, int spaces); | ||
#else | ||
# define save_stack_trace(trace, task, all, skip) do { } while (0) | ||
# define print_stack_trace(trace) do { } while (0) | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* kernel/stacktrace.c | ||
* | ||
* Stack trace management functions | ||
* | ||
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | ||
*/ | ||
#include <linux/sched.h> | ||
#include <linux/kallsyms.h> | ||
#include <linux/stacktrace.h> | ||
|
||
void print_stack_trace(struct stack_trace *trace, int spaces) | ||
{ | ||
int i, j; | ||
|
||
for (i = 0; i < trace->nr_entries; i++) { | ||
unsigned long ip = trace->entries[i]; | ||
|
||
for (j = 0; j < spaces + 1; j++) | ||
printk(" "); | ||
print_ip_sym(ip); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters