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]
Date:   Tue, 24 Apr 2018 16:29:04 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     "Liang, Kan" <kan.liang@...ux.intel.com>
Cc:     mingo@...hat.com, peterz@...radead.org,
        linux-kernel@...r.kernel.org, jolsa@...hat.com,
        namhyung@...nel.org, ganapatrao.kulkarni@...ium.com,
        zhangshaokun@...ilicon.com, yao.jin@...ux.intel.com,
        will.deacon@....com, ak@...ux.intel.com, agustinv@...eaurora.org
Subject: Re: [PATCH 5/5] perf stat: Fix duplicate PMU name for interval print

Em Tue, Apr 24, 2018 at 03:18:34PM -0400, Liang, Kan escreveu:
> On 4/24/2018 2:53 PM, Arnaldo Carvalho de Melo wrote:
> > Em Tue, Apr 24, 2018 at 11:20:14AM -0700, kan.liang@...ux.intel.com escreveu:
> > > +		if (strstr(counter->name, counter->pmu_name))
> > > +			return;
> > >   		if (asprintf(&new_name,
> > >   			     "%s [%s]", counter->name, counter->pmu_name) > 0) {
> > >   			free(counter->name);

> > Humm, do you have any problem with the patch below instead?
 
> No. The patch as below looks good to me.

Thanks for checking,

- Arnaldo

> > +++ b/tools/perf/builtin-stat.c
> > @@ -1261,7 +1261,8 @@ static void uniquify_event_name(struct perf_evsel *counter)
> > -	if (!counter->pmu_name || !strncmp(counter->name, counter->pmu_name,
> > +	if (counter->uniquified_name ||
> > +	    !counter->pmu_name || !strncmp(counter->name, counter->pmu_name,
> >   					   strlen(counter->pmu_name)))
> > @@ -1279,6 +1280,8 @@ static void uniquify_event_name(struct perf_evsel *counter)
> >   	}
> > +
> > +	counter->uniquified_name = true;
> > +++ b/tools/perf/util/evsel.h
> > @@ -115,6 +115,7 @@ struct perf_evsel {
> >   	unsigned int		sample_size;
> >   	int			id_pos;
> >   	int			is_pos;
> > +	bool			uniquified_name;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ