On Thu, Sep 22, 2016 at 09:40:39AM +0100, Daniel P. Berrange wrote:
> Instead of having a global dstate array, declare a single
> 'uint16 TRACE_${EVENT_NAME}_DSTATE' variable for each
> trace event. Record a pointer to this variable in the
> TraceEvent struct too.
>
> By turning trace_event_get_state_dynamic_by_id into a
> macro, this still hits the fast path, and cache affinity
> is ensured by declaring all the uint16 vars adjacent to
> each other.
>
> Reviewed-by: Lluís Vilanova <[email protected]>
> Signed-off-by: Daniel P. Berrange <[email protected]>
> ---
> scripts/tracetool/__init__.py | 3 ++-
> scripts/tracetool/format/events_c.py | 9 +++++++--
> scripts/tracetool/format/events_h.py | 3 +++
> stubs/trace-control.c | 9 ++++-----
> trace/control-internal.h | 14 ++++----------
> trace/control-target.c | 20 ++++++++------------
> trace/control.c | 11 ++---------
> trace/event-internal.h | 7 +++++++
> 8 files changed, 37 insertions(+), 39 deletions(-)Reviewed-by: Stefan Hajnoczi <[email protected]>
signature.asc
Description: PGP signature
