[bootlin/training-materials updates] master: debugging: labs: use vmlinux from kernel build dir (4fdd6fb5)

Clément Léger clement.leger at bootlin.com
Mon Nov 28 10:58:10 CET 2022


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

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

commit 4fdd6fb51b4fc6fe1a80511037d203284e2b904d
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Mon Nov 28 10:58:10 2022 +0100

    debugging: labs: use vmlinux from kernel build dir
    
    Since we build the buildroot completely during the labs, use the vmlinux
    original file rather than the copy that was created in /root.
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


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

4fdd6fb51b4fc6fe1a80511037d203284e2b904d
 .../debugging-application-profiling.tex                              | 4 ++--
 labs/debugging-kernel-debugging/debugging-kernel-debugging.tex       | 5 +++--
 .../debugging-system-wide-profiling.tex                              | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/labs/debugging-application-profiling/debugging-application-profiling.tex b/labs/debugging-application-profiling/debugging-application-profiling.tex
index 89f729b8..e0ed516f 100644
--- a/labs/debugging-application-profiling/debugging-application-profiling.tex
+++ b/labs/debugging-application-profiling/debugging-application-profiling.tex
@@ -118,6 +118,6 @@ the results with \code{perf report} and compare them with callgrind ones:
 
 \begin{bashinput}
 $ perf report --symfs=/home/<user>/debugging-labs/buildroot/output/staging/
-   -k /home/<user>/debugging-labs/nfsroot/root/vmlinux ./png_convert
-   tux_small.png out.png
+   -k /home/<user>/debugging-labs/buildroot/output/build/linux-5.13/vmlinux
+   ./png_convert tux_small.png out.png
 \end{bashinput}
\ No newline at end of file
diff --git a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
index 794d53b5..2bfddc06 100644
--- a/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
+++ b/labs/debugging-kernel-debugging/debugging-kernel-debugging.tex
@@ -118,14 +118,15 @@ Using \code{addr2line}, find the exact source code line were the crash happened.
 For that, you can use the following command:
 
 \begin{bashinput}
-$ addr2line -e vmlinux -a <crash_address>
+$ addr2line -e /home/<user>/debugging-labs/buildroot/output/build/linux-5.13/vmlinux
+  -a <crash_address>
 \end{bashinput}
 
 We can even go a step further and use \code{gdb-multiarch} to open vmlinux and
 locate the function and corresponding offset in assembly
 
 \begin{bashinput}
-$ gdb-multiarch /home/<user>/debugging-labs/nfsroot/root/vmlinux
+$ gdb-multiarch /home/<user>/debugging-labs/buildroot/output/build/linux-5.13/vmlinux
 (gdb) disassemble <function>
 \end{bashinput}
 
diff --git a/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex b/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
index 5130cef0..b5c88c84 100644
--- a/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
+++ b/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex
@@ -204,7 +204,7 @@ We will then use perf report to visualize the aquired data:
 
 \begin{bashinput}
 $ perf report --symfs=/home/<user>/debugging-labs/buildroot/output/staging/
-  -k /home/<user>/debugging-labs/nfsroot/root/vmlinux
+  -k /home/<user>/debugging-labs/buildroot/output/build/linux-5.13/vmlinux
 \end{bashinput}
 
 Another useful tool for performance analysis is flamegraphs. Latest perf




More information about the training-materials-updates mailing list