qemu-e2k/scripts/tracetool/backend
Stefan Hajnoczi 736ec1677f trace: fix simple trace "disable" keyword
The trace-events "disable" keyword turns an event into a nop at
compile-time.  This is important for high-frequency events that can
impact performance.

The "disable" keyword is currently broken in the simple trace backend.
This patch fixes the problem as follows:

Trace events are identified by their TraceEventID number.  When events
are disabled there are two options for assigning TraceEventID numbers:
1. Skip disabled events and don't assign them a number.
2. Assign numbers for all events regardless of the disabled keyword.

The simple trace backend and its binary file format uses approach #1.

The tracetool infrastructure has been using approach #2 for a while.

The result is that the numbers used in simple trace files do not
correspond with TraceEventIDs.  In trace/simple.c we assumed that they
are identical and therefore emitted bogus numbers.

This patch fixes the bug by using TraceEventID for trace_event_id()
while sticking to approach #1 for simple trace file numbers.  This
preserves simple trace file format compatibility.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-01-27 15:49:39 +01:00
..
__init__.py trace: [tracetool] Explicitly identify public backends 2013-03-28 14:19:57 +01:00
dtrace.py trace: [tracetool] Explicitly identify public backends 2013-03-28 14:19:57 +01:00
events.py trace: Provide a generic tracing event descriptor 2013-03-28 14:19:57 +01:00
ftrace.py trace: Add ftrace tracing backend 2013-05-03 13:58:09 +02:00
simple.py trace: fix simple trace "disable" keyword 2014-01-27 15:49:39 +01:00
stderr.py trace: [stderr] Port to generic event information and new control interface 2013-03-28 14:19:57 +01:00
ust.py trace: [tracetool] Explicitly identify public backends 2013-03-28 14:19:57 +01:00