diff options
author | Tony Lu <zlu@tilera.com> | 2013-08-09 21:08:57 +0200 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-30 17:55:53 +0200 |
commit | 3fa17c395bb0c358745fbe0c8aa039d6cdac1735 (patch) | |
tree | c12f999476581bf31929c4d6a7697efe7062d904 /samples/kprobes/kprobe_example.c | |
parent | tile: support ftrace on tilegx (diff) | |
download | linux-3fa17c395bb0c358745fbe0c8aa039d6cdac1735.tar.xz linux-3fa17c395bb0c358745fbe0c8aa039d6cdac1735.zip |
tile: support kprobes on tilegx
This change includes support for Kprobes, Jprobes and Return Probes.
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Tony Lu <zlu@tilera.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'samples/kprobes/kprobe_example.c')
-rw-r--r-- | samples/kprobes/kprobe_example.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c index ebf5e0c368ea..366db1a9fb65 100644 --- a/samples/kprobes/kprobe_example.c +++ b/samples/kprobes/kprobe_example.c @@ -37,6 +37,11 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs) " status = 0x%lx\n", p->addr, regs->cp0_epc, regs->cp0_status); #endif +#ifdef CONFIG_TILEGX + printk(KERN_INFO "pre_handler: p->addr = 0x%p, pc = 0x%lx," + " ex1 = 0x%lx\n", + p->addr, regs->pc, regs->ex1); +#endif /* A dump_stack() here will give a stack backtrace */ return 0; @@ -58,6 +63,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs, printk(KERN_INFO "post_handler: p->addr = 0x%p, status = 0x%lx\n", p->addr, regs->cp0_status); #endif +#ifdef CONFIG_TILEGX + printk(KERN_INFO "post_handler: p->addr = 0x%p, ex1 = 0x%lx\n", + p->addr, regs->ex1); +#endif } /* |