LKML Archive on
help / color / mirror / Atom feed
From: Steven Rostedt <>
To: Masami Hiramatsu <>
Cc:, Ingo Molnar <>,
	Andrew Morton <>,
	Thomas Gleixner <>,
	"H. Peter Anvin" <>
Subject: Re: [RFC][PATCH 0/3] kprobes/ftrace/x86: Function graph trace jprobes
Date: Thu, 29 Jan 2015 08:48:02 -0500	[thread overview]
Message-ID: <20150129084802.77431788@gandalf.local.home> (raw)
In-Reply-To: <>

On Thu, 29 Jan 2015 15:04:44 +0900
Masami Hiramatsu <> 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.


-- Steve

      reply	other threads:[~2015-01-29 13:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28  4:30 Steven Rostedt
2015-01-28  4:30 ` [RFC][PATCH 1/3] ftrace/jprobes/x86: Allow jprobes to be graph traced if using fentry Steven Rostedt
2015-01-28  4:30 ` [RFC][PATCH 2/3] ftrace/jprobes/x86: Have function being probed be graph traced Steven Rostedt
2015-01-28  4:30 ` [RFC][PATCH 3/3] ftrace: Rename variable from old_hash_ops to old_ops_hash Steven Rostedt
2015-01-29  6:04 ` [RFC][PATCH 0/3] kprobes/ftrace/x86: Function graph trace jprobes Masami Hiramatsu
2015-01-29 13:48   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150129084802.77431788@gandalf.local.home \ \ \ \ \ \ \ \
    --subject='Re: [RFC][PATCH 0/3] kprobes/ftrace/x86: Function graph trace jprobes' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).