lkml.org 
[lkml]   [2011]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/9] perf, core: Introduce attrs to count in either host or guest mode
    Date
    From: Joerg Roedel <joerg.roedel@amd.com>

    The two new attributes exclude_guest and exclude_host can
    bes used by user-space to tell the kernel to setup
    performance counter to either only count while the CPU is in
    guest or in host mode.
    An additional check is also introduced to make sure
    user-space does not try to exclude guest and host mode from
    counting.

    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    ---
    include/linux/perf_event.h | 5 ++++-
    1 files changed, 4 insertions(+), 1 deletions(-)

    diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
    index c816075..1e9ebe5 100644
    --- a/include/linux/perf_event.h
    +++ b/include/linux/perf_event.h
    @@ -220,7 +220,10 @@ struct perf_event_attr {
    mmap_data : 1, /* non-exec mmap data */
    sample_id_all : 1, /* sample_type all events */

    - __reserved_1 : 45;
    + exclude_host : 1, /* don't count in host */
    + exclude_guest : 1, /* don't count in guest */
    +
    + __reserved_1 : 43;

    union {
    __u32 wakeup_events; /* wakeup every n events */
    --
    1.7.5.3


    \
     
     \ /
      Last update: 2011-10-03 15:55    [W:0.032 / U:95.448 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site