[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240110005445.490058-1-namhyung@kernel.org>
Date: Tue, 9 Jan 2024 16:54:44 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>
Cc: Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>,
Stefano Sanfilippo <ssanfilippo@...omium.org>,
Steve MacLean <Steve.MacLean@...rosoft.com>,
Pablo Galindo <pablogsal@...il.com>
Subject: [PATCH 1/2] perf doc: Update jitdump unwind info specification
Currently the jitdump spec says the EH frame header is followed by the
actual EH frame data. But in fact, it's the opposite way.
I've checked this with the v8 javascript engine which, I believe, is the
actual user of this feature.
https://github.com/v8/v8/blob/04f51bc70a38fbea743588e41290bea40830a486/src/diagnostics/eh-frame.cc#L157
Also, the unwind_data_size field should have the size of both unwind
table and the header sections. The jit_add_eh_frame_info() in genelf.c
calculates the table size by subtracting the header size from it.
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Stefano Sanfilippo <ssanfilippo@...omium.org>
Cc: Steve MacLean <Steve.MacLean@...rosoft.com>
Reported-by: Pablo Galindo <pablogsal@...il.com>
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/Documentation/jitdump-specification.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/Documentation/jitdump-specification.txt b/tools/perf/Documentation/jitdump-specification.txt
index 79936355d819..5c3fbbbebf14 100644
--- a/tools/perf/Documentation/jitdump-specification.txt
+++ b/tools/perf/Documentation/jitdump-specification.txt
@@ -155,10 +155,10 @@ The record is used to describe the unwinding information for a jitted function.
The record has the following fields following the fixed-size record header in order:
-uint64_t unwind_data_size : the size in bytes of the unwinding data table at the end of the record
-uint64_t eh_frame_hdr_size : the size in bytes of the DWARF EH Frame Header at the start of the unwinding data table at the end of the record
+uint64_t unwind_data_size : the size in bytes of the unwinding data (EH Frame table and EH Frame Header) at the end of the record
+uint64_t eh_frame_hdr_size : the size in bytes of the DWARF EH Frame Header at the end of the record
uint64_t mapped_size : the size of the unwinding data mapped in memory
-const char unwinding_data[n]: an array of unwinding data, consisting of the EH Frame Header, followed by the actual EH Frame
+const char unwinding_data[n]: an array of unwinding data, consisting of the actual EH Frame, followed by the EH Frame Header
The EH Frame header follows the Linux Standard Base (LSB) specification as described in the document at https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/ehframehdr.html
--
2.43.0.472.g3155946c3a-goog
Powered by blists - more mailing lists