Commit 957ed139 authored by Kan Liang's avatar Kan Liang Committed by Arnaldo Carvalho de Melo

perf event x86: Add retire_lat when synthesizing PERF_SAMPLE_WEIGHT_STRUCT

In arch_perf_synthesize_sample_weight(), the retire_lat was mistakenly
missed, add it.

  perf test -v "x86 sample parsing"
   74: x86 Sample parsing                                              :
  --- start ---
  test child forked, pid 72526
  Samples differ at 'retire_lat'
  parsing failed for sample_type 0x1000000
  test child finished with -1
  ---- end ----
  x86 Sample parsing: FAILED!
Reported-by: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20230206162100.3329395-1-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e65f91b2
...@@ -101,6 +101,7 @@ void arch_perf_synthesize_sample_weight(const struct perf_sample *data, ...@@ -101,6 +101,7 @@ void arch_perf_synthesize_sample_weight(const struct perf_sample *data,
if (type & PERF_SAMPLE_WEIGHT_STRUCT) { if (type & PERF_SAMPLE_WEIGHT_STRUCT) {
*array &= 0xffffffff; *array &= 0xffffffff;
*array |= ((u64)data->ins_lat << 32); *array |= ((u64)data->ins_lat << 32);
*array |= ((u64)data->retire_lat << 48);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment