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: <87k3nr9moe.fsf@sejong.aot.lge.com>
Date:	Thu, 25 Apr 2013 14:58:09 +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>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	David Ahern <dsahern@...il.com>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths

Hi Jiri,

On Wed, 24 Apr 2013 14:42:57 +0200, Jiri Olsa wrote:
> On Tue, Apr 23, 2013 at 05:31:00PM +0900, Namhyung Kim wrote:
>> From: Namhyung Kim <namhyung.kim@....com>
>> 
>> Most tracepoint events already have their system and event name in
>> ->name field so that searching whole event tracing directory for each
>> evsel to match given id is suboptimal.
>> 
>> Cc: Jiri Olsa <jolsa@...hat.com>
>> Cc: Frederic Weisbecker <fweisbec@...il.com>
>> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
>> ---
>>  tools/perf/util/trace-event-info.c | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>> 
>> diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c
>> index ab18bf12d54a..dcfc1869c9af 100644
>> --- a/tools/perf/util/trace-event-info.c
>> +++ b/tools/perf/util/trace-event-info.c
>> @@ -414,12 +414,31 @@ get_tracepoints_path(struct list_head *pattrs)
>>  		if (pos->attr.type != PERF_TYPE_TRACEPOINT)
>>  			continue;
>>  		++nr_tracepoints;
>> +
>> +		if (pos->name && strchr(pos->name, ':')) {
>> +			char *str = strchr(pos->name, ':');
>> +
>> +			ppath->next = zalloc(sizeof(path));
>> +			if (!ppath->next)
>> +				goto error;
>> +
>> +			ppath->next->system = strndup(pos->name, str - pos->name);
>> +			ppath->next->name = strdup(str+1);
>> +
>> +			if (!ppath->next->system || !ppath->next->name)
>> +				goto error;
>> +
>> +			goto next;
>> +		}
>
> good idea, could you please move this ^^^ into function ?
> something like 'tracepoint_name_to_path'

Will do!

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