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]
Date:	Mon, 14 Mar 2011 17:43:41 -0300
From:	Arnaldo Carvalho de Melo <acme@...radead.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Stephane Eranian <eranian@...gle.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Subject: Re: [RFC PATCH 0/4] perf: Custom contexts

Em Mon, Mar 14, 2011 at 08:17:59PM +0100, Frederic Weisbecker escreveu:
> Some examples:
> 
> - Trace lock events inside irqs
> 
> 	$ perf record -e irq:irq_handler_entry -e irq:irq_handler_exit \
> 		-e lock:lock_acquire --starter 0 --stopper 1 --enable-on-starter \
> 		perf bench sched messaging

A more compact alternative that uses .. to delimit ranges (start and/or
stop), like git does for changeset ranges and @ to determine where to
enable the event:

perf record -e instructions@irq:irq_handler_entry..irq:irq_handler_exit \
	perf bench sched messaging

event-A at-range event-B to event-C

open ended ranges being possible as well, i.e. start counting when
event-B triggers and stop only when the workload finishes, or count from
workload start till event-C triggers.
 		
> 	$ perf script
> 	
> 	perf-4300  [000]  2000.209721: irq_handler_entry: irq=40 name=ahci
>       perf-4300  [000]  2000.209725: lock_acquire: 0xffff880037851c40 &(&host->lock)->rlock
>       perf-4300  [000]  2000.209731: irq_handler_exit: irq=40 ret=handled
>       perf-4300  [000]  2000.209821: irq_handler_entry: irq=40 name=ahci
>       perf-4300  [000]  2000.209823: lock_acquire: 0xffff880037851c40 &(&host->lock)->rlock
>       perf-4300  [000]  2000.209828: irq_handler_exit: irq=40 ret=handled
> - Count instructions inside softirqs, outside softirqs and everywhere:
> 
> 	$ perf stat -e irq:softirq_entry -e irq:softirq_exit \
> 		-e instructions --starter 0 --stopper 1 --enable-on-starter \
> 		-e instructions --starter 1 --stopper 0 \
> 		-e instructions ./perf bench sched messaging

$ perf record -e instructions@irq:softirq_entry..irq:softirq_exit \
	      -e instructions@irq:softirq_exit..irq:softirq_entry \
	      -e instructions \
	perf bench sched messaging

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