]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: rework kernel sdtinfo generation to be more accurate
authorKris Van Hees <kris.van.hees@oracle.com>
Tue, 16 Aug 2016 15:52:07 +0000 (11:52 -0400)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 12 Sep 2016 21:23:46 +0000 (22:23 +0100)
commitee48107867e6d7b5d6f9ab276acf619e74eca7d2
tree01d6d40a444d43ee2b4ac699623248a270c9407d
parenta65f50e6b73076ad4518c745a4e518c70746a663
dtrace: rework kernel sdtinfo generation to be more accurate

With changes in the vmlinux.lds.S linker script for x86 in the 4.3 kernel
series, the existing mechanism for determining the addresses of SDT probe
points in the kernel proper was failing.  The assumption that various
flavours of text sections were being concatenated into a single .text
section no longer holds.

The new implementation uses a relocation-retaining linking step in the
vmlinux linking process, which enables us to gain access to the final
addresses of symbols in the .text section, and also makes it very easy
to determine the addresses of SDT probes (.text base address + relocation
offset).  We re-use the .tmp-vmlinux1 output file for the output of this
linking step because it is performed after that output file is no longer
needed in the kernel linking process.

Due to the relocation-retaining linking that occurs, the assertion test
for kernel image size had to be modified, because the _end symbol value
ends up being a relative offset rather than an absolute address.

Orabug: 24655168

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: David Mc Lean <david.mclean@oracle.com>
arch/x86/kernel/vmlinux.lds.S
scripts/dtrace_sdt.sh
scripts/link-vmlinux.sh