[bootlin/training-materials updates] master: debugging: slides: add information on LTTng files (2c60d431)

Clément Léger clement.leger at bootlin.com
Thu Nov 24 12:16:03 CET 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/2c60d431c75a96e3e30a20664c2cd047c4abebea

>---------------------------------------------------------------

commit 2c60d431c75a96e3e30a20664c2cd047c4abebea
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Thu Nov 24 12:16:03 2022 +0100

    debugging: slides: add information on LTTng files
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


>---------------------------------------------------------------

2c60d431c75a96e3e30a20664c2cd047c4abebea
 .../debugging-system-wide-profiling.tex               | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/slides/debugging-system-wide-profiling/debugging-system-wide-profiling.tex b/slides/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
index 2929e81f..f5dc56d5 100644
--- a/slides/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
+++ b/slides/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
@@ -1070,7 +1070,7 @@ Attaching 1 probe...
   \frametitle{Defining a {\em LTTng} tracepoint (1/2)}
 
   \begin{itemize}
-    \item Tracepoint provider header file:
+    \item Tracepoint provider header file (\code{hello_world-tp.h}):
   \end{itemize}
   \begin{block}{}
     \begin{minted}[fontsize=\tiny]{C}
@@ -1093,8 +1093,8 @@ LTTNG_UST_TRACEPOINT_EVENT(
         char *, my_string_arg
     ),
     LTTNG_UST_TP_FIELDS(
-        lttng_ust_field_string(my_string_field, my_string_arg)
         lttng_ust_field_integer(int, my_integer_field, my_integer_arg)
+        lttng_ust_field_string(my_string_field, my_string_arg)
     )
 )
 #endif /* _HELLO_TP_H */
@@ -1107,7 +1107,7 @@ LTTNG_UST_TRACEPOINT_EVENT(
 \begin{frame}[fragile]
   \frametitle{Defining a {\em LTTng} tracepoint (2/2)}
   \begin{itemize}
-    \item Tracepoint provider package:
+    \item Tracepoint provider package (\code{hello_world-tp.c}):
   \end{itemize}
   \begin{block}{}
     \begin{minted}[fontsize=\tiny]{C}
@@ -1119,7 +1119,7 @@ LTTNG_UST_TRACEPOINT_EVENT(
   \end{block}
 
   \begin{itemize}
-    \item Tracepoint usage:
+    \item Tracepoint usage (\code{hello_world.c}):
   \end{itemize}
   \begin{block}{}
     \begin{minted}[fontsize=\tiny]{C}
@@ -1128,12 +1128,19 @@ LTTNG_UST_TRACEPOINT_EVENT(
 
 int main(int argc, char *argv[])
 {
-    lttng_ust_tracepoint(hello_world, my_first_tracepoint, 23,
-                          "hi there!");
+    lttng_ust_tracepoint(hello_world, my_first_tracepoint, 23, "hi there!");
     return 0;
 }
    \end{minted}
   \end{block}
+  \begin{itemize}
+    \item Compilation:
+  \end{itemize}
+  \begin{block}{}
+    \begin{minted}[fontsize=\tiny]{console}
+$ gcc hello_world.c hello_world-tp.c -llttng-ust -o hello_world
+   \end{minted}
+  \end{block}
 \end{frame}
 
 \begin{frame}[fragile]




More information about the training-materials-updates mailing list