lkml.org 
[lkml]   [2012]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] perf tools: Use sw counter only if hw pmu is not detected
On 05.04.12 10:59:04, David Ahern wrote:
> On 4/5/12 10:26 AM, Robert Richter wrote:
> > Use cpu-clock-tick sw counter for cpu-cycles only if there is no hw
> > pmu available. This is the case if the syscall reports ENOENT. In
> > other cases (e.g. invalid attributes) we don't want the sw counter to
> > be used.
>
> Isn't the invalid attributes case handled by the
> '} else if (err == EINVAL) {'
> case before this switch is done?

Yes, but it does not jump out the code path. It is only doing some
diagnostics and retries the syscall with some modified attributes or
so.

I had have the case what a syscall failed due to invalid attributes
and then the sw counter was setup. I got odd results and I needed some
time debugging this to realize what was going on.

-Robert

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



\
 
 \ /
  Last update: 2012-04-05 19:21    [W:0.652 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site