Messages in this thread | | | Date | Thu, 29 Jan 2015 08:48:02 -0500 | From | Steven Rostedt <> | Subject | Re: [RFC][PATCH 0/3] kprobes/ftrace/x86: Function graph trace jprobes |
| |
On Thu, 29 Jan 2015 15:04:44 +0900 Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> wrote:
> Hmm, could you make this more generic? Maybe we can directly call > ftrace_return_to_handler() from longjmp_break_handler().
I tried that, but because the longjump handlers can also be traced (and I still want them to be :-) It makes things even more complicated to get the stacks right. It's best to deal with the stack when you can.
> Actually, current implementation seems just skipping one return > address, however, there may be possible to call jprobe_return() in > the nested functions, like below; > > void test_exit(int flag) > { > if (!flag) > jprobe_return(); > } > int jdo_fork(...) > { > ... > test_exit(something_to_test); > ... > jprobe_return(); > return 0; > } > > I've tested similar code on this series and it crashed kernel. > (I also checked that the above example can work safely without graph tracer) >
Ah yes, I missed this. I have a way to solve this but it's not going to get done before the merge window. Thanks for the test case. I'll use this and more complicated ones for future changes.
Thanks!
-- Steve
| |