doc/man: lttng-ust(3): split example files in subsections
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 7 Apr 2016 01:23:41 +0000 (21:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 7 Apr 2016 01:39:25 +0000 (21:39 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
doc/man/lttng-ust.3.txt

index cbf28bb4c8a17790e5a51667823c2e9e5e949483..dda9cec6e55c7fcfcc52384036d8206042005809 100644 (file)
@@ -833,7 +833,20 @@ This example shows all the features documented in the previous
 sections. The <<build-static,static linking>> method is chosen here
 to link the application with the tracepoint provider.
 
-Let's start with the tracepoint provider header file (`tp.h`):
+You can compile the source files and link them together statically
+like this:
+
+[role="term"]
+-------------------------------------
+cc -c -I. tp.c
+cc -c app.c
+cc -o app tp.o app.o -llttng-ust -ldl
+-------------------------------------
+
+
+Tracepoint provider header file
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+`tp.h`:
 
 ------------------------------------------------------------------------
 #undef TRACEPOINT_PROVIDER
@@ -954,7 +967,10 @@ TRACEPOINT_EVENT_INSTANCE(
 #include <lttng/tracepoint-event.h>
 ------------------------------------------------------------------------
 
-The tracepoint provider source file looks like this (`tp.c`):
+
+Tracepoint provider source file
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+`tp.c`:
 
 ------------------------------------------------------------------------
 #define TRACEPOINT_CREATE_PROBES
@@ -963,7 +979,10 @@ The tracepoint provider source file looks like this (`tp.c`):
 #include "tp.h"
 ------------------------------------------------------------------------
 
-The included `app.h`, where the application structure resides, is:
+
+Application header file
+~~~~~~~~~~~~~~~~~~~~~~~
+`app.h`:
 
 ------------------------------------------------------------------------
 #ifndef _APP_H
@@ -978,7 +997,10 @@ struct app_struct {
 #endif /* _APP_H */
 ------------------------------------------------------------------------
 
-Finally, the application itself, `app.c`, using the defined tracepoints:
+
+Application source file
+~~~~~~~~~~~~~~~~~~~~~~~
+`app.c`:
 
 ------------------------------------------------------------------------
 #include <stdlib.h>
@@ -1028,16 +1050,6 @@ int main(int argc, char* argv[])
 }
 ------------------------------------------------------------------------
 
-Here are the steps to compile the source files and link them together
-statically:
-
-[role="term"]
--------------------------------------
-cc -c -I. tp.c
-cc -c app.c
-cc -o app tp.o app.o -llttng-ust -ldl
--------------------------------------
-
 
 ENVIRONMENT VARIABLES
 ---------------------
This page took 0.026486 seconds and 4 git commands to generate.