diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-19 10:54:49 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-19 10:54:49 +0100 |
commit | 0c1b58f25025cc09463aae235162b19ff45c37b7 (patch) | |
tree | 93f05bbeadc130a91399cc98ac3c914df87958e3 /scripts/tracetool/format/events_h.py | |
parent | 08b558f07bf67abf759e67266a83a8effdc34139 (diff) | |
parent | 77e2b17272963c09e309315903f3781dbdd85341 (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Mon 18 Jul 2016 22:59:55 BST
# gpg: using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/tracing-pull-request:
trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state
trace: Allow event name pattern in "info trace-events"
trace: Conditionally trace events based on their per-vCPU state
trace: Add per-vCPU tracing states for events with the 'vcpu' property
trace: Cosmetic changes on fast-path tracing
disas: Remove unused macro '_'
trace: Identify events with the 'vcpu' property
trace: [bsd-user] Commandline arguments to control tracing
trace: [linux-user] Commandline arguments to control tracing
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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(), |