]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: comtinuing the FBT implementation and fixes
authorKris Van Hees <kris.van.hees@oracle.com>
Fri, 3 Mar 2017 02:02:01 +0000 (21:02 -0500)
committerKris Van Hees <kris.van.hees@oracle.com>
Sat, 4 Mar 2017 01:15:25 +0000 (20:15 -0500)
commit69d3172b5f17f803e6fa5d77d798e0eb79bd920f
tree55f7890220c492a5a9838c3a25cfde08716716b5
parent5af111ce75ea93d40df1333b5e334b13c5f604a2
dtrace: comtinuing the FBT implementation and fixes

This commit continues the implementation of Function Boundary Tracing
(FBT) and fixes various problems with the original implementation and
other things in DTrace that it caused to break.  It is done as a single
commit due to the intertwined nature of the code it touches.

1. The sparc64 fast path implementation (dtrace_caller) for the D 'caller'
   variable was trampling the %g4 register which Linux uses to hold the
   'current' task pointer.  By passing in a dummy argument, we ensure
   that we can use the %i1 register to temporarily store %g4.

2. For consistency, we are now using stacktrace_state_t instead of
   struct stacktrace_state.

3. We now call dtrace_stacktrace() under NOFAULT protection.

4. The ustack stack walker has been rewritten (in the kernel), so the
   previous implementation has been removed.

5. We no longer process probes when the kernel panics, to avoid DTrace
   disrupting output that could be crucial to debugging.

6. We now ensure that re-entry of dtrace_probe() can no longer happen,
   except for the ERROR probe (which is by a re-entry by design).

7. Since FBT now works, the restriction to only support SyS_* functions
   has been removed.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Signed-off-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
Orabug: 21220305
Orabug: 24829326
dtrace/dtrace_asm_sparc64.S
dtrace/dtrace_dif.c
dtrace/dtrace_isa.c
dtrace/dtrace_probe.c
dtrace/fbt_dev.c
dtrace/include/dtrace/dtrace_impl.h