lkml.org 
[lkml]   [2011]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 0/4] perf: Custom contexts
On Mon, Mar 14, 2011 at 05:43:41PM -0300, Arnaldo Carvalho de Melo wrote:
> 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


Agreed that's nice but may be more as a shortcut than a full replacement?
Otherwise it becomes hard or unreadable to define a filter on a starter. Or
a starter on a starter.


\
 
 \ /
  Last update: 2011-03-14 21:53    [W:0.106 / U:2.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site