X-Git-Url: https://git.lttng.org/?p=lttng-ust.git;a=blobdiff_plain;f=doc%2Fexamples%2Fdemo-tracef%2FREADME.md;fp=doc%2Fexamples%2Fdemo-tracef%2FREADME.md;h=bfbefabd2a4002369c111db6bc050cbc5bb8bfe2;hp=0000000000000000000000000000000000000000;hb=53f7d0d7404de911dd62dff06f08539e33ea7519;hpb=1c1968450409b3c159a3000f9e1a968ff1e5f7e8 diff --git a/doc/examples/demo-tracef/README.md b/doc/examples/demo-tracef/README.md new file mode 100644 index 00000000..bfbefabd --- /dev/null +++ b/doc/examples/demo-tracef/README.md @@ -0,0 +1,30 @@ + + +This is a demo application showing how to trace formatted strings into +LTTng-UST. + +The simplest command to trace the demo program are: + +``` +lttng create +lttng enable-event -u "lttng_ust_tracef:event" +lttng start +./demo-tracef +lttng stop +lttng view +lttng destroy +``` + +The resulting lttng view output should look like this: + +``` +[07:32:02.021045683] (+?.?????????) thinkos lttng_ust:tracef: { cpu_id = 2 }, { _msg_length = 46, msg = "This is a "mystring test" formatted 0 event 42" } +[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" } +[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" } +[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" } +[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" } +```