On 02/04/2014 07:02 AM, Peter Maydell wrote:
> On 4 February 2014 14:57, Richard Henderson <r...@twiddle.net> 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