[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1608180025420.8191@macbook-air>
Date: Thu, 18 Aug 2016 00:32:25 -0400 (EDT)
From: Vince Weaver <vincent.weaver@...ne.edu>
To: Peter Zijlstra <peterz@...radead.org>
cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: perf: rdpmc and PERF_EVENT_IOC_RESET
On Wed, 17 Aug 2016, Peter Zijlstra wrote:
> Hurm.. I never considered using RESET with rdpmc(). The typical usage of
> rdpmc() I considered is something like:
I'm finally trying to hook up PAPI to properly use rdpmc and PAPI likes to
use IOC_RESET in various places. I can just special case to not do so
when in rdpmc mode, but I got curious if RESET was expected to work.
> But the rdpmc user function should:
> ...
>
> Which sign-extends the RDPMC result and adds it to userpg->offset,
> resulting in a positive number again.
I will have to check to see if PAPI is using the proper code.
What happens is the procesed result has bit 49 set for some reason, so the
results are 2^49 too big. I've been trying to track it down, but the PAPI
code is a bit of a mess (to put it mildly).
Vince
Powered by blists - more mailing lists