]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: implement SDT in kernel modules
authorKris Van Hees <kris.van.hees@oracle.com>
Tue, 17 Dec 2013 23:06:57 +0000 (18:06 -0500)
committerKris Van Hees <kris.van.hees@oracle.com>
Thu, 19 Dec 2013 07:42:09 +0000 (02:42 -0500)
commit259d115c48d715bdf54ecbdbfc9ed31fa12467ee
tree2c53d74639fcb91f8fb41107ee3fb01a0c625e6d
parent2a119d3fe679a47f441b06f037fa8e1db32b9e82
dtrace: implement SDT in kernel modules

Full implementation of SDT probes in kernel modules.

The dtrace_sdt.sh script has been modified to handle both the creation
of the SDT stubs and the SDT info.  It's syntax has therefore changed:

  dtrace_sdt.sh sdtstub <stubfile> <object-file> <object-file>*
or
  dtrace_sdt.sh sdtinfo <infofile> vmlinux.o
or
  dtrace_sdt.sh sdtinfo <infofile> vmlinux.o .tmp_vmlinux1
or
  dtrace_sdt.sh sdtinfo <infofile> <kmod>.o kmod

The first form generates a stub file in assembler to ensure that the
(fake) functions that are called from SDT probe points will not longer
be reported as undefined symbols, and to ensure that when SDT is not
enabled, the probes become calls to a function that simply returns.

The second form creates the initial (dummy) SDT info file for the kernel
linking process, mainly to ensure that its size is known.  The third
form then creates the true SDT info file for the kernel, based on the
kernel object file and the first stage linked kernel image.

The fourth and final form generates SDT info for a kernel module, based
on its initial linked object.

This commit also enables the test probes in the dt_test module.

Orabug: 17851716

Reviewed-by: Jamie Iles <jamie.iles@oracle.com>
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/dt_test_dev.c
dtrace/dt_test_mod.c
dtrace/dtrace_dev.c
dtrace/dtrace_probe.c
dtrace/sdt_dev.c