Performance Counter Addresses

Downing, Evan P edowning3 at gatech.edu
Sun Oct 4 23:41:04 UTC 2015


Yes, I am running rr inside of QEMU using CPU emulation mode.


Ah, I did not know QEMU's CPU emulation did not support these counters.

I know there is an out-of-tree patch to support PMU, but it's only for KVM I believe: http://www.linux-kvm.org/page/Guest_PMU


A project I am working on was written on top of QEMU 1.0.1 a few years ago.

However, this project does not support KVM.

For various reasons, I need to be able to use Mozilla's rr inside of a Linux instance on this old version of QEMU (that is, without using KVM).


Wouldn't there be a way to leverage QEMU's "icount" parameter in order to simulate the retired instruction counter parameter used in rr?

The only engineering effort left would be to figure out how to set a counter for recording hardware interrupts, correct?


Or maybe I could write a linux kernel module that could keep a running count of the instructions and hardware interrupts somewhere in memory (inside of the Guest Linux instance) and have rr access those memory addresses whenever it wants?


Thanks,

Evan


________________________________
From: rocallahan at gmail.com <rocallahan at gmail.com> on behalf of Robert O'Callahan <robert at ocallahan.org>
Sent: Sunday, October 4, 2015 6:45 PM
To: Downing, Evan P
Cc: rr-dev at mozilla.org
Subject: Re: Performance Counter Addresses

On Sat, Oct 3, 2015 at 5:51 AM, Downing, Evan P <edowning3 at gatech.edu<mailto:edowning3 at gatech.edu>> wrote:
I am interested in using Mozilla rr on an older version of QEMU.

To clarify: you are interested in running rr *inside* QEMU running in CPU emulation mode, correct?


Would you mind telling me how to go about finding these addresses for "Intel Merom" and if this idea of mine will even work for rr?

My guess is it will not work, because as far as I know, QEMU's CPU emulation does not support performance counters.

If you tell us what your ultimate goal is, we might be able to offer better advice.

Rob
--
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr  esn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20151004/c30768f9/attachment.html>


More information about the rr-dev mailing list