aboutsummaryrefslogtreecommitdiff
path: root/trace/qmp.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2021-06-01 15:24:03 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2021-07-12 17:37:07 +0100
commit117856c3748dfda50351d1c0328486ede5f2646c (patch)
treed8c7d94d85dc89e8c5bbcea24bf1051b0a22f40f /trace/qmp.c
parent2adf2164918e2dc74fef2cdd0257917aff488640 (diff)
trace: iter init tweaks
Rename trace_event_iter_init() to trace_event_iter_init_pattern(), add trace_event_iter_init_all() for interating over all events. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20210601132414.432430-3-kraxel@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/qmp.c')
-rw-r--r--trace/qmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trace/qmp.c b/trace/qmp.c
index 85f81e47cc..3b4f4702b4 100644
--- a/trace/qmp.c
+++ b/trace/qmp.c
@@ -55,7 +55,7 @@ static bool check_events(bool has_vcpu, bool ignore_unavailable, bool is_pattern
/* error for unavailable events */
TraceEventIter iter;
TraceEvent *ev;
- trace_event_iter_init(&iter, name);
+ trace_event_iter_init_pattern(&iter, name);
while ((ev = trace_event_iter_next(&iter)) != NULL) {
if (!ignore_unavailable && !trace_event_get_state_static(ev)) {
error_setg(errp, "event \"%s\" is disabled", trace_event_get_name(ev));
@@ -90,7 +90,7 @@ TraceEventInfoList *qmp_trace_event_get_state(const char *name,
}
/* Get states (all errors checked above) */
- trace_event_iter_init(&iter, name);
+ trace_event_iter_init_pattern(&iter, name);
while ((ev = trace_event_iter_next(&iter)) != NULL) {
TraceEventInfo *value;
bool is_vcpu = trace_event_is_vcpu(ev);
@@ -153,7 +153,7 @@ void qmp_trace_event_set_state(const char *name, bool enable,
}
/* Apply changes (all errors checked above) */
- trace_event_iter_init(&iter, name);
+ trace_event_iter_init_pattern(&iter, name);
while ((ev = trace_event_iter_next(&iter)) != NULL) {
if (!trace_event_get_state_static(ev) ||
(has_vcpu && !trace_event_is_vcpu(ev))) {