Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1187771
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC V5 2/4] perf,tool: per-event time support |
| Date | 2015-07-19 21:20 +0200 |
| Message-ID | <pO2hZ-3q1-71@gated-at.bofh.it> (permalink) |
| References | <pNiRQ-5mc-5@gated-at.bofh.it> <pNiRQ-5mc-19@gated-at.bofh.it> <pNzIZ-4m9-15@gated-at.bofh.it> <pNNsB-7kS-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Jul 19, 2015 at 12:21:28PM +0900, Namhyung Kim wrote:
SNIP
> >
> > [jolsa@krava perf]$ ./perf record -e 'cpu/cpu-cycles/,cpu/instructions,time/' kill
> > ...
> > [jolsa@krava 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH RFC V5 2/4] perf,tool: per-event time support Namhyung Kim <namhyung@kernel.org> - 2015-07-19 05:30 +0200
Re: [PATCH RFC V5 2/4] perf,tool: per-event time support Jiri Olsa <jolsa@redhat.com> - 2015-07-19 21:20 +0200
Re: [PATCH RFC V5 2/4] perf,tool: per-event time support Jiri Olsa <jolsa@redhat.com> - 2015-07-20 19:50 +0200
csiph-web