]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: FBT module support and SPARCs return probes
authorTomas Jedlicka <tomas.jedlicka@oracle.com>
Fri, 7 Apr 2017 20:51:53 +0000 (16:51 -0400)
committerTomas Jedlicka <tomas.jedlicka@oracle.com>
Fri, 14 Jul 2017 09:00:06 +0000 (11:00 +0200)
commitd781a97e9071a105bdac06cb75ab675b993abb51
treea9c880bbc7cb355e324a00158635bd39345f78ce
parent8455be24d76b8af46ea0dac65d9ef07237cbf3aa
dtrace: FBT module support and SPARCs return probes

This fix adds two features to FBT provider:
1) support for modules
2) support for return probes on SPARC

The module support of x86 was almost ready as it does not rely on trampolines and
uses hashtables of tracepoints. This works well if we know amount of probes in
advance so can reserve correct amount of memory during module load time. Unfortunately
that is not possible on SPARC and we need to allocate a trampoline dynamically.

Major part of this code is about removing all static assumptions about FBT from kernel
code and moving the responsibility to dtrace modules. Trampolines for SPARC are now
allocated dynamically (including kernel's pseudo module). This applies to SDT trampolines
too.

Second change adds scan for return probes on SPARC with small heuristics to quickly
skip over cases that are not interesting for DTrace. At the same time this patch
allocates new SPARC Trap for FBT.

Support for .init section is not available on any platform. The .init section is freed
after a module is fully loaded and it is not possible to remove its probes without
further chagnes in DTrace framework (modules). This is deffered for later work.

Orabug: 25960276
Orabug: 26384199

Signed-off-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
13 files changed:
arch/sparc/include/asm/dtrace_arch.h
arch/sparc/include/asm/dtrace_util.h
arch/sparc/include/asm/ttable.h
arch/sparc/kernel/dtrace_fbt.c
arch/sparc/kernel/dtrace_util.c
arch/sparc/kernel/fbt_blacklist.h
arch/sparc/kernel/module.c
arch/sparc/kernel/ttable_64.S
arch/x86/include/asm/dtrace_arch.h
arch/x86/kernel/dtrace_fbt.c
include/linux/dtrace_fbt.h
include/linux/dtrace_os.h
kernel/dtrace/dtrace_os.c