Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb967063 authored by Andi Kleen's avatar Andi Kleen Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarAndi 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent b3151ea5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -504,6 +504,7 @@ static void pmu_add_cpu_aliases(struct list_head *head)
	struct pmu_events_map *map;
	struct pmu_event *pe;
	char *cpuid;
	static bool printed;

	cpuid = getenv("PERF_CPUID");
	if (cpuid)
@@ -513,7 +514,10 @@ static void pmu_add_cpu_aliases(struct list_head *head)
	if (!cpuid)
		return;

	if (!printed) {
		pr_debug("Using CPUID %s\n", cpuid);
		printed = true;
	}

	i = 0;
	while (1) {