diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-01 15:24:04 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2021-07-12 17:37:07 +0100 |
commit | c5cc58b176f23f6664d0e12e5956af4d904dcca4 (patch) | |
tree | 45741e904ba5308b6b504805e5fc81e09a1e1bc3 /trace/control.h | |
parent | 117856c3748dfda50351d1c0328486ede5f2646c (diff) | |
download | qemu-c5cc58b176f23f6664d0e12e5956af4d904dcca4.zip qemu-c5cc58b176f23f6664d0e12e5956af4d904dcca4.tar.gz qemu-c5cc58b176f23f6664d0e12e5956af4d904dcca4.tar.bz2 |
trace: add trace_event_iter_init_group
This allows to interate over an event group.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20210601132414.432430-4-kraxel@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control.h')
-rw-r--r-- | trace/control.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/trace/control.h b/trace/control.h index ce40bd0..23b8393 100644 --- a/trace/control.h +++ b/trace/control.h @@ -13,8 +13,11 @@ #include "event-internal.h" typedef struct TraceEventIter { + /* iter state */ size_t event; size_t group; + /* filter conditions */ + size_t group_id; const char *pattern; } TraceEventIter; @@ -40,6 +43,16 @@ void trace_event_iter_init_all(TraceEventIter *iter); void trace_event_iter_init_pattern(TraceEventIter *iter, const char *pattern); /** + * trace_event_iter_init_group: + * @iter: the event iterator struct + * @group_id: group_id to filter events by group. + * + * Initialize the event iterator struct @iter, + * using @group_id to filter for events in the group. + */ +void trace_event_iter_init_group(TraceEventIter *iter, size_t group_id); + +/** * trace_event_iter_next: * @iter: the event iterator struct * |