These patches were previously posted as part of my giant trace events modular build series
https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg01714.html I'm not ready to repost the entire series, but I figure these 6 preparatory changes can be usefully reviewed and potentially merged on their own. Changed in v2: - Fixed filtering of events on first call of iterator_next (Stefan) - Switch from size_t to uint32_t for event ID type (Paolo/Stefan) - Replace global 'dstate' array with individual variables (Lluís) Daniel P. Berrange (6): trace: add trace event iterator APIs trace: convert code to use event iterators trace: remove some now unused functions trace: remove global 'uint16 dstate[]' array trace: remove use of event ID enums from APIs trace: use -1 instead of TRACE_VCPU_EVENT_COUNT as magic value monitor.c | 16 ++++-- scripts/tracetool/format/events_c.py | 8 ++- scripts/tracetool/format/events_h.py | 3 + stubs/trace-control.c | 9 ++- trace/control-internal.h | 35 +++--------- trace/control-target.c | 22 +++----- trace/control.c | 105 +++++++++++++++++++---------------- trace/control.h | 94 +++++++++---------------------- trace/event-internal.h | 10 +++- trace/qmp.c | 16 ++++-- trace/simple.c | 6 +- trace/simple.h | 2 +- 12 files changed, 145 insertions(+), 181 deletions(-) -- 2.7.4