Re: [PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths

2013-04-24 Thread Namhyung Kim
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 >> >> Most tracepoint events already have their system and event name in >> ->name field so that searching whole event tracing directory for each

Re: [PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths

2013-04-24 Thread Jiri Olsa
On Tue, Apr 23, 2013 at 05:31:00PM +0900, Namhyung Kim wrote: > From: Namhyung Kim > > 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 > Cc:

Re: [PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths

2013-04-24 Thread Namhyung Kim
On Tue, 23 Apr 2013 09:07:20 -0400, Steven Rostedt wrote: >> + >> +if (pos->name && strchr(pos->name, ':')) { >> +char *str = strchr(pos->name, ':'); > > Why not make the above into: > > if (pos->name && (str = strchr(pos->name, ':'))) { > > ? I wanted not to

Re: [PATCH 02/14] perf util: Use evsel-name to get tracepoint_paths

2013-04-24 Thread Namhyung Kim
On Tue, 23 Apr 2013 09:07:20 -0400, Steven Rostedt wrote: + +if (pos-name strchr(pos-name, ':')) { +char *str = strchr(pos-name, ':'); Why not make the above into: if (pos-name (str = strchr(pos-name, ':'))) { ? I wanted not to have an assignment

Re: [PATCH 02/14] perf util: Use evsel-name to get tracepoint_paths

2013-04-24 Thread Jiri Olsa
On Tue, Apr 23, 2013 at 05:31:00PM +0900, Namhyung Kim wrote: From: Namhyung Kim namhyung@lge.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

Re: [PATCH 02/14] perf util: Use evsel-name to get tracepoint_paths

2013-04-24 Thread Namhyung Kim
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@lge.com Most tracepoint events already have their system and event name in -name field so that searching whole event tracing directory

Re: [PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths

2013-04-23 Thread Steven Rostedt
On Tue, 2013-04-23 at 17:31 +0900, Namhyung Kim wrote: > From: Namhyung Kim > > 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 > Cc: Frederic

[PATCH 02/14] perf util: Use evsel->name to get tracepoint_paths

2013-04-23 Thread Namhyung Kim
From: Namhyung Kim 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 Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim ---

[PATCH 02/14] perf util: Use evsel-name to get tracepoint_paths

2013-04-23 Thread Namhyung Kim
From: Namhyung Kim namhyung@lge.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 jo...@redhat.com Cc: Frederic Weisbecker fweis...@gmail.com

Re: [PATCH 02/14] perf util: Use evsel-name to get tracepoint_paths

2013-04-23 Thread Steven Rostedt
On Tue, 2013-04-23 at 17:31 +0900, Namhyung Kim wrote: From: Namhyung Kim namhyung@lge.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