On Wed, Feb 24, 2016 at 12:53:51PM +0100, Peter Zijlstra wrote:
> On Tue, Feb 23, 2016 at 06:47:41PM +0100, Peter Zijlstra wrote:
> > On Tue, Feb 23, 2016 at 10:05:50PM +0530, Pratyush Anand wrote:
> > > Its better with this patch, still count is 1 more in case of higher probe 
> > > hits (
> > > like 65535 times).
> > 
> > Ah, ok, I'll go try again.
> 
> OK, so the below seems to cure this for me, but now I'm hurting my head
> to make the same true for perf_install_in_context(), because 'tricky' :/
> 

FWIW, it would be nice to have a similar test for:

        attr = {
                .disabled = true;
        }

        sys_perf_event_open(&attr, .pid = self);

        if (attr.disabled)
                ioctl(ENABLE);

        /* generate N events */

        ioctl(DISABLE);

        read();

        /* print event cnt and scale factors */

and one that has .disabled = false.

Reply via email to