| 1 | This is a demo application showing how to trace formatted strings into |
| 2 | LTTng-UST. |
| 3 | |
| 4 | The simplest command to trace the demo program are: |
| 5 | |
| 6 | lttng create |
| 7 | lttng enable-event -u "lttng_ust_tracef:event" |
| 8 | lttng start |
| 9 | ./demo-tracef |
| 10 | lttng stop |
| 11 | lttng view |
| 12 | lttng destroy |
| 13 | |
| 14 | The resulting lttng view output should look like this: |
| 15 | |
| 16 | [07:32:02.021045683] (+?.?????????) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 0 event 42" } |
| 17 | [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" } |
| 18 | [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" } |
| 19 | [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" } |
| 20 | [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" } |