qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypert


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace"
Date: Thu, 18 Aug 2016 12:32:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Stefan Hajnoczi writes:

> On Fri, Aug 05, 2016 at 06:59:34PM +0200, Lluís Vilanova wrote:
>> +# hypertrace
>> +hyperargs=$hypertrace
>> +if test $hypertrace = "disabled"; then
>> +    hyperargs=0
>> +fi
>> +echo "CONFIG_HYPERTRACE_ARGS=$hyperargs" >> $config_host_mak
>> +hypertrace_events=hypertrace/trace-events
>> +mkdir -p $(dirname $hypertrace_events)
>> +echo "# See docs/trace-events.txt for syntax documentation." 
>> >$hypertrace_events
>> +echo -n 'vcpu guest_hypertrace(' >>$hypertrace_events
>> +for i in `seq $hypertrace`; do
>> +    if test $i != 1; then
>> +        echo -n ", " >>$hypertrace_events
>> +    fi
>> +    echo -n "uint64_t arg$i" >>$hypertrace_events
>> +done
>> +echo -n ') ' >>$hypertrace_events
>> +for i in `seq $hypertrace`; do
>> +    echo -n "\" arg$i=0x%016\"PRIx64" >>$hypertrace_events
>> +done
>> +echo >>$hypertrace_events

> This reminds me of the first versions of "simpletrace" where the number
> of arguments was fixed and argument size was fixed.

> This meant strings cannot be traced, number of arguments is limited, and
> you pay an space overhead for unused arguments.

> Later on the format was changed to header (including .length field) and
> binary data payload.  This reduced the space overhead, elminated the
> argument count limit, and allowed strings to be traced.

> I think these are desirable qualities for any tracing mechanism and
> would reconsider a fixed number of uint64_t arguments.

The number of arguments is fixed at *compilation time*. What is not supported
out of the box is multiplexing multiple guest events over the hypertrace
event. That is, you need to do it yourself when post-processing the traces, but
I don't think that's too bad.


Cheers,
  Lluis



reply via email to

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