[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Instruction counting instrumentation for ARM + initial
Re: [Qemu-devel] Instruction counting instrumentation for ARM + initial patch
Wed, 20 May 2009 14:16:12 +0200
On Wed, May 20, 2009 at 12:48 PM, Paul Brook <address@hidden> wrote:
> On Tuesday 19 May 2009, Timo Töyry wrote:
>> The attached patch implements instruction counting instrumentation for
>> ARM usermode linux. Currently the patch is a working draft but we
>> intend to clean it up for possible inclusion. We'd appreciate any
>> comments. Below is a more detailed description.
> Ewww. This looks pretty much impossible to maintain.
> If you really want to do this I recommend dumping an execution trace, and
> having a third party utility do the counting after the fact.
My advice would be similar to Paul's: for my instruction counter,
instead of counting instructions, I count translation blocks. I can
either output a TB trace (which can be huge, but useful to do
trace analysis) or an execution count for each TB. As a postpass
you can do whatever you want. The benefits, on top of being easier
to maintain, are that it's more flexible, it has a very small impact on
QEMU execution time, and it can be trivially ported to any front end.
The problem is to play nicely with TB flushes :-)