lkml.org 
[lkml]   [2015]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[RFC][PATCH 0/2] ftrace/jprobes/x86: Graph trace jprobes if fentry is used
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(-)


\
 
 \ /
  Last update: 2015-01-15 05:41    [W:0.027 / U:1.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site