mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Stanislav Fomichev <stfomichev@yandex-team.ru>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
	acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] perf timechart: add support for displaying only tasks related data
Date: Tue, 29 Oct 2013 17:10:06 +0900	[thread overview]
Message-ID: <87ppqo5wgx.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <1382439412-23713-4-git-send-email-stfomichev@yandex-team.ru> (Stanislav Fomichev's message of "Tue, 22 Oct 2013 14:56:49 +0400")

On Tue, 22 Oct 2013 14:56:49 +0400, Stanislav Fomichev wrote:
> In order to make SVG smaller and faster to browse add possibility to
> switch off power related information with -T switch.
>
> Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru>
> ---
>  tools/perf/builtin-timechart.c | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
> index e6c041301aa4..c7b30a8c7f3b 100644
> --- a/tools/perf/builtin-timechart.c
> +++ b/tools/perf/builtin-timechart.c
> @@ -41,6 +41,7 @@
>  #define PWR_EVENT_EXIT -1
>  
>  static int proc_num = 15;
> +static bool no_power;
>  
>  
>  static unsigned int	numcpus;
> @@ -967,7 +968,8 @@ static void write_svg_file(const char *filename)
>  	draw_cpu_usage();
>  	if (proc_num)
>  		draw_process_bars();
> -	draw_c_p_states();
> +	if (!no_power)
> +		draw_c_p_states();

Hmm.. double negation is always confusing to me. :-/  How about making
it a boolean option that sets "task_only" variable?


>  	if (proc_num)
>  		draw_wakeups();
>  
> @@ -1076,6 +1078,15 @@ static int __cmd_record(int argc, const char **argv)
>  }
>  
>  static int
> +parse_tasks(const struct option *opt __maybe_unused,
> +	    const char *arg __maybe_unused,
> +	    int unset __maybe_unused)
> +{
> +	no_power = 1;
> +	return 0;
> +}
> +
> +static int
>  parse_process(const struct option *opt __maybe_unused, const char *arg,
>  	      int __maybe_unused unset)
>  {
> @@ -1103,6 +1114,8 @@ int cmd_timechart(int argc, const char **argv,
>  	OPT_INTEGER('w', "width", &svg_page_width, "page width"),
>  	OPT_CALLBACK_NOOPT('P', "power-only", NULL, NULL,
>  		     "output power data only", parse_power),
> +	OPT_CALLBACK_NOOPT('T', "tasks-only", NULL, NULL,
> +		     "output processes data only", parse_tasks),

Also need to update the doc.  And what if user gives -P and -T options
at the same time?

Thanks,
Namhyung


>  	OPT_CALLBACK('p', "process", NULL, "process",
>  		      "process selector. Pass a pid or process name.",
>  		       parse_process),

  reply	other threads:[~2013-10-29  8:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 10:56 [PATCH 0/6] perf timechart improvements Stanislav Fomichev
2013-10-22 10:56 ` [PATCH 1/6] perf timechart: always try to print at least 15 tasks Stanislav Fomichev
2013-10-29  7:50   ` Namhyung Kim
2013-10-29  9:24     ` Stanislav Fomichev
2013-11-01  6:06       ` Namhyung Kim
2013-10-22 10:56 ` [PATCH 2/6] perf timechart: use proc_num to implement --power-only Stanislav Fomichev
2013-10-29  8:03   ` Namhyung Kim
2013-10-29  9:28     ` Stanislav Fomichev
2013-11-01  6:07       ` Namhyung Kim
2013-10-22 10:56 ` [PATCH 3/6] perf timechart: add support for displaying only tasks related data Stanislav Fomichev
2013-10-29  8:10   ` Namhyung Kim [this message]
2013-10-29  9:33     ` Stanislav Fomichev
2013-11-01  6:10       ` Namhyung Kim
2013-10-22 10:56 ` [PATCH 4/6] perf timechart: group figures and add title with details Stanislav Fomichev
2013-10-29  8:15   ` Namhyung Kim
2013-10-29  9:35     ` Stanislav Fomichev
2013-10-22 10:56 ` [PATCH 5/6] perf timechart: add support for -P and -T in timechart recording Stanislav Fomichev
2013-10-29  8:27   ` Namhyung Kim
2013-10-29  9:51     ` Stanislav Fomichev
2013-10-22 10:56 ` [PATCH 6/6] perf timechart: add backtrace support Stanislav Fomichev
2013-10-29  8:41   ` 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=87ppqo5wgx.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=stfomichev@yandex-team.ru \
    /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

all inboxes | Powered by JetHome®