[PATCH 2/2] perf doc: Increase the jitdump version to 2

From: Namhyung Kim
Date: Tue Jan 09 2024 - 19:55:16 EST


The specification says it's in version 2. Previously it changed to 1
due to the mismatch with the code. But I think it's better to use the
version 2 to indicate it supports the unwind info.

The version check code in jitdump.c only checks if it's greater than the
current version so old data with version number 1 should work too.

Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Steve MacLean <Steve.MacLean@xxxxxxxxxxxxx>
Cc: Pablo Galindo <pablogsal@xxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/Documentation/jitdump-specification.txt | 2 +-
tools/perf/util/jitdump.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Documentation/jitdump-specification.txt b/tools/perf/Documentation/jitdump-specification.txt
index 5c3fbbbebf14..863b35d4ad4a 100644
--- a/tools/perf/Documentation/jitdump-specification.txt
+++ b/tools/perf/Documentation/jitdump-specification.txt
@@ -37,7 +37,7 @@ III/ Jitdump file header format


* uint32_t magic : a magic number tagging the file type. The value is 4-byte long and represents the string "JiTD" in ASCII form. It written is as 0x4A695444. The reader will detect an endian mismatch when it reads 0x4454694a.
-* uint32_t version : a 4-byte value representing the format version. It is currently set to 1
+* uint32_t version : a 4-byte value representing the format version. It is currently set to 2
* uint32_t total_size: size in bytes of file header
* uint32_t elf_mach : ELF architecture encoding (ELF e_machine value as specified in /usr/include/elf.h)
* uint32_t pad1 : padding. Reserved for future use
diff --git a/tools/perf/util/jitdump.h b/tools/perf/util/jitdump.h
index ab2842def83d..4e3f6702d919 100644
--- a/tools/perf/util/jitdump.h
+++ b/tools/perf/util/jitdump.h
@@ -22,7 +22,7 @@
#define PADDING_8ALIGNED(x) ((((x) + 7) & 7) ^ 7)
#define ALIGN_8(x) (((x) + 7) & (~7))

-#define JITHEADER_VERSION 1
+#define JITHEADER_VERSION 2

enum jitdump_flags_bits {
JITDUMP_FLAGS_ARCH_TIMESTAMP_BIT,
--
2.43.0.472.g3155946c3a-goog