From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
x86-ml <x86@kernel.org>
Subject: [RFC][PATCH 0/2] ftrace/jprobes/x86: Graph trace jprobes if fentry is used
Date: Wed, 14 Jan 2015 23:09:23 -0500 [thread overview]
Message-ID: <20150115040923.755326391@goodmis.org> (raw)
This is built on top of the patches that disable function graph tracer
for jprobes:
https://lkml.org/lkml/2015/1/14/631
This is actually the first solution I had to deal with jprobes and
function graph tracing, but as I thought the problem only happened
when kprobes used the ftrace infrastructure (fentry), I had a bit
more control of what was happening. But testing showed that the
issue also happens when kprobes does not use fentry, but uses the
breakpoint at the start of the function. Dealing with breakpoints
and simulating commands the breakpoint is on and trying to get
all that to work with function graph tracing was a bit too much,
so I punted (sorry for the American Football reference). I just
made a patch set that disabled function graph tracing on jprobes
all together and I'm pushing that to mainline and stable.
That said, in most cases today, people use x86_64 over i386 and have
newer gcc's that support fentry. That means for the majority of
use cases jprobes can still be traced and we do not need to limit
function graph tracing against them. I took my first solution
and placed it on top of the final solution where if fentry is
supported, we do not disable function graph tracing on jprobes
but instead use the added trampoline tricks to cover it.
The first patch allows for tracing of jprobes and the second patch
lets function graph tracing still trace the function that is being
probed.
Steven Rostedt (Red Hat) (2):
ftrace/jprobes/x86: Allow jprobes to be graph traced if using fentry
ftrace/jprobes/x86: Have function being probed be graph traced
----
arch/x86/include/asm/ftrace.h | 4 +++
arch/x86/include/asm/kprobes.h | 9 +++++
arch/x86/kernel/kprobes/core.c | 72 +++++++++++++++++++++++++++++++++++++++-
arch/x86/kernel/kprobes/ftrace.c | 14 ++++++++
arch/x86/kernel/mcount_64.S | 36 +++++++++++++++++++-
5 files changed, 133 insertions(+), 2 deletions(-)
next reply other threads:[~2015-01-15 4:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-15 4:09 Steven Rostedt [this message]
2015-01-15 4:09 ` [RFC][PATCH 1/2] ftrace/jprobes/x86: Allow jprobes to be graph traced if using fentry Steven Rostedt
2015-01-15 4:09 ` [RFC][PATCH 2/2] ftrace/jprobes/x86: Have function being probed be graph traced Steven Rostedt
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150115040923.755326391@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox