From d23b68334f0cdbde09b321691cbe3d2b6e6cec17 Mon Sep 17 00:00:00 2001
From: John Ogness <john.ogness@linutronix.de>
Date: Thu, 28 Mar 2019 10:49:47 +0106
Subject: kernel-tracing: fixup denglish, add perf probe, tracing_on

There were some german and german-like words lingering. Fix these
to proper english.

Show the use of "perf probe" for adding kprobes and uprobes.

Move the tracing_on()/tracing_off() slide next to the trace_printk().
It makes more sense there since we are talking about writing kernel
code for tracing.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
 .../kernel-tracing/pres_kernel-tracing_en.tex      | 55 +++++++++++++++-------
 1 file changed, 38 insertions(+), 17 deletions(-)

(limited to 'kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex')

diff --git a/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex b/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex
index f9ea1ca..88fa3cb 100644
--- a/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex
+++ b/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex
@@ -1,6 +1,6 @@
 \input{configpres}
 
-\title{Kernel-Tracing}
+\title{Kernel Tracing}
 \section{Overview}
 \maketitle
 
@@ -10,7 +10,7 @@
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{Kerneltracing: Overview}
+\frametitle{Kernel Tracing: Overview}
 \begin{itemize}
 \item DebugFS interface
 \item Different tracers: function, function\_graph, wakeup, wakeup\_rt, \dots
@@ -20,7 +20,7 @@
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{Kerneltracing: Overview}
+\frametitle{Kernel Tracing: Overview}
 \begin{figure}[h]
 \centering
 \includegraphics[width=10cm]{images/trace_overview.png}
@@ -28,7 +28,7 @@
 \end{frame}
 
 \begin{frame}[fragile]
-\frametitle{Kernel-Tracing: DebugFS}
+\frametitle{Kernel Tracing: DebugFS}
 \begin{verbatim}
 $ mount -t debugfs debugfs /sys/kernel/debug
 $ cd /sys/kernel/debug/tracing
@@ -278,6 +278,7 @@ schedule     6961  1958965845 us 281420.1 us
 \end{frame}
 
 \section{trace\_marker}
+
 \begin{frame}[fragile]
 \frametitle{Custom application tracepoints: ''simple method''}
 \begin{verbatim}
@@ -305,6 +306,18 @@ $ less trace
 \end{itemize}
 \end{frame}
 
+\begin{frame}[fragile]
+\frametitle{Control a trace from your kernel code}
+\begin{verbatim}
+void my_kernel_function(void)
+{
+     tracing_on();
+     do_some_stuff_i_wanna_trace();
+     tracing_off();
+}
+\end{verbatim}
+\end{frame}
+
 \begin{frame}[fragile]
 \frametitle{Tracing related kernel parameters}
 \begin{verbatim}
@@ -578,19 +591,7 @@ LD_LIBRARY_PATH=/usr/local/lib ./perf data convert --to-ctf ./ctf-data
 \end{figure}
 \end{frame}
 
-\section{Useful things}
-
-\begin{frame}[fragile]
-\frametitle{Control a trace from your kernel code}
-\begin{verbatim}
-void my_kernel_function(void)
-{
-     tracing_on();
-     do_some_stuff_i_wanna_trace();
-     tracing_off();
-}
-\end{verbatim}
-\end{frame}
+\section{Task naming}
 
 \begin{frame}[fragile]
 \frametitle{Matching PIDs and process names of your trace(s)}
@@ -704,6 +705,16 @@ my_mod_event               2               0
 \end{verbatim}
 \end{frame}
 
+\begin{frame}[fragile]
+\frametitle{perf: kprobes}
+The ''perf'' tool can also be used to create kprobes.
+\begin{verbatim}
+$ sudo perf probe --add do_IRQ
+Added new event:
+  probe:do_IRQ (on do_IRQ)
+\end{verbatim}
+\end{frame}
+
 \section{uprobes}
 \begin{frame}[fragile]
 \frametitle{Dynamic Userspace Tracepoints: uprobes}
@@ -769,6 +780,16 @@ $  cat uprobe_profile
 \end{verbatim}
 \end{frame}
 
+\begin{frame}[fragile]
+\frametitle{perf: uprobes}
+The ''perf'' tool can also be used to create uprobes.
+\begin{verbatim}
+$ sudo perf probe -x ./pthread_example my_ev=pthread_example.c:35
+Added new event:
+  probe_pthread_example:my_ev (on @pthread_example.c.c:35 ...)
+\end{verbatim}
+\end{frame}
+
 \section{sources}
 \begin{frame}
 \frametitle{sources}
-- 
cgit v1.2.3

