qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] profiling software execution using qemu
@ 2010-10-03 19:02 Bahadir Balban
  2010-10-04 12:18 ` Lluís
  0 siblings, 1 reply; 2+ messages in thread
From: Bahadir Balban @ 2010-10-03 19:02 UTC (permalink / raw)
  To: qemu-devel

I would like to trace instruction execution using QEMU. Is this
possible?

Ideally I would like to dump all executed instruction locations to a
file, then match this information to function names based on the debug
symbols in my ELF file, then finally analyze the parts that execute the
most. Is this possible with qemu? Anyone who did this kind of work?

Thanks,

-- 
Bahadir Balban

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] profiling software execution using qemu
  2010-10-03 19:02 [Qemu-devel] profiling software execution using qemu Bahadir Balban
@ 2010-10-04 12:18 ` Lluís
  0 siblings, 0 replies; 2+ messages in thread
From: Lluís @ 2010-10-04 12:18 UTC (permalink / raw)
  To: Bahadir Balban; +Cc: qemu-devel

Bahadir Balban writes:

> I would like to trace instruction execution using QEMU. Is this
> possible?

> Ideally I would like to dump all executed instruction locations to a
> file, then match this information to function names based on the debug
> symbols in my ELF file, then finally analyze the parts that execute the
> most. Is this possible with qemu? Anyone who did this kind of work?

If you want it for x86, you might use this (I still haven't inserted
points for other architectures):

   git clone https://code.gso.ac.upc.edu/git/qemu-instrument
   https://projects.gso.ac.upc.edu/projects/qemu-instrument

This is just a set of static instrumentation points, what to do with
them is up to you. If you just want tracing the addresses you could
simply define a INSTR_GEN_FETCH that calls a helper you must define
that, in turn, writes your information into disk by any means you see
fit.

Note that this is just a proof of concept, so in the worst case it can
give you some hints on where to look for the information that you want.

Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-04 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-03 19:02 [Qemu-devel] profiling software execution using qemu Bahadir Balban
2010-10-04 12:18 ` Lluís

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).