lkml.org 
[lkml]   [2016]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC/PATCH v2] perf report: Show random usage tip on the help line
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) + sublevel;
> return 0;
> }
> +
> +const char *perf_report_tip(const char *dirname)
> +{
> + struct strlist *tips;
> + struct str_node *node;
> + char *tip = NULL;
> + struct strlist_config conf = {
> + .dirname = system_path(dirname) ,
> + };
> +
> + tips = strlist__new("tips.txt", &conf);
> + if (tips == NULL || strlist__nr_entries(tips) == 1) {
> + tip = (char *)"Cannot find tips.txt file";
> + goto out;

could we also try to read "./Documentation/tips.txt" ?

so people who don't install perf and run it from 'tools/perf'
get some tips as well? ;-)

[jolsa@krava perf]$ ./perf report --stdio | tail -3
#
# (Cannot find tips.txt file)
#
[jolsa@krava perf]$

thanks,
jirka


\
 
 \ /
  Last update: 2016-01-07 09:21    [W:0.069 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site