diff options
| author | Lluís Vilanova <vilanova@ac.upc.edu> | 2016-07-11 12:53:24 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-07-18 18:13:54 +0100 |
| commit | 17f7ac75df3909c384c18274b41a2a91192599e3 (patch) | |
| tree | b5000f5a073806b11d4a5e4f73336df85f82d348 /scripts/tracetool/format/events_h.py | |
| parent | 6913e79c3677a4282203fdd79af7927a94d0427e (diff) | |
| download | focaccia-qemu-17f7ac75df3909c384c18274b41a2a91192599e3.tar.gz focaccia-qemu-17f7ac75df3909c384c18274b41a2a91192599e3.zip | |
trace: Identify events with the 'vcpu' property
A new event attribute 'cpu_id' is added to have a separate ID
space ('TRACE_VCPU_*') for all events with the 'vcpu' property.
These are later used to identify which events are enabled on each vCPU.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'scripts/tracetool/format/events_h.py')
| -rw-r--r-- | scripts/tracetool/format/events_h.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/tracetool/format/events_h.py b/scripts/tracetool/format/events_h.py index 4529263e00..a9da60b7fa 100644 --- a/scripts/tracetool/format/events_h.py +++ b/scripts/tracetool/format/events_h.py @@ -32,13 +32,23 @@ def generate(events, backend): out(' TRACE_EVENT_COUNT', '} TraceEventID;') + # per-vCPU event identifiers + out('typedef enum {') + + for e in events: + if "vcpu" in e.properties: + out(' TRACE_VCPU_%s,' % e.name.upper()) + + out(' TRACE_VCPU_EVENT_COUNT', + '} TraceEventVCPUID;') + # static state for e in events: if 'disable' in e.properties: enabled = 0 else: enabled = 1 - if "tcg-trans" in e.properties: + if "tcg-exec" in e.properties: # a single define for the two "sub-events" out('#define TRACE_%(name)s_ENABLED %(enabled)d', name=e.original.name.upper(), |