diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-04-19 23:39:12 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-04-19 23:39:12 +0200 |
commit | ad4f749fc45d8411b26e4093e9e8353b8971a482 (patch) | |
tree | 37408e3fca91220390db317367c5ce4d08ed1e28 | |
parent | 15bdc138573610dbc40be680480af1d63bd0ae5d (diff) | |
download | systemtap-steved-ad4f749fc45d8411b26e4093e9e8353b8971a482.tar.gz systemtap-steved-ad4f749fc45d8411b26e4093e9e8353b8971a482.tar.xz systemtap-steved-ad4f749fc45d8411b26e4093e9e8353b8971a482.zip |
Pass task to _stp_func_print and _stp_kallsyms_lookup.
* runtime/sym.c (_stp_func_print): Take task, pass to _stp_kallsyms_lookup.
* runtime/stack.c (print_stack_address): Pass NULL.
* runtime/stack-i386.c (_stp_stack_print_fallback): Pass NULL.
(__stp_stack_print): Pass NULL or current.
* runtime/stack-x86_64.c (_stp_stack_print_fallback): Pass NULL.
(__stp_stack_print): Pass current.
-rw-r--r-- | runtime/stack-i386.c | 6 | ||||
-rw-r--r-- | runtime/stack-x86_64.c | 4 | ||||
-rw-r--r-- | runtime/stack.c | 2 | ||||
-rw-r--r-- | runtime/sym.c | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/runtime/stack-i386.c b/runtime/stack-i386.c index 5a18c9d8..a37ddd72 100644 --- a/runtime/stack-i386.c +++ b/runtime/stack-i386.c @@ -23,7 +23,7 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve /* cannot access stack. give up. */ return; } - if (_stp_func_print(addr, verbose, 0)) + if (_stp_func_print(addr, verbose, 0, NULL)) levels--; stack++; } @@ -43,7 +43,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) /* cannot access stack. give up. */ return; } - _stp_func_print(addr, verbose, 1); + _stp_func_print(addr, verbose, 1, NULL); if (unlikely(_stp_read_address(next_fp, (unsigned long *)fp, KERNEL_DS))) { /* cannot access stack. give up. */ return; @@ -64,7 +64,7 @@ static void __stp_stack_print (struct pt_regs *regs, int verbose, int levels) int ret = unwind(&info); dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info)); if (ret == 0) { - _stp_func_print(UNW_PC(&info), verbose, 1); + _stp_func_print(UNW_PC(&info), verbose, 1, current); levels--; continue; } diff --git a/runtime/stack-x86_64.c b/runtime/stack-x86_64.c index 03d88ef0..33928677 100644 --- a/runtime/stack-x86_64.c +++ b/runtime/stack-x86_64.c @@ -19,7 +19,7 @@ static void _stp_stack_print_fallback(unsigned long stack, int verbose, int leve /* cannot access stack. give up. */ return; } - if (_stp_func_print(addr, verbose, 0)) + if (_stp_func_print(addr, verbose, 0, NULL)) levels--; stack++; } @@ -38,7 +38,7 @@ static void __stp_stack_print(struct pt_regs *regs, int verbose, int levels) int ret = unwind(&info); dbug_unwind(1, "ret=%d PC=%lx SP=%lx\n", ret, UNW_PC(&info), UNW_SP(&info)); if (ret == 0) { - _stp_func_print(UNW_PC(&info), verbose, 1); + _stp_func_print(UNW_PC(&info), verbose, 1, current); levels--; continue; } diff --git a/runtime/stack.c b/runtime/stack.c index 68fb9b1f..5dd0cbdc 100644 --- a/runtime/stack.c +++ b/runtime/stack.c @@ -77,7 +77,7 @@ static void print_stack_address(void *data, unsigned long addr, int reliable) { struct print_stack_data *sdata = data; if (sdata->level++ < sdata->max_level) - _stp_func_print(addr,sdata->verbose, 0); + _stp_func_print(addr, sdata->verbose, 0, NULL); } static const struct stacktrace_ops print_stack_ops = { diff --git a/runtime/sym.c b/runtime/sym.c index f6f97ac2..fe9b800c 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -330,7 +330,8 @@ static void _stp_symbol_print(unsigned long address) } /* Like _stp_symbol_print, except only print if the address is a valid function address */ -static int _stp_func_print(unsigned long address, int verbose, int exact) +static int _stp_func_print(unsigned long address, int verbose, int exact, + struct task_struct *task) { const char *modname; const char *name; @@ -342,7 +343,7 @@ static int _stp_func_print(unsigned long address, int verbose, int exact) else exstr = " (inexact)"; - name = _stp_kallsyms_lookup(address, &size, &offset, &modname, NULL, NULL); + name = _stp_kallsyms_lookup(address, &size, &offset, &modname, NULL, task); if (name) { if (verbose) { |