mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: kan.liang@intel.com, acme@kernel.org, jolsa@kernel.org,
	ak@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC V5 2/4] perf,tool: per-event time support
Date: Sun, 19 Jul 2015 21:13:22 +0200	[thread overview]
Message-ID: <20150719191322.GA27893@krava.brq.redhat.com> (raw)
In-Reply-To: <20150719032128.GA24219@danjae.kornet>

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

  reply	other threads:[~2015-07-19 19:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-17 11:30 [PATCH RFC V5 0/4] per event callgrap and " kan.liang
2015-07-17 11:30 ` [PATCH RFC V5 1/4] perf,tools: introduce callgraph_set for callgraph option kan.liang
2015-07-17 11:30 ` [PATCH RFC V5 2/4] perf,tool: per-event time support kan.liang
2015-07-18 12:45   ` Jiri Olsa
2015-07-19  3:21     ` Namhyung Kim
2015-07-19 19:13       ` Jiri Olsa [this message]
2015-07-20 15:04         ` Liang, Kan
2015-07-20 17:40           ` Jiri Olsa
2015-07-21  3:39             ` Liang, Kan
2015-07-21 14:45               ` Namhyung Kim
2015-07-21 14:56                 ` Jiri Olsa
2015-07-21 14:59               ` Jiri Olsa
2015-07-17 11:30 ` [PATCH RFC V5 3/4] perf,tool: per-event callgrap support kan.liang
2015-07-17 11:30 ` [PATCH RFC V5 4/4] perf,tests: Add tests to callgrap and time parse kan.liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150719191322.GA27893@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®