trace: remove global 'uint16 dstate[]' array
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:Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-7-git-send-email-berrange@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
Showing
- scripts/tracetool/__init__.py 2 additions, 1 deletionscripts/tracetool/__init__.py
- scripts/tracetool/format/events_c.py 7 additions, 2 deletionsscripts/tracetool/format/events_c.py
- scripts/tracetool/format/events_h.py 3 additions, 0 deletionsscripts/tracetool/format/events_h.py
- stubs/trace-control.c 4 additions, 5 deletionsstubs/trace-control.c
- trace/control-internal.h 4 additions, 10 deletionstrace/control-internal.h
- trace/control-target.c 10 additions, 15 deletionstrace/control-target.c
- trace/control.c 0 additions, 6 deletionstrace/control.c
- trace/event-internal.h 7 additions, 0 deletionstrace/event-internal.h
Please register or sign in to comment