a2a66fa038ae48ce0d43f82a1d1c8701aa06c289
[lttng-modules.git] / instrumentation / syscalls / README
1 LTTng system call tracing
2
3 1) lttng-syscall-extractor
4
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.
10
11 2) Generate system call TRACE_EVENT().
12
13 Take the dmesg metadata and feed it to lttng-syscalls-generate-headers.sh
14 (do not include the ending SUCCESS line), e.g., from the
15 instrumentation/syscalls directory. See the script header for usage example.
16 It should be run for both the integers and pointers types.
17
18 After these are created, we just need to follow the new system call additions,
19 no need to regenerate the whole thing, since system calls are only appended to.
20
21 3) Override headers
22
23 You need to provide override headers (even if they don't contain
24 overrides) for each architecture. Those are meant to contain manual
25 overrides for specific system calls for cases where the script do not
26 generate the correct typing for specific system calls.
27
28 4) Integrating the new architecture, updating architecture header
29
30 Edit instrumentation/syscalls/headers/syscalls_integers.h and
31 syscalls_pointers.h. Add the new architecture
32 (e.g. CONFIG_X86_64) to the newly-generated headers
33 (e.g. changing the current x86-64-syscalls-3.10.0-rc7_<CLASS>.h into
34 x86-64-syscalls-3.13.7_<CLASS>.h), then rebuild lttng-modules.
This page took 0.033352 seconds and 3 git commands to generate.