Commit | Line | Data |
---|---|---|
5fee13fd MD |
1 | LTTng system call tracing |
2 | ||
3 | 1) lttng-syscall-extractor | |
4 | ||
deeaaf53 MD |
5 | You need to build a kernel with CONFIG_FTRACE_SYSCALLS=y and |
6 | CONFIG_KALLSYMS_ALL=y for extraction. Apply the linker patch to get your | |
7 | kernel to keep the system call metadata after boot. Then build and load | |
8 | the LTTng syscall extractor module. The module will fail to load (this | |
9 | is expected). See the dmesg output for system call metadata. | |
5fee13fd MD |
10 | |
11 | 2) Generate system call TRACE_EVENT(). | |
12 | ||
e709527c MJ |
13 | Take the dmesg data and feed it to lttng-syscalls-generate-headers.sh from |
14 | the instrumentation/syscalls directory. See the script header for usage | |
15 | example. It should be run for both the integers and pointers types. | |
5fee13fd | 16 | |
e709527c | 17 | After these are created, you just need to follow the new system call additions, |
5fee13fd | 18 | no need to regenerate the whole thing, since system calls are only appended to. |
94f9e233 MD |
19 | |
20 | 3) Override headers | |
21 | ||
22 | You need to provide override headers (even if they don't contain | |
23 | overrides) for each architecture. Those are meant to contain manual | |
24 | overrides for specific system calls for cases where the script do not | |
25 | generate the correct typing for specific system calls. | |
26 | ||
27 | 4) Integrating the new architecture, updating architecture header | |
28 | ||
29 | Edit instrumentation/syscalls/headers/syscalls_integers.h and | |
30 | syscalls_pointers.h. Add the new architecture | |
31 | (e.g. CONFIG_X86_64) to the newly-generated headers | |
32 | (e.g. changing the current x86-64-syscalls-3.10.0-rc7_<CLASS>.h into | |
33 | x86-64-syscalls-3.13.7_<CLASS>.h), then rebuild lttng-modules. |