qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/3] Samples to add a tracepoint.


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 3/3] Samples to add a tracepoint.
Date: Tue, 25 May 2010 12:38:27 +0100

@@ -87,6 +91,8 @@ static void virtio_blk_rw_complete(void
 {
     VirtIOBlockReq *req = opaque;

+    trace_virtio_blk_rw_complete(req, ret);
+
     if (ret) {
         int is_read = !(req->out->type & VIRTIO_BLK_T_OUT);
         if (virtio_blk_handle_rw_error(req, -ret, is_read))

What happens when CONFIG_QEMU_TRACE is not defined?  Linker error for missing
symbol trace_virtio_blk_rw_complete()?

This is handled by the tracing backends patchset I posted.  When
tracing is disabled the nop backend will make tracepoints empty inline
functions.  The compiler makes them disappear but the tracepoint
invocation is still parsed and type checked by the compiler.  It
shouldn't be hard to add your tracer as a backend.

Stefan



reply via email to

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