Commit | Line | Data |
---|---|---|
53f7d0d7 MJ |
1 | <!-- |
2 | SPDX-FileCopyrightText: 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
3 | ||
4 | SPDX-License-Identifier: CC-BY-4.0 | |
5 | --> | |
6 | ||
641c659a MD |
7 | This is a demo application showing how to trace formatted strings into |
8 | LTTng-UST. | |
9 | ||
10 | The simplest command to trace the demo program are: | |
11 | ||
53f7d0d7 | 12 | ``` |
641c659a MD |
13 | lttng create |
14 | lttng enable-event -u "lttng_ust_tracef:event" | |
15 | lttng start | |
16 | ./demo-tracef | |
17 | lttng stop | |
18 | lttng view | |
19 | lttng destroy | |
53f7d0d7 | 20 | ``` |
641c659a MD |
21 | |
22 | The resulting lttng view output should look like this: | |
23 | ||
53f7d0d7 | 24 | ``` |
641c659a MD |
25 | [07:32:02.021045683] (+?.?????????) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 0 event 42" } |
26 | [07:32:02.021062328] (+0.000016645) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 1 event 42" } | |
27 | [07:32:02.021066300] (+0.000003972) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 2 event 42" } | |
28 | [07:32:02.021069507] (+0.000003207) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 3 event 42" } | |
29 | [07:32:02.021072541] (+0.000003034) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 4 event 42" } | |
53f7d0d7 | 30 | ``` |