]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ctf: decouple CTF building from the kernel build
authorNick Alcock <nick.alcock@oracle.com>
Wed, 19 Jul 2017 14:34:14 +0000 (15:34 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Tue, 19 Sep 2017 08:33:31 +0000 (09:33 +0100)
commit4ba8ec797e702788a322b9a2f2811b6d1ffb3e3a
treeef477bc022ea846277ae350016a8c00e95c0eb00
parent77c57a8ad70e4052a986d3dc76f30de7c3f03393
ctf: decouple CTF building from the kernel build

This change causes CTF types for the core kernel and modules to be
generated only when the new 'ctf' make target is invoked.  The CTF content
is emitted into a CTF archive with the default name of vmlinux.ctfa (the
name read by DTrace userspace): this can be changed via the CTF_FILENAME
makefile variable.  If 'make ctf' has been run, 'make modules_install'
will install the generated CTF archive into the appropriate place. (If
CTF_FILENAME was specified on the 'make ctf' line, it needs to be passed
to 'make modules_install' as well for this to work.)

The existing link-into-modules machinery is still used for out-of-tree
modules, since these obviously cannot be visible when the vmlinux.ctfa
is built.

Usually the ctf target is invoked by kernel-uek.spec, but it can also
be invoked by developers if they know they have changed type or global
variable info while developing and would like DTrace to be able to
introspect the new data, or if they are building a kernel for the
first time and would like DTrace to be able to see its types at all.
(The archive format is fairly robust: you can often just copy
vmlinux.ctfa from one kernel to another, and types that have not
changed will continue to work with the new kernel.)

This depends on new machinery in libdtrace-ctf 0.7 or higher.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
Reviewed-by: Victor Erminpour <victor.erminpour@oracle.com>
Orabug: 25815362
Documentation/Changes
Makefile
scripts/Makefile.modpost
scripts/dwarf2ctf/dedup.blacklist
scripts/dwarf2ctf/dwarf2ctf.c
scripts/kallsyms.c