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: <tip-a820e33547aee9fd0460106c1fc577a125c23975@git.kernel.org>
Date:   Fri, 24 Mar 2017 11:49:43 -0700
From:   tip-bot for Andi Kleen <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, hpa@...or.com, acme@...hat.com,
        ak@...ux.intel.com, tglx@...utronix.de, jolsa@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf pmu: Special case uncore_ prefix

Commit-ID:  a820e33547aee9fd0460106c1fc577a125c23975
Gitweb:     http://git.kernel.org/tip/a820e33547aee9fd0460106c1fc577a125c23975
Author:     Andi Kleen <ak@...ux.intel.com>
AuthorDate: Mon, 20 Mar 2017 13:17:04 -0700
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 21 Mar 2017 16:10:59 -0300

perf pmu: Special case uncore_ prefix

Special case uncore_ prefix in PMU match, to allow for shorter event
uncore specifications.

Before:

  perf stat -a -e uncore_cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1

After

  perf stat -a -e cbox/event=0x35,umask=0x1,filter_opc=0x19C/ sleep 1

Committer tests:

   # perf list uncore

  List of pre-defined events (to be used in -e):

    uncore_cbox_0/clockticks/                       [Kernel PMU event]
    uncore_cbox_1/clockticks/                       [Kernel PMU event]
    uncore_imc/data_reads/                          [Kernel PMU event]
    uncore_imc/data_writes/                         [Kernel PMU event]

  # perf stat -a -e cbox_0/clockticks/ sleep 1

   Performance counter stats for 'system wide':

  281,474,976,653,084      cbox_0/clockticks/

       1.000870129 seconds time elapsed

  #

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
Acked-by: Jiri Olsa <jolsa@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Link: http://lkml.kernel.org/r/20170320201711.14142-7-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/parse-events.y | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index 20935b17..04fd8c9 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -239,6 +239,9 @@ PE_NAME opt_event_config
 		while ((pmu = perf_pmu__scan(pmu)) != NULL) {
 			char *name = pmu->name;
 
+			if (!strncmp(name, "uncore_", 7) &&
+			    strncmp($1, "uncore_", 7))
+				name += 7;
 			if (!strncmp($1, name, strlen($1))) {
 				if (parse_events_copy_term_list(orig_terms, &terms))
 					YYABORT;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ