All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf trace: Sample timestamp and cpu when using record flag
Date: Thu, 17 Sep 2009 10:56:24 +0200	[thread overview]
Message-ID: <20090917085622.GA5184@nowhere> (raw)
In-Reply-To: <4AB1F827.8040905@cn.fujitsu.com>

On Thu, Sep 17, 2009 at 04:49:43PM +0800, Li Zefan wrote:
> Sample timestamp and cpu just like the -R option.
> 
> Before:
>             init-0     [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0
>             init-0     [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0
>             init-0     [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=1 handler=i8042
>             init-0     [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=18 handler=eth0
>             init-0     [-01] 1266874889.17179869184709551615: irq_handler_entry: irq=1 handler=i8042
> 
> After:
>             init-0     [001]  7364.568965353: irq_handler_entry: irq=18 handler=eth0
>             init-0     [001]  7365.530226877: irq_handler_entry: irq=1 handler=i8042
>             init-0     [001]  7365.542831563: irq_handler_entry: irq=18 handler=eth0
>             init-0     [001]  7365.644156299: irq_handler_entry: irq=18 handler=eth0
>             init-0     [001]  7365.694556201: irq_handler_entry: irq=18 handler=eth0
> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>


Acked-by: Frederic Weisbecker <fweisbec@gmail.com>


> ---
>  tools/perf/util/parse-events.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> index c9ef944..2156269 100644
> --- a/tools/perf/util/parse-events.c
> +++ b/tools/perf/util/parse-events.c
> @@ -425,8 +425,11 @@ parse_single_tracepoint_event(char *sys_name,
>  	int fd;
>  
>  	if (flags) {
> -		if (!strncmp(flags, "record", strlen(flags)))
> +		if (!strncmp(flags, "record", strlen(flags))) {
>  			attr->sample_type |= PERF_SAMPLE_RAW;
> +			attr->sample_type |= PERF_SAMPLE_TIME;
> +			attr->sample_type |= PERF_SAMPLE_CPU;
> +		}
>  	}
>  
>  	snprintf(evt_path, MAXPATHLEN, "%s/%s/%s/id", debugfs_path,
> -- 
> 1.6.3
> 


  reply	other threads:[~2009-09-17  8:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17  8:49 [PATCH] perf trace: Sample timestamp and cpu when using record flag Li Zefan
2009-09-17  8:56 ` Frederic Weisbecker [this message]
2009-09-17 22:35 ` [tip:perfcounters/core] " tip-bot for Li Zefan

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=20090917085622.GA5184@nowhere \
    --to=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.