qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Luis Useche <luis@cs.fiu.edu>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Memory Traces for System Simulation
Date: Thu, 18 Jun 2009 17:20:05 +0200	[thread overview]
Message-ID: <20090618152005.GC16663@edde.se.axis.com> (raw)
In-Reply-To: <20090617215018.GA32029@meg.local>

On Wed, Jun 17, 2009 at 05:50:18PM -0400, Luis Useche wrote:
> Hi Guys,

Hello Luis,

> I have been trying the last two days to find the correct places in the
> qemu code to trace the memory accesses in the running system. The qemu
> code is somewhat confusing and there are plenty of places that look like
> the correct trace point.
> 
> I know that there exist plenty of threads about this matter in the list
> but non of them solve my problem.
> 
> Some people suggested to use Argos (http://www.few.vu.nl/argos/) to get
> this information. There are two problems with this: (1) There is no clear
> documentation on how to do this in Argos (2) The code seems outdated and
> does not compile in systems with gcc>=4.
> 
> There is also a patch for qemu 0.8 but it does not apply anymore.
> http://www.csl.cornell.edu/~vince/projects/qemu-trace/old/.
> 
> At the moment, I am instrumenting several functions in exec.c as my trace
> points:
> 	ldl_phys
> 	ldq_phys
> 	ldup_phys
> 	lduw_phys
> 	stl_phys_notdirty
> 	stq_phys_notdirty
> 	stl_phys
> 	stb_phys
> 	stw_phys
> 	stq_phys

Depending on what you want to do and on your cache arch you might need
to log both virtual and physical addresses. I don't know what the best
place to hook in would be though.

> I would really appreciate any suggestion you have in order to solve my
> problem. If you have any insights in the solutions I explained above I
> would be very thankful.
> 
> Given that many people seems to be having the same problem than I, it
> would be nice to have an actual framework that add this functionality to
> qemu. I can offer myself to do that as long as I have enough help.
> 
> As a parallel question: Does qemu simulate CPU cache? i.e. There is always

Nope.

> memory access even when this would not happen in a real system due to CPU
> cache?

Yes correct.

I've got a pretty nasty hack that online emulates controller and tag
memories. I find it useful for profiling and for some debugging. The data
memories are not emulated so accesses are never absorbed. I don't think
it's very useful for scientific purposes..

Anyway, it kind of works for CRIS and MicroBlaze. Feel free to look around
on the cris git at your own risk :)
git://repo.or.cz/qemu/cris-port.git

Cheers

  parent reply	other threads:[~2009-06-18 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 21:50 [Qemu-devel] Memory Traces for System Simulation Luis Useche
2009-06-18 14:28 ` Luis Useche
2009-06-18 15:20 ` Edgar E. Iglesias [this message]
2009-06-18 19:48   ` Luis Useche
2009-06-18 21:18     ` Edgar E. Iglesias

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=20090618152005.GC16663@edde.se.axis.com \
    --to=edgar.iglesias@gmail.com \
    --cc=luis@cs.fiu.edu \
    --cc=qemu-devel@nongnu.org \
    /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).