[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150719191322.GA27893@krava.brq.redhat.com>
Date: Sun, 19 Jul 2015 21:13:22 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: kan.liang@...el.com, acme@...nel.org, jolsa@...nel.org,
ak@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC V5 2/4] perf,tool: per-event time support
On Sun, Jul 19, 2015 at 12:21:28PM +0900, Namhyung Kim wrote:
SNIP
> >
> > [jolsa@...va perf]$ ./perf record -e 'cpu/cpu-cycles/,cpu/instructions,time/' kill
> > ...
> > [jolsa@...va perf]$ ./perf evlist -v
> > cpu/cpu-cycles/: type: 4, size: 112, config: 0x3c, { sample_period, sample_freq }: 4000, sample_type: IP|TID|PERIOD|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
> > cpu/instructions,time/: type: 4, size: 112, config: 0xc0, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, read_format: ID, disabled: 1, inherit: 1, freq: 1, enable_on_exec: 1, sample_id_all: 1, exclude_guest: 1
>
> What about this case?
>
> $ perf record -e 'cpu/cpu-cycles/,cpu/instructions,time=0/' kill
right.. hum, we need somehow separate/pospone the users term application
to the final perf_event_attr.. spent some time on it today, but could not
find any nice solution so far.. will try tomorrow ;-)
SNIP
> > + * If time (-T) is not set and we have events with TIME sample_type
> > + * set (tracepoints or events with time term), disable timestamp for
> > + * the rest of the events.
> > + */
> > + if (!opts->sample_time_set && perf_evlist__has_time(evlist))
> > + opts->sample_time = false;
>
> I think it'd be better if the -T/--timestamp option gives the default
> TIME sample_type value but it can be overridden by per-event setting.
>
> I mean:
>
> (per-event 'time' setting is meaningless here)
> $ perf record -e 'cpu/cpu-cycles/,cpu/instructions,time/' kill
>
> $ perf evlist -v
> cpu/cpu-cycles/: ..., sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, ...
> cpu/instructions,time/: ..., sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, ...
>
>
> (adding -T option, same as the default)
> $ perf record -T -e 'cpu/cpu-cycles/,cpu/instructions,time/' kill
>
> $ perf evlist -v
> cpu/cpu-cycles/: ..., sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, ...
> cpu/instructions,time/: ..., sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, ...
>
> $ perf record -T -e 'cpu/cpu-cycles/,cpu/instructions,time=0/' kill
>
> $ perf evlist -v
> cpu/cpu-cycles/: ..., sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, ...
> cpu/instructions,time/: ..., sample_type: IP|TID|PERIOD|IDENTIFIER, ...
>
>
> (adding --no-timestamp option)
> $ perf record --no-timestamp -e 'cpu/cpu-cycles/,cpu/instructions/' kill
>
> $ perf evlist -v
> cpu/cpu-cycles/: ..., sample_type: IP|TID|PERIOD|IDENTIFIER, ...
> cpu/instructions,time/: ..., sample_type: IP|TID|PERIOD|IDENTIFIER, ...
>
> $ perf record --no-timestamp -e 'cpu/cpu-cycles/,cpu/instructions,time=1/' kill
>
> $ perf evlist -v
> cpu/cpu-cycles/: ..., sample_type: IP|TID|PERIOD|IDENTIFIER, ...
> cpu/instructions,time/: ..., sample_type: IP|TID|TIME|PERIOD|IDENTIFIER, ...
agreed
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists