[bootlin/training-materials updates] master: sysdev: labs: consolidate enabling ltrace, strace and perf at the beginning of appdev/debugging lab (a16e0820)

Luca Ceresoli luca.ceresoli at bootlin.com
Tue Feb 21 10:34:32 CET 2023

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


commit a16e0820cfb52975c6de0712f34626f893872ec8
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date:   Tue Feb 21 10:31:19 2023 +0100

    sysdev: labs: consolidate enabling ltrace, strace and perf at the beginning of appdev/debugging lab
    Building ltrace and strace in the systemd lab is not intuitive, as they are
    not used there. So move it in the appdev/debugging lab, just before using
    them. Also move ahead enabling perf so that only one rebuild is needed
    during this lab.
    Note this does not affect the qemu labs, which have no systemd lab and have
    separate instructions for application development and debugging.
    Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>


 ...ysdev-application-development-and-debugging.tex | 32 +++++++++++++++-------
 .../sysdev-system-integration.tex                  |  5 ----
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex b/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
index 431ffd88..35a1a2f4 100644
--- a/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
+++ b/labs/sysdev-application-development-and-debugging/sysdev-application-development-and-debugging.tex
@@ -78,6 +78,27 @@ Back to target system, try to run the program:
 ERROR: didn't manage to find the Nunchuk device in /dev/input. Is the Nunchuk driver loaded?
+\section{Enable debugging tools}
+In order to debug our application, let's make Buildroot build some
+debugging tools for our root filesystem. This is also an opportunity to
+enable \code{perf}, that we are using later on during this lab. Go back to
+the Buildroot configuration interface and enable the following options:
+\item \code{Kernel}
+  \begin{itemize}
+  \item In \code{Linux Kernel Tools}, select \code{perf}
+  \end{itemize}
+\item \code{Debugging, profiling and benchmark}
+  \begin{itemize}
+  \item Select \code{ltrace}
+  \item Select \code{strace}
+  \end{itemize}
+Then rebuild and update your NFS root filesystem.
 \section{Using strace}
 Let's run the program through the \code{strace} command to find out why
@@ -348,16 +369,7 @@ step.
 \section{Profiling the application with perf}
 Let's make a quick attempt at profiling our application with the
-\code{perf} command.
-So, let's make Buildroot add \code{perf} to our root filesystem.
-Go back to Buildroot's configuration interface and, in the
-\code{Kernel} menu:
-\item In \code{Linux Kernel Tools}, enable \code{perf}
-Once updated the root filesystem, you can run:
+\code{perf} command:
 perf record /root/nunchuk-mpd-client
diff --git a/labs/sysdev-system-integration/sysdev-system-integration.tex b/labs/sysdev-system-integration/sysdev-system-integration.tex
index 582198a2..2557254f 100644
--- a/labs/sysdev-system-integration/sysdev-system-integration.tex
+++ b/labs/sysdev-system-integration/sysdev-system-integration.tex
@@ -83,11 +83,6 @@ Configure Buildroot as follows:
     \item Select \code{mpd-mpc}.
-  \item \code{Debugging, profiling and benchmark}
-    \begin{itemize}
-    \item Select \code{ltrace}
-    \item Select \code{strace}
-    \end{itemize}
   \item \code{Hardware handling}
     \item Select \code{nunchuk driver}

More information about the training-materials-updates mailing list