lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC 00/21] perf tools: Add toggling events support

    * Andi Kleen <ak@linux.intel.com> wrote:

    > On Wed, Sep 25, 2013 at 02:50:26PM +0200, Jiri Olsa wrote:
    > > hi,
    > > sending *RFC* for toggling events support.
    > >
    > > Adding perf interface that allows to create toggle events, which can
    > > enable or disable another event. Whenever the toggle event is triggered
    > > (has overflow), it toggles another event state and either starts or
    > > stops it.
    > >
    > > The goal is to be able to create toggling tracepoint events to enable and
    > > disable HW counters, but the interface is generic enough to be used for
    > > any kind of event.
    >
    > Haven't read the patches, but frequent full event switch in/out seems
    > very expensive. If someone puts that switch on a common function it
    > would likely disturb things quite a bit.
    >
    > It would be better to keep counting and just do RDPMC on the switch
    > points, and then subtract for counting. For sampling could need a MSR
    > write to enable/disable. Still somewhat expensive, but nowhere near as
    > bad as a full switch.

    This is essentially an optimized event switch and should probably be done
    on a higher level so that other instances of event/context switching
    benefit as well.

    Thanks,

    Ingo


    \
     
     \ /
      Last update: 2013-09-26 09:21    [W:4.315 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site