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