qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/12] trace: [tcg] Allow tracing guest events i


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 00/12] trace: [tcg] Allow tracing guest events in TCG-generated code
Date: Tue, 04 Feb 2014 07:17:22 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 02/04/2014 07:02 AM, Peter Maydell wrote:
> On 4 February 2014 14:57, Richard Henderson <address@hidden> wrote:
>> I suppose I have no major objection to the feature, although frankly it's
>> not especially exciting.  I can't really imagine ever wanting to bulk trace
>> all of the helpers.  Tracing specific helpers on a target-by-target basis,
>> sure.  But that can be done just as easily as adding tracing code to any
>> other bit of C.
> 
> I think the things people seem to actually want (judging
> from occasional postings to the list) are things like:
>  * trace all guest memory accesses
>  * trace all guest instruction executions
> 
> Does this patchset get us usefully towards that kind of thing?
> Not sure...

If that's the goal, I would suggest that they do not.  One does not need to
hook all of the helpers in order to achieve that.

A hook in tcg_gen_qemu_{ld,st}_i{32,64} to (conditionally) emit a call to a
helper to log the access gets you all (non-execution) guest memory accesses.

Guest instruction executions is quite a bit harder, of course.  But any start
in that direction could be done through a pair of trace events: Log the insn
address range covered by a TB + a uuid at translation time; log the uuid at the
start of execution of the TB.  A script should be able to put the two together
to complete the trace.


r~




reply via email to

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