diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2008-04-04 16:52:30 -0400 |
---|---|---|
committer | Masami Hiramatsu <mhiramat@redhat.com> | 2008-04-04 16:52:30 -0400 |
commit | b916df9c10dddd0ae49a9029c8758759a319fb71 (patch) | |
tree | 10c84aebfd992f31d3dbffccbe4b10b81d995e6b /runtime | |
parent | 5eba3ad6104a45c4bc6e1b3b2283f0fb05fbef87 (diff) | |
download | systemtap-steved-b916df9c10dddd0ae49a9029c8758759a319fb71.tar.gz systemtap-steved-b916df9c10dddd0ae49a9029c8758759a319fb71.tar.xz systemtap-steved-b916df9c10dddd0ae49a9029c8758759a319fb71.zip |
2008-04-04 Masami Hiramatsu <mhiramat@redhat.com>
PR 6028
* translate.cxx (c_unparser::emit_common_header): Add unwaddr for
caching unwound address.
* tapsets.cxx (common_probe_entryfn_prologue): Clear unwaddr.
* loc2c-runtime.h (fetch_register): Call ia64_fetch_register with
the address of c->unwaddr.
* regs-ia64.c (ia64_fetch_register): Don't unwind stack if it has
already unwound stack in same probe.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/ChangeLog | 8 | ||||
-rw-r--r-- | runtime/loc2c-runtime.h | 2 | ||||
-rw-r--r-- | runtime/regs-ia64.c | 15 |
3 files changed, 18 insertions, 7 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index e66a048e..7e1b0748 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,11 @@ +2008-04-04 Masami Hiramatsu <mhiramat@redhat.com> + + PR 6028 + * loc2c-runtime.h (fetch_register): Call ia64_fetch_register with + the address of c->unwaddr. + * regs-ia64.c (ia64_fetch_register): Don't unwind stack if it has + already unwound stack in same probe. + 2008-04-01 Frank Ch. Eigler <fche@elastic.org> * lket/*: Belatedly remove retired LKET code. diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h index 7ea1b1e4..66fd1e43 100644 --- a/runtime/loc2c-runtime.h +++ b/runtime/loc2c-runtime.h @@ -129,7 +129,7 @@ #undef fetch_register #undef store_register -#define fetch_register(regno) ia64_fetch_register(regno, c->regs) +#define fetch_register(regno) ia64_fetch_register(regno, c->regs, &c->unwaddr) #define store_register(regno,value) ia64_store_register(regno, c->regs, value) #elif defined __x86_64__ diff --git a/runtime/regs-ia64.c b/runtime/regs-ia64.c index 2a5a1d17..66dc60f3 100644 --- a/runtime/regs-ia64.c +++ b/runtime/regs-ia64.c @@ -35,7 +35,7 @@ static void ia64_stap_get_arbsp(struct unw_frame_info *info, void *arg) lp->address = 0; } -static long ia64_fetch_register(int regno, struct pt_regs *pt_regs) +static long ia64_fetch_register(int regno, struct pt_regs *pt_regs, unsigned long **cache) { struct ia64_stap_get_arbsp_param pa; @@ -47,12 +47,15 @@ static long ia64_fetch_register(int regno, struct pt_regs *pt_regs) else if (regno < 32 || regno > 127) return 0; - pa.ip = pt_regs->cr_iip; - unw_init_running(ia64_stap_get_arbsp, &pa); - if (pa.address == 0) - return 0; + if (!*cache) { + pa.ip = pt_regs->cr_iip; + unw_init_running(ia64_stap_get_arbsp, &pa); + if (pa.address == 0) + return 0; + *cache = pa.address; + } - return *ia64_rse_skip_regs(pa.address, regno-32); + return *ia64_rse_skip_regs(*cache, regno-32); } static void ia64_store_register(int regno, |