[bootlin/training-materials updates] master: debugging: slides: add more perf probe commands (2cefbad9)

Clément Léger clement.leger at bootlin.com
Tue Nov 22 11:58:11 CET 2022


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

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

commit 2cefbad90a38cb292a9b62a9426a289b8fa48c27
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Tue Nov 22 11:58:11 2022 +0100

    debugging: slides: add more perf probe commands
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


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

2cefbad90a38cb292a9b62a9426a289b8fa48c27
 .../debugging-application-tracing.tex                      | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/slides/debugging-application-tracing/debugging-application-tracing.tex b/slides/debugging-application-tracing/debugging-application-tracing.tex
index 85f2be00..6cc3693b 100644
--- a/slides/debugging-application-tracing/debugging-application-tracing.tex
+++ b/slides/debugging-application-tracing/debugging-application-tracing.tex
@@ -108,13 +108,23 @@ $ LD_PRELOAD=my_lib.so ./exe
 
 \begin{frame}[fragile]
   \frametitle{Probing userspace functions}
+  \begin{itemize}
+    \item List lines number that can be probed in a specific
+          executable/function:
+  \end{itemize}
+  \begin{block}{}
+    \begin{minted}[fontsize=\scriptsize]{C}
+$ perf probe --source=<source_dir> -x my_app -L my_func
+    \end{minted}
+  \end{block}
   \begin{itemize}
     \item Create tracepoints on user-space library/executable functions:
   \end{itemize}
   \begin{block}{}
     \begin{minted}[fontsize=\scriptsize]{C}
 $ perf probe -x /lib/libc.so.6 printf
-$ perf probe -x app my_func
+$ perf probe -x app my_func:3 my_var
+$ perf probe -x app my_func%return ret=%r0
     \end{minted}
   \end{block}
   \begin{itemize}
@@ -122,7 +132,7 @@ $ perf probe -x app my_func
   \end{itemize}
   \begin{block}{}
     \begin{minted}[fontsize=\scriptsize]{C}
-$ perf record -e probe_app:my_func,probe_libc:printf
+$ perf record -e probe_app:my_func -e probe_libc:printf
     \end{minted}
   \end{block}
 \end{frame}




More information about the training-materials-updates mailing list