[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 04/18] trace: remove global 'uint16 dstate[]'
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v3 04/18] trace: remove global 'uint16 dstate[]' array |
Date: |
Mon, 19 Sep 2016 10:55:04 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
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 <address@hidden>
> ---
> +++ 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
- Re: [Qemu-devel] [PATCH v3 02/18] trace: convert code to use event iterators, (continued)
[Qemu-devel] [PATCH v3 01/18] trace: add trace event iterator APIs, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 03/18] trace: remove some now unused functions, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 05/18] trace: remove duplicate control.h includes in generated-tracers.h, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 04/18] trace: remove global 'uint16 dstate[]' array, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 06/18] trace: break circular dependancy in event-internal.h, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 12/18] trace: dynamically allocate trace_dstate in CPUState, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 08/18] trace: remove the TraceEventID and TraceEventVCPUID enums, Daniel P. Berrange, 2016/09/19
[Qemu-devel] [PATCH v3 09/18] trace: emit name <-> ID mapping in simpletrace header, Daniel P. Berrange, 2016/09/19