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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200720070127.109234-4-kjain@linux.ibm.com>
Date:   Mon, 20 Jul 2020 12:31:25 +0530
From:   Kajol Jain <kjain@...ux.ibm.com>
To:     acme@...nel.org
Cc:     peterz@...radead.org, mingo@...hat.com, mark.rutland@....com,
        alexander.shishkin@...ux.intel.com, pc@...ibm.com,
        jolsa@...hat.com, namhyung@...nel.org, ak@...ux.intel.com,
        yao.jin@...ux.intel.com, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org, irogers@...gle.com,
        maddy@...ux.ibm.com, ravi.bangoria@...ux.ibm.com,
        anju@...ux.vnet.ibm.com, kan.liang@...ux.intel.com,
        nasastry@...ibm.com, kjain@...ux.ibm.com
Subject: [PATCH v4 3/5] perf jevents: Add support for parsing perchip/percore events

Added the "PerChiip" field  in enum "aggr_mode_classs" so that perf
knows they are per chip events.

Added the "PerCore" field in enum "aggr_mode_class" so that perf
knows they are per core events.

Similar to the way we had "PerPkg field to specify perpkg events.

Signed-off-by: Kajol Jain <kjain@...ux.ibm.com>
Acked-by: Ian Rogers <irogers@...gle.com>
---
 tools/perf/pmu-events/jevents.c    | 4 ++++
 tools/perf/pmu-events/pmu-events.h | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
index 6601f1fd2e80..2f48b783a64d 100644
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
@@ -58,6 +58,10 @@ enum aggr_mode_class convert(const char *aggr_mode)
 {
 	if (!strcmp(aggr_mode, "PerPkg"))
 		return PerPkg;
+	else if (!strcmp(aggr_mode, "PerCore"))
+		return PerCore;
+	else if (!strcmp(aggr_mode, "PerChip"))
+		return PerChip;
 	return -1;
 }
 
diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
index 71b7aa6278d0..214ffc681b54 100644
--- a/tools/perf/pmu-events/pmu-events.h
+++ b/tools/perf/pmu-events/pmu-events.h
@@ -3,7 +3,9 @@
 #define PMU_EVENTS_H
 
 enum aggr_mode_class {
-	PerPkg = 1
+	PerPkg = 1,
+	PerChip,
+	PerCore
 };
 
 /*
-- 
2.26.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ