qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v1 02/40] trace: split out trace events for util


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v1 02/40] trace: split out trace events for util/ directory
Date: Tue, 14 Jun 2016 13:28:16 +0100
User-agent: Mutt/1.6.1 (2016-04-27)

On Thu, Jun 09, 2016 at 05:57:56PM +0100, Daniel P. Berrange wrote:
> diff --git a/util/trace-events b/util/trace-events
> new file mode 100644
> index 0000000..95a3b3d
> --- /dev/null
> +++ b/util/trace-events
> @@ -0,0 +1,38 @@
> +# Trace events for debugging and performance instrumentation
> +#
> +# This file is processed by the tracetool script during the build.
> +#
> +# To add a new trace event:
> +#
> +# 1. Choose a name for the trace event.  Declare its arguments and format
> +#    string.
> +#
> +# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() 
> ->
> +#    trace_multiwrite_cb().  The source file must #include "trace.h".
> +#
> +# Format of a trace event:
> +#
> +# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
> +#
> +# Example: g_malloc(size_t size) "size %zu"
> +#
> +# The "disable" keyword will build without the trace event.
> +#
> +# The <name> must be a valid as a C function name.
> +#
> +# Types should be standard C types.  Use void * for pointers because the 
> trace
> +# system may not have the necessary headers included.
> +#
> +# The <format-string> should be a sprintf()-compatible format string.

Should we just say:

# See docs/trace-events.txt for syntax documentation.

That way we can avoid a lot of boilerplate and this documentation can
live in docs/.

Attachment: signature.asc
Description: PGP signature


reply via email to

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