[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Any approach to log the file read/write (I/O data flow)

From: Yue Chen
Subject: Re: [Qemu-devel] Any approach to log the file read/write (I/O data flow) like the "-d in_asm" option?
Date: Sun, 3 Jun 2012 16:50:04 -0400

I'm doing something like a simple and lightweight REPLAY program out of QEMU, only including CPU, MEMORY, and DISK. I'm implementing it with a shadow CPU (register state), shadow memory(from "pmemsave") and shadow ".img" file (disk). 

When I get the "log exec,op"(preferred) or "log exec,in_asm" instruction traces from monitor in whole-system emulation mode, the final step to replay read/write a file to/from the disk seems the "in/ins" and "out/outs" instructions(translated into a CALL instruction in Intermediate Representation of QEMU), which can set DMA and transfer data. 

But from the instruction traces, I don't know which location in the ".img" file (disk) has been accessed. (It's also hard to find out which file has been read/written in higher semantics.) Any easy approach to do this? Thanks so much.

On Fri, Jun 1, 2012 at 4:09 AM, Stefan Hajnoczi <address@hidden> wrote:
On Fri, Jun 1, 2012 at 4:11 AM, Yue Chen <address@hidden> wrote:
> Any approach to log all the file read/write (I/O data flow) in order,
> together with the instruction traces in QEMU? Thanks.

It sounds like you may be running a *-user target because softmmu
(system emulation) has no knowledge of file I/O inside the guest.
Please give more details of what you're trying to do if this is

It sounds like you want strace together with -d in_asm output.  Have
you seen linux-user/strace.c?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]