From e72db8529ae148f5c455422ef80a679bede9b21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= Date: Thu, 21 Nov 2024 11:12:35 +0100 Subject: [PATCH] debugging: labs: add hint to make trace-cmd relay setup work with older host tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some trainees reported that the perf data file was empty when trying to display it in kernel shark. The recording actually failed to be pushed onto the host, with the following error: Connected with 192.168.0.100:33446 cpus=2 pagesize=4096 trace-cmd: Interrupted system call Unsupported file version 7 This error is due to trace-cmd on the host being older enough than the one on the target to not be able to handle the trace format version used by the latter. Fix this issue by forcing the trace format version to an older one. Signed-off-by: Alexis Lothoré --- .../debugging-system-wide-profiling.tex | 7 +++++++ 1 file changed, 7 insertions(+) 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 8be7497873..fd42fae09e 100644 --- a/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex +++ b/labs/debugging-system-wide-profiling/debugging-system-wide-profiling.tex @@ -67,6 +67,13 @@ \section{ftrace \& uprobes} ^C \end{bashinput} +{\em Note: if during the recording you encounter an \code{Unsupported file +version 7} error, it likely means that the trace-cmd tool on your +workstation is older than the one on the target, and does not understand +the default trace format used by the target. You can force trace-cmd on the +target to use an older version of the trace data format by also providing +\code{--file-version=6} on the recording command} + Then, using kernelshark tool on the host, analyze the trace: \begin{bashinput}