linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Stephane Eranian <eranian@google.com>,
	Andi Kleen <andi@firstfloor.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Wang Nan <wangnan0@huawei.com>
Subject: Re: [RFC/PATCH v2] perf report: Show random usage tip on the help line
Date: Thu, 7 Jan 2016 09:07:17 +0100	[thread overview]
Message-ID: <20160107080717.GC20434@krava.brq.redhat.com> (raw)
In-Reply-To: <1452152782-26892-1-git-send-email-namhyung@kernel.org>

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

  parent reply	other threads:[~2016-01-07  8:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-07  7:46 [RFC/PATCH v2] perf report: Show random usage tip on the help line Namhyung Kim
2016-01-07  8:03 ` Jiri Olsa
2016-01-07 10:49   ` Namhyung Kim
2016-01-07  8:07 ` Jiri Olsa [this message]
2016-01-07  8:09   ` Jiri Olsa
2016-01-07 10:46     ` Namhyung Kim
2016-01-07 10:45   ` Namhyung Kim
2016-01-07 16:47 ` Andi Kleen
2016-01-07 18:15   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160107080717.GC20434@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).