On 09/19/2016 09:48 AM, 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.
>
> Signed-off-by: Daniel P. Berrange <[email protected]>
> ---> +++ b/scripts/tracetool/__init__.py > @@ -265,11 +265,12 @@ class Event(object): > > QEMU_TRACE = "trace_%(name)s" > QEMU_TRACE_TCG = QEMU_TRACE + "_tcg" > + QEMU_DSTATE = "___TRACE_%(NAME)s_DSTATE" Inconsistent indentation. > +++ b/trace/control.c > @@ -28,12 +28,6 @@ > #include "monitor/monitor.h" > > int trace_events_enabled_count; > -/* > - * Interpretation depends on wether the event has the 'vcpu' property: Nice - we're nuking a typo while at it... > +++ b/trace/event-internal.h > @@ -19,6 +19,11 @@ > * @vcpu_id: Unique per-vCPU event identifier. > * @name: Event name. > * @sstate: Static tracing state. > + * @dstate: Dynamic tracing state > + * > + * Interpretation of @dstate depends on wether the event has the 'vcpu' > property: ...oh, we just moved it. s/wether/whether/ while touching this. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
