summaryrefslogtreecommitdiffstats
path: root/trace/event-internal.h
diff options
context:
space:
mode:
authorPeter Maydell2016-10-12 12:05:21 +0200
committerPeter Maydell2016-10-12 12:05:21 +0200
commitae4b28ace9554385eec50e2e330526159836c33d (patch)
tree1c4a0ac151d4096f7a16be82bd6533a698d85808 /trace/event-internal.h
parentbuild: Work around SIZE_MAX bug in OSX headers (diff)
parenttrace: Add missing execution mode of guest events (diff)
downloadqemu-ae4b28ace9554385eec50e2e330526159836c33d.tar.gz
qemu-ae4b28ace9554385eec50e2e330526159836c33d.tar.xz
qemu-ae4b28ace9554385eec50e2e330526159836c33d.zip
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Wed 12 Oct 2016 09:43:03 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 missing execution mode of guest events trace: introduce a formal group name for trace events trace: pass trace-events to tracetool as a positional param trace: push reading of events up a level to tracetool main trace: rename _read_events to read_events trace: get rid of generated-events.h/generated-events.c trace: dynamically allocate event IDs at runtime trace: dynamically allocate trace_dstate in CPUState trace: provide mechanism for registering trace events trace: don't abort qemu if ftrace can't be initialized trace: emit name <-> ID mapping in simpletrace header trace: remove the TraceEventID and TraceEventVCPUID enums trace: give each trace event a named TraceEvent struct trace: break circular dependency in event-internal.h trace: remove duplicate control.h includes in generated-tracers.h trace: remove global 'uint16 dstate[]' array trace: remove some now unused functions trace: convert code to use event iterators trace: add trace event iterator APIs trace: move colo trace events to net/ sub-directory Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'trace/event-internal.h')
-rw-r--r--trace/event-internal.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/trace/event-internal.h b/trace/event-internal.h
index 074faf6862..f63500b37e 100644
--- a/trace/event-internal.h
+++ b/trace/event-internal.h
@@ -10,8 +10,11 @@
#ifndef TRACE__EVENT_INTERNAL_H
#define TRACE__EVENT_INTERNAL_H
-#include "trace/generated-events.h"
-
+/*
+ * Special value for TraceEvent.vcpu_id field to indicate
+ * that the event is not VCPU specific
+ */
+#define TRACE_VCPU_EVENT_NONE ((uint32_t)-1)
/**
* TraceEvent:
@@ -19,14 +22,21 @@
* @vcpu_id: Unique per-vCPU event identifier.
* @name: Event name.
* @sstate: Static tracing state.
+ * @dstate: Dynamic tracing state
+ *
+ * Interpretation of @dstate depends on whether the event has the 'vcpu'
+ * property:
+ * - false: Boolean value indicating whether the event is active.
+ * - true : Integral counting the number of vCPUs that have this event enabled.
*
* Opaque generic description of a tracing event.
*/
typedef struct TraceEvent {
- TraceEventID id;
- TraceEventVCPUID vcpu_id;
+ uint32_t id;
+ uint32_t vcpu_id;
const char * name;
const bool sstate;
+ uint16_t *dstate;
} TraceEvent;
void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state);