All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH 2/8] perf ui/tui: Split help message for perf top and report
Date: Thu, 26 Dec 2013 11:12:21 -0300	[thread overview]
Message-ID: <20131226141221.GC30980@ghostprotocols.net> (raw)
In-Reply-To: <20131226140521.GB30980@ghostprotocols.net>

Em Thu, Dec 26, 2013 at 11:05:21AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Dec 26, 2013 at 02:37:58PM +0900, Namhyung Kim escreveu:
> > Some hotkeys don't work for perf top so split help messages for them.
> > It'll be helpful to a future modification.  Also sort the message by
> > alphabetical order of the hotkey.

> > +++ b/tools/perf/ui/browsers/hists.c
> > @@ -1400,6 +1400,35 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
> >  	char script_opt[64];
> >  	int delay_secs = hbt ? hbt->refresh : 0;
> >  
> > +#define HIST_BROWSER_HELP_COMMON					\
> > +	"h/?/F1        Show this window\n"				\
> > +	"UP/DOWN/PGUP\n"						\
> > +	"PGDN/SPACE    Navigate\n"					\
> > +	"q/ESC/CTRL+C  Exit browser\n\n"				\
> > +	"For multiple event sessions:\n\n"				\
> > +	"TAB/UNTAB     Switch events\n\n"				\
> > +	"For symbolic views (--sort has sym):\n\n"			\
> > +	"->            Zoom into DSO/Threads & Annotate current symbol\n" \
> > +	"<-            Zoom out\n"					\
> > +	"a             Annotate current symbol\n"			\
> > +	"C             Collapse all callchains\n"			\
> > +	"d             Zoom into current DSO\n"				\
> > +	"E             Expand all callchains\n"				\
> > +
> > +	/* help messages are sorted by lexical order of the hotkey */
> > +	const char report_help[] = HIST_BROWSER_HELP_COMMON
> > +	"P             Print histograms to perf.hist.N\n"
> > +	"r             Run available scripts\n"
> > +	"s             Switch to another data file in PWD\n"
> > +	"t             Zoom into current Thread\n"
> > +	"V             Verbose (DSO names in callchains, etc)\n"
> > +	"/             Filter symbol by name";
> > +	const char top_help[] = HIST_BROWSER_HELP_COMMON
> > +	"P             Print histograms to perf.hist.N\n"
> > +	"t             Zoom into current Thread\n"
> > +	"V             Verbose (DSO names in callchains, etc)\n"
> > +	"/             Filter symbol by name";
> > +
> >  	if (browser == NULL)
>   		return -1;
> 
> This wastes space, why not have the HIST_BROWSER_HELP_COMMON as a
> 
> 	const char common_help[] = ...
> 
> and then use:
> 		ui_browser__help(..., "%s%s", common_help,
> 				is_report_browser(hbt) ? report_help : top_help);
> 
> ?

Because ui__help_window doesn't support va_arg, ok, applying this one
and later we can remove this space wastage when we make it support
variadic arguments.

- Arnaldo

  reply	other threads:[~2013-12-26 14:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26  5:37 [PATCHSET 0/8] perf tools: A couple of TUI improvements (v3) Namhyung Kim
2013-12-26  5:37 ` [PATCH 1/8] perf ui/tui: Protect windows by ui__lock Namhyung Kim
2014-01-12 18:39   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-26  5:37 ` [PATCH 2/8] perf ui/tui: Split help message for perf top and report Namhyung Kim
2013-12-26 14:05   ` Arnaldo Carvalho de Melo
2013-12-26 14:12     ` Arnaldo Carvalho de Melo [this message]
2014-01-12 18:39   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-26  5:37 ` [PATCH 3/8] perf ui/tui: Implement header window Namhyung Kim
2014-01-12 18:39   ` [tip:perf/core] " tip-bot for Namhyung Kim
2013-12-26  5:38 ` [PATCH 4/8] perf tools: Introduce struct perf_log Namhyung Kim
2013-12-26 14:50   ` Arnaldo Carvalho de Melo
2014-01-03  8:23     ` Namhyung Kim
2013-12-26 14:51   ` David Ahern
2014-01-03  8:49     ` Namhyung Kim
2013-12-26  5:38 ` [PATCH 5/8] perf tools: Save message when pr_*() was called Namhyung Kim
2013-12-26  5:38 ` [PATCH 6/8] perf ui/tui: Implement log window Namhyung Kim
2013-12-26  5:38 ` [PATCH 7/8] perf ui/tui: Filter messages in " Namhyung Kim
2013-12-26  5:38 ` [PATCH 8/8] perf ui/tui: Remember last log line for filtering Namhyung Kim

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=20131226141221.GC30980@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.