Re: [PATCH 5/5 v2] perf timechart: add emphasize option

From: Ingo Molnar
Date: Tue Dec 17 2013 - 08:13:00 EST



* Stanislav Fomichev <stfomichev@xxxxxxxxxxxxxx> wrote:

> > Please give a sample usage command line and a sample output. (the
> > highlighting can be done using ASCII escape sequences in the changelog
> > as well.)
> Highlighting is done in the generated SVG, so I can't really show it in
> the log or documentation. But I added simple example with -e option.
>
> > -e::
> > --emphasize=<duration_nsecs|task_name>::
> Thanks, added.
>
> > It's also not made clear that the option can take a numeric input, and
> > if the input is numeric, it is interpreted as a task name.
> >
> > So please make features more approachable!
> Added more info to the documentation.
>
> Attached new patch below.
>
> ---
>
> This option highlights tasks (using different color) that run more than given
> duration or tasks with given name.
>
> Signed-off-by: Stanislav Fomichev <stfomichev@xxxxxxxxxxxxxx>
> ---
> tools/perf/Documentation/perf-timechart.txt | 14 ++++++++++++++
> tools/perf/builtin-timechart.c | 21 ++++++++++++++++++++-
> tools/perf/util/svghelper.c | 23 ++++++++++++++++++++---
> tools/perf/util/svghelper.h | 4 +++-
> 4 files changed, 57 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/Documentation/perf-timechart.txt b/tools/perf/Documentation/perf-timechart.txt
> index 367c1be0551c..b81e91dd16ce 100644
> --- a/tools/perf/Documentation/perf-timechart.txt
> +++ b/tools/perf/Documentation/perf-timechart.txt
> @@ -56,12 +56,26 @@ $ perf timechart
>
> Written 10.2 seconds of trace to output.svg.
>
> +Record system-wide timechart:
> +
> + $ perf timechart record
> +
> + then generate timechart and highlight 'gcc' tasks:
> +
> + $ perf timechart -e gcc
> +
> -n::
> --proc-num::
> Print task info for at least given number of tasks.
> -t::
> --topology::
> Sort CPUs according to topology.
> +-e::
> +--emphasize=<duration_nsecs|task_name>::
> + Highlight tasks (using different color) that run more than given
> + duration or tasks with given name. If number is given it's interpreted
> + as number of nanoseconds. If non-numeric string is given it's
> + interpreted as task name.

Looks good to me, thanks!

Acked-by: Ingo Molnar <mingo@xxxxxxxxxx>

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/