From a4d50b1d2a6c07a13fb8401a0c3b471f25b44b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Tue, 23 Aug 2016 10:58:52 +0200 Subject: trace: Remove 'trace_events_dstate_init' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the event state array used for early initialization. Since only events with the "vcpu" property need a late initialization fixup, threats their initialization specially. Assumes that the user won't touch the state of "vcpu" events between early and late initialization (e.g., through QMP). Signed-off-by: LluĂ­s Vilanova Message-id: 147194273191.26836.14423079546263831356.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi --- trace/control-target.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'trace/control-target.c') diff --git a/trace/control-target.c b/trace/control-target.c index 74c029accc..4ee3733662 100644 --- a/trace/control-target.c +++ b/trace/control-target.c @@ -13,6 +13,15 @@ #include "translate-all.h" +void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state) +{ + TraceEventID id = trace_event_get_id(ev); + assert(trace_event_get_state_static(ev)); + /* Ignore "vcpu" property, since no vCPUs have been created yet */ + trace_events_enabled_count += state - trace_events_dstate[id]; + trace_events_dstate[id] = state; +} + void trace_event_set_state_dynamic(TraceEvent *ev, bool state) { CPUState *vcpu; -- cgit v1.2.1