Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-26 Thread Steven Rostedt
On Fri, 2013-04-26 at 07:34 -0600, David Ahern wrote: > On 4/25/13 7:05 AM, Steven Rostedt wrote: > > Perf was added in 2.6.31, but do all > > functionalities still work that far back? > > > perf was accepted into 2.6.28 - first commit is 0793a61d. That's kernel side. > > It does have limite

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-26 Thread David Ahern
On 4/25/13 7:05 AM, Steven Rostedt wrote: Perf was added in 2.6.31, but do all functionalities still work that far back? perf was accepted into 2.6.28 - first commit is 0793a61d. It does have limited functionality (H/W and S/W counters) until 2.6.31. David -- To unsubscribe from this list:

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-25 Thread Jiri Olsa
On Thu, Apr 25, 2013 at 09:05:21AM -0400, Steven Rostedt wrote: > On Thu, 2013-04-25 at 18:51 +0900, Namhyung Kim wrote: > > > > > >> > > >> Do you mean it should be changed to > > >> > > >> if (write_tracing_file("set_ftrace_pid", "-1") < 0) > > >> > > >> ? It seems it's the right thing to do

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-25 Thread Steven Rostedt
On Thu, 2013-04-25 at 18:51 +0900, Namhyung Kim wrote: > > > >> > >> Do you mean it should be changed to > >> > >>if (write_tracing_file("set_ftrace_pid", "-1") < 0) > >> > >> ? It seems it's the right thing to do for compatibility. > > > > > > looks like it's enough only to open it with O_

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-25 Thread Namhyung Kim
On Thu, 25 Apr 2013 11:09:56 +0200, Jiri Olsa wrote: > On Thu, Apr 25, 2013 at 03:06:37PM +0900, Namhyung Kim wrote: >> On Wed, 24 Apr 2013 16:09:18 +0200, Jiri Olsa wrote: >> > On Tue, Apr 23, 2013 at 05:31:03PM +0900, Namhyung Kim wrote: >> >> From: Namhyung Kim >> >> +out: >> >> + put_tracing_f

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-25 Thread Jiri Olsa
On Thu, Apr 25, 2013 at 03:06:37PM +0900, Namhyung Kim wrote: > On Wed, 24 Apr 2013 16:09:18 +0200, Jiri Olsa wrote: > > On Tue, Apr 23, 2013 at 05:31:03PM +0900, Namhyung Kim wrote: > >> From: Namhyung Kim > >> +out: > >> + put_tracing_file(file); > >> + return ret; > >> +} > >> + > >> +static

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-24 Thread Namhyung Kim
On Wed, 24 Apr 2013 16:09:18 +0200, Jiri Olsa wrote: > On Tue, Apr 23, 2013 at 05:31:03PM +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> +out: >> +put_tracing_file(file); >> +return ret; >> +} >> + >> +static int reset_tracing_files(struct perf_ftrace *ftrace __maybe_unused) >> +{ >>

Re: [PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-24 Thread Jiri Olsa
On Tue, Apr 23, 2013 at 05:31:03PM +0900, Namhyung Kim wrote: > From: Namhyung Kim > SNIP > +out: > + put_tracing_file(file); > + return ret; > +} > + > +static int reset_tracing_files(struct perf_ftrace *ftrace __maybe_unused) > +{ > + if (write_tracing_file("tracing_on", "0") < 0)

[PATCH 05/14] perf tools: Introduce new 'ftrace' tool

2013-04-23 Thread Namhyung Kim
From: Namhyung Kim The ftrace command is a simple wrapper of kernel's ftrace functionality. It only supports single thread tracing currently and just reads trace_pipe in text and then write it to stdout. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/M