All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] perf docs: Correct and clarify jitdump spec
@ 2019-09-28  1:53 Steve MacLean
  2019-09-28  4:39 ` Stephane Eranian
  0 siblings, 1 reply; 3+ messages in thread
From: Steve MacLean @ 2019-09-28  1:53 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim
  Cc: Eric Saint-Etienne, John Keeping, Andi Kleen, Song Liu,
	Davidlohr Bueso, Leo Yan, linux-kernel, Brian Robbins,
	Tom McDonald, John Salem, Stephane Eranian

Specification claims latest version of jitdump file format is 2. Current
jit dump reading code treats 1 as the latest version.

Correct spec to match code.

The original language made it unclear the value to be written in the magic
field.

Revise language that the writer always writes the same value. Specify that
the reader uses the value to detect endian mismatches.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Steve MacLean <Steve.MacLean@Microsoft.com>
---
 tools/perf/Documentation/jitdump-specification.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Documentation/jitdump-specification.txt b/tools/perf/Documentation/jitdump-specification.txt
index 4c62b07..52152d1 100644
--- a/tools/perf/Documentation/jitdump-specification.txt
+++ b/tools/perf/Documentation/jitdump-specification.txt
@@ -36,8 +36,8 @@ III/ Jitdump file header format
 Each jitdump file starts with a fixed size header containing the following fields in order:
 
 
-* 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 is 0x4A695444 or 0x4454694a depending on the endianness. The field can be used to detect the endianness of the file
-* uint32_t version   : a 4-byte value representing the format version. It is currently set to 2
+* 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 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
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/4] perf docs: Correct and clarify jitdump spec
  2019-09-28  1:53 [PATCH 4/4] perf docs: Correct and clarify jitdump spec Steve MacLean
@ 2019-09-28  4:39 ` Stephane Eranian
  2019-09-30 10:48   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Eranian @ 2019-09-28  4:39 UTC (permalink / raw)
  To: Steve MacLean
  Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Eric Saint-Etienne, John Keeping, Andi Kleen, Song Liu,
	Davidlohr Bueso, Leo Yan, linux-kernel, Brian Robbins,
	Tom McDonald, John Salem

On Fri, Sep 27, 2019 at 6:53 PM Steve MacLean
<Steve.MacLean@microsoft.com> wrote:
>
> Specification claims latest version of jitdump file format is 2. Current
> jit dump reading code treats 1 as the latest version.
>
> Correct spec to match code.
>
> The original language made it unclear the value to be written in the magic
> field.
>
> Revise language that the writer always writes the same value. Specify that
> the reader uses the value to detect endian mismatches.
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Stephane Eranian <eranian@google.com>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Steve MacLean <Steve.MacLean@Microsoft.com>

Corrections are valid.

Acked-by: Stephane Eranian <eranian@google.com>

> ---
>  tools/perf/Documentation/jitdump-specification.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/Documentation/jitdump-specification.txt b/tools/perf/Documentation/jitdump-specification.txt
> index 4c62b07..52152d1 100644
> --- a/tools/perf/Documentation/jitdump-specification.txt
> +++ b/tools/perf/Documentation/jitdump-specification.txt
> @@ -36,8 +36,8 @@ III/ Jitdump file header format
>  Each jitdump file starts with a fixed size header containing the following fields in order:
>
>
> -* 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 is 0x4A695444 or 0x4454694a depending on the endianness. The field can be used to detect the endianness of the file
> -* uint32_t version   : a 4-byte value representing the format version. It is currently set to 2
> +* 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 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
> --
> 2.7.4
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4/4] perf docs: Correct and clarify jitdump spec
  2019-09-28  4:39 ` Stephane Eranian
@ 2019-09-30 10:48   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-09-30 10:48 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: Steve MacLean, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Namhyung Kim, Eric Saint-Etienne, John Keeping, Andi Kleen,
	Song Liu, Davidlohr Bueso, Leo Yan, linux-kernel, Brian Robbins,
	Tom McDonald, John Salem

Em Fri, Sep 27, 2019 at 09:39:00PM -0700, Stephane Eranian escreveu:
> On Fri, Sep 27, 2019 at 6:53 PM Steve MacLean
> <Steve.MacLean@microsoft.com> wrote:
> >
> > Specification claims latest version of jitdump file format is 2. Current
> > jit dump reading code treats 1 as the latest version.
> >
> > Correct spec to match code.

<SNIP>
 
> Corrections are valid.
> 
> Acked-by: Stephane Eranian <eranian@google.com>

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-30 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-28  1:53 [PATCH 4/4] perf docs: Correct and clarify jitdump spec Steve MacLean
2019-09-28  4:39 ` Stephane Eranian
2019-09-30 10:48   ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.