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: <20170828091915.GA4948@krava>
Date:   Mon, 28 Aug 2017 11:19:15 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v2 14/19] perf, tools, stat: Support JSON metrics in perf
 stat

On Mon, Aug 28, 2017 at 10:13:35AM +0200, Jiri Olsa wrote:
> On Fri, Aug 11, 2017 at 04:26:29PM -0700, Andi Kleen wrote:
> 
> SNIP
> 
> > diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> > index ac16a9db1fb5..4f049285e3ac 100644
> > --- a/tools/perf/util/pmu.c
> > +++ b/tools/perf/util/pmu.c
> > @@ -516,16 +516,8 @@ char * __weak get_cpuid_str(void)
> >  	return NULL;
> >  }
> >  
> > -/*
> > - * From the pmu_events_map, find the table of PMU events that corresponds
> > - * to the current running CPU. Then, add all PMU events from that table
> > - * as aliases.
> > - */
> > -static void pmu_add_cpu_aliases(struct list_head *head, const char *name)
> > +char *perf_pmu__getcpuid(void)
> 
> please add this function in separate patch
> 
> >  {
> > -	int i;
> > -	struct pmu_events_map *map;
> > -	struct pmu_event *pe;
> >  	char *cpuid;
> 
> also you could make cpuid static and not rerun the check
> every time it's called
> 
> jirka
> 
> >  	static bool printed;
> >  
> > @@ -535,12 +527,26 @@ static void pmu_add_cpu_aliases(struct list_head *head, const char *name)

also pmu_add_cpu_aliases could use the find_map,
which duplicates the beginning of this function

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ