lkml.org 
[lkml]   [2012]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] perf, ibs: Check syscall attribute flags
    On 07.09.12 10:50:35, David Ahern wrote:
    > On 9/7/12 10:41 AM, Robert Richter wrote:
    > > + struct perf_event_attr notsupp = {
    > > + .exclude_user = 1,
    > > + .exclude_kernel = 1,
    > > + .exclude_hv = 1,
    > > + .exclude_idle = 1,
    > > + .exclude_host = 1,
    > > + .exclude_guest = 1,
    > > + };
    > >
    > > perf_ibs = get_ibs_pmu(event->attr.type);
    > > if (perf_ibs) {
    > > @@ -229,6 +237,9 @@ static int perf_ibs_init(struct perf_event *event)
    > > if (event->pmu != &perf_ibs->pmu)
    > > return -ENOENT;
    > >
    > > + if (perf_flags(&event->attr) & perf_flags(&notsupp))
    > > + return -EINVAL;
    > > +
    >
    > Am I reading this right - if exclude_guest is set then perf_ibs_init
    > returns -EINVAL?

    Yes, the hardware does not support this. I will look for a solution
    which emulates this is software.

    -Robert

    --
    Advanced Micro Devices, Inc.
    Operating System Research Center



    \
     
     \ /
      Last update: 2012-09-07 20:03    [W:0.052 / U:0.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site