Performance Counter Addresses
me at kylehuey.com
Mon Oct 5 00:39:09 UTC 2015
On Sun, Oct 4, 2015 at 5:35 PM, Downing, Evan P <edowning3 at gatech.edu> wrote:
> Responses inline:
>>> rr doesn't depend on the interrupt counter.
> If rr does not depend on the hardware interrupt counter, then why is it
> being used in rr's source code?
We don't use them by default. There is a flag in PerfCounters.h
determining whether or not to use the extra counters. I think this is
mostly a legacy of early experiments to move from
retired-conditional-branches to instructions-retired that are
essentially abandoned at this stage.
>>> It probably wouldn't be very hard to extend QEMU with code to count the
>>> number of retired conditional branches, and an interface to expose that
>>> count to rr (which needs to be able to
>>> read the counter value, reset the counter value to some value, and
>>> trigger an interrupt when the counter value reaches zero). Using the actual
>>> x86 PMU interface might be best since then
>>> you wouldn't have to modify the kernel.
> Very interesting. Thanks!
> I agree that it would be easier to use x86 PMU, but that requires KVM and my
> project is not compatible with KVM. Am I correct?
>>> However, I still don't know what your ultimate goal is, but you might be
>>> better off forward-porting your code to a newer version of QEMU and using
>>> something like PANDA
>>> (https://github.com/moyix/panda) which supports record and replay built
>>> into QEMU.
> Thanks for the advice!
> Unfortunately, I need to use rr though for this specific project.
Can you use rr *outside* of QEMU? And just record all of QEMU?
More information about the rr-dev