doc: implement REUSE with SPDX identifiers
[lttng-ust.git] / doc / examples / demo / README.md
CommitLineData
53f7d0d7
MJ
1<!--
2SPDX-FileCopyrightText: 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
3
4SPDX-License-Identifier: CC-BY-4.0
5-->
6
60302adc
JG
7This is a demo application used to test the LTTng userspace tracer.
8
9demo-trace shell script preloads the provider shared objects before
10executing the demo. Executing "demo" without the shell wrapper will not
11provide any tracing support. This ensures the demo binary can be
12distributed on distros without depending on having liblttng-ust.so in
13place. Note: the "demo" program must be compiled with "-ldl" on Linux,
14with "-lc" on BSD.
15
16The simplest command to trace the demo program are:
17lttng create
18lttng enable-event -u -a
19lttng start
20./demo-trace
21lttng destroy
22
23That will create a trace in your $HOME/lttng-traces directory.
24
25The resulting babeltrace output should look like this:
26[554297567999315] ust_tests_demo:starting: { 1 }, { value = 123 }
27[554297568020834] ust_tests_demo2:loop: { 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
28[554297568024780] ust_tests_demo2:loop: { 1 }, { intfield = 1, intfield2 = 0x1, longfield = 1, netintfield = 1, netintfieldhex = 0x1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
29[554297568027050] ust_tests_demo2:loop: { 1 }, { intfield = 2, intfield2 = 0x2, longfield = 2, netintfield = 2, netintfieldhex = 0x2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
30[554297568029014] ust_tests_demo2:loop: { 1 }, { intfield = 3, intfield2 = 0x3, longfield = 3, netintfield = 3, netintfieldhex = 0x3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
31[554297568030861] ust_tests_demo2:loop: { 1 }, { intfield = 4, intfield2 = 0x4, longfield = 4, netintfield = 4, netintfieldhex = 0x4, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2 }
32[554297568033138] ust_tests_demo:done: { 1 }, { value = 456 }
33[554297568034533] ust_tests_demo3:done: { 1 }, { value = 42 }
This page took 0.031098 seconds and 4 git commands to generate.