diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-07-10 16:39:17 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-07-18 17:47:23 -0400 |
commit | 9020300d0fca87336f84a8d40da9362735eda896 (patch) | |
tree | bc5920a41b3c4e62b2b343eb4f46ec836ded03bf /runtime/regs-ia64.c | |
parent | 6908711142cf34dc1b67d32a68a91998891af764 (diff) | |
download | systemtap-steved-9020300d0fca87336f84a8d40da9362735eda896.tar.gz systemtap-steved-9020300d0fca87336f84a8d40da9362735eda896.tar.xz systemtap-steved-9020300d0fca87336f84a8d40da9362735eda896.zip |
PR442528
Diffstat (limited to 'runtime/regs-ia64.c')
-rw-r--r-- | runtime/regs-ia64.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/runtime/regs-ia64.c b/runtime/regs-ia64.c index 66dc60f3..fd8d8ca8 100644 --- a/runtime/regs-ia64.c +++ b/runtime/regs-ia64.c @@ -35,6 +35,32 @@ static void ia64_stap_get_arbsp(struct unw_frame_info *info, void *arg) lp->address = 0; } +/* + * bspcache: get cached unwound address and + * set a probe local cache of the offset of unwound address. + */ +#define bspcache(cache, regs, pp)\ + if(regs) {\ + static unsigned __offset = 0; /* probe local cache */\ + static const char * __pp = NULL; /* reference probe point */\ + unsigned long *bsp;\ + asm volatile("{ flushrs }\n"); /* flushrs for fixing bsp */\ + bsp = (void*)ia64_getreg(_IA64_REG_AR_BSP);\ + if (__offset == 0) {\ + struct ia64_stap_get_arbsp_param pa;\ + pa.ip = regs->cr_iip;\ + unw_init_running(ia64_stap_get_arbsp, &pa);\ + if (pa.address != 0) {\ + __offset = ia64_rse_num_regs(pa.address, bsp)\ + -(regs->cr_ifs & 127);\ + __pp = (const char *)pp;\ + cache = pa.address;\ + }\ + } else if (pp == __pp)\ + cache = ia64_rse_skip_regs(bsp,\ + -(__offset + (regs->cr_ifs & 127)));\ + } + static long ia64_fetch_register(int regno, struct pt_regs *pt_regs, unsigned long **cache) { struct ia64_stap_get_arbsp_param pa; @@ -89,6 +115,10 @@ static void ia64_store_register(int regno, return; } +#else /* if defined __ia64__ */ + +#define bspcache(cache, regs, pp) do {} while(0) + #endif /* if defined __ia64__ */ |