lkml.org 
[lkml]   [2016]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/10] perf, tools: Only print Using CPUID message once
Em Thu, Oct 13, 2016 at 02:15:24PM -0700, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> 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.

Thanks, applied.

- Arnaldo

> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/util/pmu.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 9adae7e7477c..b36bf9e77799 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -508,6 +508,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)
> @@ -517,7 +518,10 @@ static void pmu_add_cpu_aliases(struct list_head *head)
> if (!cpuid)
> return;
>
> - pr_debug("Using CPUID %s\n", cpuid);
> + if (!printed) {
> + pr_debug("Using CPUID %s\n", cpuid);
> + printed = true;
> + }
>
> i = 0;
> while (1) {
> --
> 2.5.5

\
 
 \ /
  Last update: 2016-10-14 17:45    [W:0.233 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site