Skip to contentSkip to conversation

checking the number of target cpu cycles or instructions executed

Qemu-devel Stefano Bonifazi 2 participants 3 messages Dec 22, 2010 – Dec 23, 2010

lore
Share & tools
lore
#0 lore raw

Hi all! :)
how can I check the number of target cpu cycles or target instructions
executed inside qemu-user (i.e. qemu-ppc)?
Is there any variable I can inspect for such informations? Thank you very much in advance!
Stefano B.

#1 lore raw

Hi,

Am 22.12.2010 um 13:19 schrieb Stefano Bonifazi:

Quoted 2 lines

how can I check the number of target cpu cycles or target instructions executed inside qemu-user (i.e. qemu-ppc)? Is there any variable I can inspect for such informations?

QEMU's emulation is not cycle-accurate, so you will not be able to retrieve CPU cycle info to my knowledge.

As for instructions, take a look at the -icount option.

Andreas

#2 lore raw
Quoted 4 lines · Andreas Färber

Hi,

Am 22.12.2010 um 13:19 schrieb Stefano Bonifazi:

Quoted 8 lines
Quoted 2 lines

how can I check the number of target cpu cycles or target instructions executed inside qemu-user (i.e. qemu-ppc)? Is there any variable I can inspect for such informations?

QEMU's emulation is not cycle-accurate, so you will not be able to retrieve CPU cycle info to my knowledge.

As for instructions, take a look at the -icount option.

Andreas

Hi!
Thank You very much! I understood it was not a cycle accurate
emulator.. In my case I am more interested in how many instructions the target machine would execute rather than how many host cycles or instructions..so I think counted fetched target instructions can be good.. Anyway how to switch on -icount option for user emulation? Setting use_icount to 1 (or2) into exec.c does not work: the execution hangs, and qemu_icount is not incremented.. Thank you!
Best Regards,
Stefano B.