perf report: fix output of WEIGHT_STRUCT
PATCH 1/1 perf report: fix output of WEIGHT_STRUCT
The output of the WEIGHT_STRUCT record was not consistent among its fields. Some are printed in decimal, other in hexdecimal. It does not make sense to print a weight in hexadecimal.
Signed-off-by Stephane Eranian <[email protected]>
--- tools/perf/util/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/session.c +2 -2
@@ -1332,8 +1332,8 @@ static void dump_sample(struct evsel *evsel, union perf_event *event,if (sample_type &PERF_SAMPLE_WEIGHT_TYPE ) {printf ("... weight: %" PRIu64"" , sample->weight);if (sample_type &PERF_SAMPLE_WEIGHT_STRUCT ) { -printf (",0x%" PRIx16"" , sample->ins_lat); -printf (",0x%" PRIx16"" , sample->p_stage_cyc); +printf (", %" PRIu16"" , sample->ins_lat); +printf (", %" PRIu16"" , sample->p_stage_cyc); }printf ("\n" ); }
Signature · 1 line
2.34.0.rc0.344.g81b53c2807-goog