| 1 | This examples shows how to use LTTng-UST in a project that uses |
| 2 | CMake as the build system generator. |
| 3 | |
| 4 | Build the libraries and applications |
| 5 | ===== |
| 6 | |
| 7 | ```bash |
| 8 | mkdir build |
| 9 | cd build |
| 10 | cmake .. |
| 11 | make |
| 12 | ``` |
| 13 | |
| 14 | 3 shared libraries will be generated |
| 15 | |
| 16 | ``` |
| 17 | libaligner-lib.so |
| 18 | libtester-lib.so |
| 19 | libtracepoint-provider.so |
| 20 | ``` |
| 21 | |
| 22 | |
| 23 | and 2 executables will be generated |
| 24 | |
| 25 | ``` |
| 26 | aligner |
| 27 | tester |
| 28 | ``` |
| 29 | |
| 30 | |
| 31 | |
| 32 | Trace the application tester |
| 33 | ============================ |
| 34 | |
| 35 | The script trace.sh can be used. |
| 36 | |
| 37 | ```bash |
| 38 | lttng create |
| 39 | lttng enable-event -u 'gydle_om:*' |
| 40 | lttng start |
| 41 | ./tester |
| 42 | lttng stop |
| 43 | lttng view > trace.txt |
| 44 | cat trace.txt |
| 45 | ``` |
| 46 | |
| 47 | The content of trace.txt should be: |
| 48 | |
| 49 | ``` |
| 50 | [21:45:34.940246019] (+?.?????????) osiris gydle_om:align_query: { cpu_id = 2 }, { query_name = "moleculeX" } |
| 51 | [21:45:34.940263188] (+0.000017169) osiris gydle_om:test_alignment: { cpu_id = 2 }, { alignment = "my-alignment" } |
| 52 | ``` |