Re: [Qemu-devel] [PATCH v2] trace: Provide a per-event status define for conditional compilation

2011-12-09 Thread Stefan Hajnoczi
On Tue, Dec 06, 2011 at 05:38:15PM +0100, Lluís Vilanova wrote: > Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in > "trace.h". > > This lets the user conditionally compile code with a relatively high execution > cost that is only necessary when producing the tracing in

Re: [Qemu-devel] [PATCH v2] trace: Provide a per-event status define for conditional compilation

2011-12-08 Thread Lluís Vilanova
Stefan Hajnoczi writes: > 2011/12/6 Lluís Vilanova : >> Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in >> "trace.h". > I think we should take it a step further: support > TRACE_${NAME}_ENABLED at run-time. This means skipping the trace > event code if the event is c

Re: [Qemu-devel] [PATCH v2] trace: Provide a per-event status define for conditional compilation

2011-12-08 Thread Stefan Hajnoczi
2011/12/6 Lluís Vilanova : > Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in > "trace.h". I think we should take it a step further: support TRACE_${NAME}_ENABLED at run-time. This means skipping the trace event code if the event is currently disabled. If the user ena

[Qemu-devel] [PATCH v2] trace: Provide a per-event status define for conditional compilation

2011-12-06 Thread Lluís Vilanova
Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in "trace.h". This lets the user conditionally compile code with a relatively high execution cost that is only necessary when producing the tracing information for an event that is enabled. Note that events using this defin