Re: [RFC/PATCH v2] perf report: Show random usage tip on the help line

2016-01-07 Thread Andi Kleen
On Thu, Jan 07, 2016 at 04:46:22PM +0900, Namhyung Kim wrote: > Currently perf report only shows a help message "For a higher level > overview, try: perf report --sort comm,dso" unconditionally (even if > the sort keys were used). Add more help tips and show randomly. > > Load tips from ${prefix}

Re: [RFC/PATCH v2] perf report: Show random usage tip on the help line

2016-01-07 Thread Namhyung Kim
On Thu, Jan 07, 2016 at 09:03:20AM +0100, Jiri Olsa wrote: > On Thu, Jan 07, 2016 at 04:46:22PM +0900, Namhyung Kim wrote: > > SNIP > > > +const char *perf_report_tip(const char *dirname) > > +{ > > + struct strlist *tips; > > + struct str_node *node; > > + char *tip = NULL; > > + struct

Re: [RFC/PATCH v2] perf report: Show random usage tip on the help line

2016-01-07 Thread Namhyung Kim
On Thu, Jan 07, 2016 at 09:09:59AM +0100, Jiri Olsa wrote: > On Thu, Jan 07, 2016 at 09:07:17AM +0100, Jiri Olsa wrote: > > On Thu, Jan 07, 2016 at 04:46:22PM +0900, Namhyung Kim wrote: > > > > SNIP > > > > > > > > struct callchain_param callchain_param = { > > > .mode = CHAIN_GRAPH_ABS,

Re: [RFC/PATCH v2] perf report: Show random usage tip on the help line

2016-01-07 Thread Namhyung Kim
On Thu, Jan 07, 2016 at 09:07:17AM +0100, Jiri Olsa wrote: > On Thu, Jan 07, 2016 at 04:46:22PM +0900, Namhyung Kim wrote: > > SNIP > > > > > struct callchain_param callchain_param = { > > .mode = CHAIN_GRAPH_ABS, > > @@ -663,3 +665,28 @@ fetch_kernel_version(unsigned int *puint, cha

Re: [RFC/PATCH v2] perf report: Show random usage tip on the help line

2016-01-07 Thread Jiri Olsa
On Thu, Jan 07, 2016 at 04:46:22PM +0900, Namhyung Kim wrote: SNIP > > struct callchain_param callchain_param = { > .mode = CHAIN_GRAPH_ABS, > @@ -663,3 +665,28 @@ fetch_kernel_version(unsigned int *puint, char *str, > *puint = (version << 16) + (patchlevel << 8) +

[RFC/PATCH v2] perf report: Show random usage tip on the help line

2016-01-06 Thread Namhyung Kim
Currently perf report only shows a help message "For a higher level overview, try: perf report --sort comm,dso" unconditionally (even if the sort keys were used). Add more help tips and show randomly. Load tips from ${prefix}/share/doc/perf-tip/tips.txt file. $ perf report | tail 0.10%