qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC][PATCH v2 0/3] trace-instrument: let the user wrap/override code generated from trace-events
@ 2010-11-04 22:35 Lluís
  2010-11-04 22:36 ` [Qemu-devel] [PATCH v2 1/3] trace: rewrite 'tracetool' to facilitate future extensions Lluís
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lluís @ 2010-11-04 22:35 UTC (permalink / raw)
  To: qemu-devel

XXX: 'tracetool' could be simplified by never generating real tracing code for
     events with the "disable" property (not even with the 'simple' backend).
XXX: Must be applied on top of the 'backdoor' patch series

Adds a new optional keyword ("instrument") to the syntax in "trace-events". When
specified, this event property lets the user provide her own implementation for
that tracing event.

Still, in case the user only wants to wrap around the tracing event, tracetool's
original implementation is accessible through function 'trace_##name##_backend',
instead of the original 'trace_##name' (which now the user has to provide).

The user-provided tracing functions are expected to be in the static library
"libinstrument.a", identified by the "--with-instrument" configuration
parameter.

v2:

Rebase onto latest QEMU version (d33ea50a958b2e050d2b28e5f17e3b55e91c6d74).

Provide a '#define trace_##name##_enabled 1' in "trace.h" in case the tracing
point arguments need some extra computations only when enabled.


TODO:

 * Having the 'simple' backend generate code even when the "disable" property is
   present, complicates the flow in 'tracetool'.
   Is this behaviour really needed?

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---

Lluís Vilanova (3):
      trace: rewrite 'tracetool' to facilitate future extensions
      trace-instrument: let the user override events generated by 'tracetool'
      trace-instrument: handle config-time activation


 Makefile        |    4 -
 Makefile.target |   29 ++++-
 configure       |   30 +++++
 simpletrace.py  |    2 
 trace-events    |   23 +++-
 tracetool       |  340 +++++++++++++++++++++++++++++++++++--------------------
 6 files changed, 293 insertions(+), 135 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-04 22:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-04 22:35 [Qemu-devel] [RFC][PATCH v2 0/3] trace-instrument: let the user wrap/override code generated from trace-events Lluís
2010-11-04 22:36 ` [Qemu-devel] [PATCH v2 1/3] trace: rewrite 'tracetool' to facilitate future extensions Lluís
2010-11-04 22:36 ` [Qemu-devel] [PATCH v2 2/3] trace-instrument: let the user override events generated by 'tracetool' Lluís
2010-11-04 22:36 ` [Qemu-devel] [PATCH v2 3/3] trace-instrument: handle config-time activation Lluís

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).