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:	Fri, 28 Sep 2012 13:49:06 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Stephane Eranian <eranian@...gle.com>,
	David Ahern <dsahern@...il.com>,
	Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH 05/16] perf tools: Keep group information

Hi Jiri,

On Thu, 27 Sep 2012 19:03:52 +0200, Jiri Olsa wrote:
>> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
>> index bf5d033ee1b4..3c52d0ab9270 100644
>> --- a/tools/perf/util/parse-events.c
>> +++ b/tools/perf/util/parse-events.c
>> @@ -830,6 +830,7 @@ int parse_events(struct perf_evlist *evlist, const char *str,
>>  	if (!ret) {
>>  		int entries = data.idx - evlist->nr_entries;
>>  		perf_evlist__splice_list_tail(evlist, &data.list, entries);
>> +		evlist->nr_groups += data.nr_groups;
>>  		return 0;
>>  	}
>>  
>> diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h
>> index c356e443448d..f6b0254afe17 100644
>> --- a/tools/perf/util/parse-events.h
>> +++ b/tools/perf/util/parse-events.h
>> @@ -65,6 +65,7 @@ struct parse_events__term {
>>  struct parse_events_data__events {
>>  	struct list_head list;
>>  	int idx;
>> +	int nr_groups;
>>  };
>>  
>>  struct parse_events_data__terms {
>> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
>> index cd88209e3c58..d14bb507594b 100644
>> --- a/tools/perf/util/parse-events.y
>> +++ b/tools/perf/util/parse-events.y
>> @@ -122,7 +122,9 @@ group_def:
>>  PE_NAME '{' events '}'
>>  {
>>  	struct list_head *list = $3;
>> +	struct parse_events_data__events *data = _data;
>>  
>> +	data->nr_groups++;
>
> perhaps if you inc nr_groups only if there's more than 1 event,
> you would not need your next patch:
>   perf evlist: Add perf_evlist__recalc_nr_groups
>
> something like:
>
> if (!list_is_last(list))
> 	data->nr_groups++;
>

Right!  Will use it in next version.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ