qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
	"Yufei Chen" <cyfdecyf@gmail.com>, Lluís <xscript@gmx.net>,
	"Eduardo Cruz" <eduardohmdacruz@gmail.com>,
	"Jun Koi" <junkoi2004@gmail.com>
Subject: Re: [Qemu-devel] [RFC] Static instrumentation (aka guest code tracing)
Date: Fri, 26 Nov 2010 19:06:31 +0000	[thread overview]
Message-ID: <201011261906.32380.paul@codesourcery.com> (raw)
In-Reply-To: <86ocdj74qd.wl%lluis@ginnungagap.pc.ac.upc.edu>

> 2) instrumenting i386 is extremely time-consuming (for the developer)
> 
> As my work is not tied to a specific target architecture, I was thinking of
> shifting into PPC, as the ISA is pretty regular and that would certainly
> make the process easier by just patching a small set of places in the
> code.
> 
>... 
> The current example points are:
> 
> FETCH(vaddress, size, used_registers, defined_registers)

Duplicating the insn decoder to determine which registers are accessed is not 
a maintainable solution. Likewise requiring separate tracing hooks be added to 
the existing decoders is extremely unlikely to be a feasible long-term 
solution. Anything solution that tries to separate CPU instrumentation/tracing 
from code generation is IMO fundamentally flawed and will rapidly bitrot 
beyond usefulness.

I'd also posit that instrumenting changes in sate is of very limited use if 
you don't know what the new value is.

You almost certainly want to do this using the equivalent of a memory 
watchpoint on the CPUState structure.

Paul

  reply	other threads:[~2010-11-26 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 21:42 [Qemu-devel] [RFC] Static instrumentation (aka guest code tracing) Lluís
2010-11-26 19:06 ` Paul Brook [this message]
2010-11-26 20:19   ` Lluís
2010-11-26 21:33     ` Paul Brook
2010-11-29 15:04       ` Lluís

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201011261906.32380.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=cyfdecyf@gmail.com \
    --cc=eduardohmdacruz@gmail.com \
    --cc=junkoi2004@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=xscript@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).