Re: [PATCH v7 5/6] perf report: support time percent and multiple time ranges

From: Arnaldo Carvalho de Melo
Date: Mon Jan 08 2018 - 10:02:41 EST


Em Mon, Jan 08, 2018 at 11:53:36AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Dec 08, 2017 at 09:13:45PM +0800, Jin Yao escreveu:
> > perf report has a --time option to limit the time range of output.
> > It only supports absolute time.
> >
> > Now this option is extended to support multiple time ranges and
> > support the percent of time.
> >
> > For example:
> >
> > 1. Select the first and second 10% time slices
> > perf report --time 10%/1,10%/2
> >
> > 2. Select from 0% to 10% and 30% to 40% slices
> > perf report --time 0%-10%,30%-40%

So now it works, but we need to improve the error messages, i.e. if one
does:

perf report --time 10%

should this be equivalent to:

perf report --time 10%/1

?

Or at least say something like:

"percent slices need an index to specify which one is wanted"

when you notice a % in the --time string, etc.

Consider these for follow up patches.

- Arnaldo