aboutsummaryrefslogtreecommitdiff
path: root/trace/control-target.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-10-04 14:35:43 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-10-12 09:35:54 +0200
commit0d4e995c7368f8bdc8845beb499b650386a38819 (patch)
treea2daca965ac8ccf0e9e54ab6a71c60c74b2a2e23 /trace/control-target.c
parent6a1b0f3aea09142cb8989ccffb3b74bb8808a00f (diff)
trace: convert code to use event iterators
This converts the HMP/QMP monitor API implementations and some internal trace control methods to use the new trace event iterator APIs. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu> Message-id: 1475588159-30598-5-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control-target.c')
-rw-r--r--trace/control-target.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/trace/control-target.c b/trace/control-target.c
index 52fcce5a00..50bac4fb7d 100644
--- a/trace/control-target.c
+++ b/trace/control-target.c
@@ -98,9 +98,10 @@ static bool adding_first_cpu(void)
void trace_init_vcpu(CPUState *vcpu)
{
- TraceEvent *ev = NULL;
-
- while ((ev = trace_event_pattern("*", ev)) != NULL) {
+ TraceEventIter iter;
+ TraceEvent *ev;
+ trace_event_iter_init(&iter, NULL);
+ while ((ev = trace_event_iter_next(&iter)) != NULL) {
if (trace_event_is_vcpu(ev) &&
trace_event_get_state_static(ev) &&
trace_event_get_state_dynamic(ev)) {
@@ -118,6 +119,5 @@ void trace_init_vcpu(CPUState *vcpu)
}
}
}
-
trace_guest_cpu_enter(vcpu);
}