Commit | Line | Data |
---|---|---|
5e0cbfb0 PP |
1 | --- |
2 | id: instrumenting-linux-kernel-itself | |
3 | --- | |
4 | ||
5 | This section explains strictly how to add custom LTTng | |
6 | instrumentation to the Linux kernel. It does not explain how the | |
7 | macros actually work and the internal mechanics of the tracer. | |
8 | ||
9 | You should have a Linux kernel source code tree to work with. | |
10 | Throughout this section, all file paths are relative to the root of | |
11 | this tree unless otherwise stated. | |
12 | ||
47bfcb75 | 13 | You need a copy of the LTTng-modules Git repository: |
5e0cbfb0 PP |
14 | |
15 | <pre class="term"> | |
16 | git clone git://git.lttng.org/lttng-modules.git | |
17 | </pre> | |
18 | ||
19 | The steps to add custom LTTng instrumentation to a Linux kernel | |
20 | involves defining and using the mainline `TRACE_EVENT()` tracepoints | |
21 | first, then writing and using the LTTng adaptation layer. |