Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1187771
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jiri Olsa <jolsa@redhat.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC V5 2/4] perf,tool: per-event time support |
| Date | Sun, 19 Jul 2015 21:20:03 +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> |
| X-Original-To | Namhyung Kim <namhyung@kernel.org> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-Scanned-By | MIMEDefang 2.68 on 10.5.11.22 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 77 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | kan.liang@intel.com, acme@kernel.org, jolsa@kernel.org, ak@linux.intel.com, linux-kernel@vger.kernel.org |
| X-Original-Date | Sun, 19 Jul 2015 21:13:22 +0200 |
| X-Original-Message-ID | <20150719191322.GA27893@krava.brq.redhat.com> |
| X-Original-References | <1437132655-15883-1-git-send-email-kan.liang@intel.com> <1437132655-15883-3-git-send-email-kan.liang@intel.com> <20150718124547.GA3759@krava.brq.redhat.com> <20150719032128.GA24219@danjae.kornet> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1187771 |
Show key headers only | View raw
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