Re: [PATCH] perf tool: report user-friendly error from timechart

2013-10-03 Thread David Ahern
On 10/3/13 11:08 AM, Arnaldo Carvalho de Melo wrote: And is_valid_tracepoint() is a too big hammer, it traverses the whole directory looking for a match instead of plain build the path and do an access, its one of those things I need to ditch at some point. So far I just try to do a perf_evlist_

Re: [PATCH] perf tool: report user-friendly error from timechart

2013-10-03 Thread Arnaldo Carvalho de Melo
Em Thu, Oct 03, 2013 at 07:35:18AM -0600, David Ahern escreveu: > On 10/3/13 6:38 AM, Ingo Molnar wrote: > > > >* Ramkumar Ramachandra wrote: > > > >>+ /* Perform a quick sanity check */ > >>+ if (!is_valid_tracepoint("power:cpu_frequency")) { > >>+ fprintf(stderr, "Error:\tNo permis

Re: [PATCH] perf tool: report user-friendly error from timechart

2013-10-03 Thread David Ahern
On 10/3/13 6:38 AM, Ingo Molnar wrote: * Ramkumar Ramachandra wrote: + /* Perform a quick sanity check */ + if (!is_valid_tracepoint("power:cpu_frequency")) { + fprintf(stderr, "Error:\tNo permissions to read $debugfs/tracing/events/power/cpu_frequency\n"); +

Re: [PATCH] perf tool: report user-friendly error from timechart

2013-10-03 Thread Ingo Molnar
* Ramkumar Ramachandra wrote: > Ingo Molnar wrote: > >> + /* Perform a quick sanity check */ > >> + if (!is_valid_tracepoint("power:cpu_frequency")) { > >> + fprintf(stderr, "Error:\tNo permissions to read > >> $debugfs/tracing/events/power/cpu_frequency\n"); > >> +

Re: [PATCH] perf tool: report user-friendly error from timechart

2013-10-03 Thread Ramkumar Ramachandra
Ingo Molnar wrote: >> + /* Perform a quick sanity check */ >> + if (!is_valid_tracepoint("power:cpu_frequency")) { >> + fprintf(stderr, "Error:\tNo permissions to read >> $debugfs/tracing/events/power/cpu_frequency\n"); >> + fprintf(stderr, "Hint:\tChange the permis

Re: [PATCH] perf tool: report user-friendly error from timechart

2013-10-03 Thread Ingo Molnar
* Ramkumar Ramachandra wrote: > + /* Perform a quick sanity check */ > + if (!is_valid_tracepoint("power:cpu_frequency")) { > + fprintf(stderr, "Error:\tNo permissions to read > $debugfs/tracing/events/power/cpu_frequency\n"); > + fprintf(stderr, "Hint:\tChange t