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: <20200716094216.1418659-4-kjain@linux.ibm.com>
Date:   Thu, 16 Jul 2020 15:12:14 +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 v3 3/5] perf jevents: Add support for parsing perchip/percore events

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

Added the "PerCore" field in enum so that perf knows they are
per core events and add these fields to pmu_event structure.

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

Signed-off-by: Kajol Jain <kjain@...ux.ibm.com>
---
 tools/perf/pmu-events/jevents.c    | 8 +++++++-
 tools/perf/pmu-events/pmu-events.h | 4 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
index b2f59f0af63d..e1c43f739083 100644
--- a/tools/perf/pmu-events/jevents.c
+++ b/tools/perf/pmu-events/jevents.c
@@ -54,13 +54,19 @@ int verbose;
 char *prog;
 
 enum aggr_mode_class {
-	PerPkg = 1
+	PerPkg = 1,
+	PerChip,
+	PerCore
 };
 
 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