lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211108074045.3181854-1-eranian@google.com>
Date:   Sun,  7 Nov 2021 23:40:45 -0800
From:   Stephane Eranian <eranian@...gle.com>
To:     linux-kernel@...r.kernel.org
Cc:     acme@...hat.com, jolsa@...hat.com, ak@...ux.intel.com,
        kan.liang@...el.com, irogers@...gle.com, namhyung@...nel.org
Subject: [PATCH] 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 <eranian@...gle.com>
---
 tools/perf/util/session.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 352f16076e01..94c056695a93 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -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");
 	}
-- 
2.34.0.rc0.344.g81b53c2807-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ