]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ctf: generate CTF information for the kernel
authorNick Alcock <nick.alcock@oracle.com>
Fri, 11 May 2012 15:59:13 +0000 (16:59 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 29 Jun 2015 21:40:25 +0000 (22:40 +0100)
commit2543f047921670fa8464ffb7c632ce89027c6e7d
treee8267591333799cfde22b839d8a565b5b4c0299d
parentbab2114faec50ba4d9c7d73210c040cddbe03031
ctf: generate CTF information for the kernel

This introdues a new tool, dwarf2ctf, which runs at modpost time whenever any
module or any part of the core kernel is changed, extracting the debugging
information from the kernel build tree, deduplicating it, and emitting it in
Sun's Compact Type Format into gzipped files in a new .ctf directory.  These
files are then linked into the kernel modules as new sections named .SUNW_ctf.

One file is emitted per kernel module, whether builtin or no, as well as one
file for types that are used by no modules, and one file for types shared
between more than one of the other files.  As the built-in modules and shared
types have no module of their own to go into, they are placed in a new
dtrace_ctf.ko module (which serves no other purpose: loading it is useless).
DTrace userspace will no longer start if this module is not present.

Due to the extensive sharing of types, dwarf2ctf must run whenever any object
files at all are changed, and may trigger relinks of modules that you would not
otherwise think had changed.

Standalone modules also have CTF generated for them, but never share types with
any other modules.

Because dwarf2ctf is slow enough to be annoying when running frequent kernel
builds to debug some unrelated problem, a new CONFIG_DT_DISABLE_CTF debugging
configuraton option is added, which suppresses CTF generation entirely.

This commit introduces new kernel build-time dependencies on elfutils and the
new libdtrace-ctf package (shared with dtrace userspace).  No new runtime
dependencies are introduced.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Documentation/Changes
Makefile
kernel/dtrace/Kconfig
kernel/dtrace/Makefile
kernel/dtrace/dtrace_ctf.c
scripts/Makefile
scripts/Makefile.modpost
scripts/dwarf2ctf/Makefile [new file with mode: 0644]
scripts/dwarf2ctf/dwarf2ctf.c [new file with mode: 0644]
scripts/move-if-change [new file with mode: 0755]