aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2016-10-13 17:15:24 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-10-24 10:07:41 -0400
commitfb967063699e25ae73f0991672f99bd7104f70c8 (patch)
tree6b27bc144c5c447605ebdea45c4efddddda10fb3 /tools/perf
parentb3151ea500655f232255ddcdf2bbcf691cb39646 (diff)
perf pmu: Only print Using CPUID message once
With uncore event aliases which are duplicated over multiple PMUs the "Using CPUID" message with -v could be printed many times. Only print it once. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/1476393332-20732-3-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/pmu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index b1474dcadfa2..d7174f340b53 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -504,6 +504,7 @@ static void pmu_add_cpu_aliases(struct list_head *head)
504 struct pmu_events_map *map; 504 struct pmu_events_map *map;
505 struct pmu_event *pe; 505 struct pmu_event *pe;
506 char *cpuid; 506 char *cpuid;
507 static bool printed;
507 508
508 cpuid = getenv("PERF_CPUID"); 509 cpuid = getenv("PERF_CPUID");
509 if (cpuid) 510 if (cpuid)
@@ -513,7 +514,10 @@ static void pmu_add_cpu_aliases(struct list_head *head)
513 if (!cpuid) 514 if (!cpuid)
514 return; 515 return;
515 516
516 pr_debug("Using CPUID %s\n", cpuid); 517 if (!printed) {
518 pr_debug("Using CPUID %s\n", cpuid);
519 printed = true;
520 }
517 521
518 i = 0; 522 i = 0;
519 while (1) { 523 while (1) {