lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090917085622.GA5184@nowhere>
Date:	Thu, 17 Sep 2009 10:56:24 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf trace: Sample timestamp and cpu when using record
	flag

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@...fujitsu.com>


Acked-by: Frederic Weisbecker <fweisbec@...il.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
> 

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ