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: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace"
Date: Thu, 18 Aug 2016 10:59:45 +0100
User-agent: Mutt/1.6.2 (2016-07-01)

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.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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