From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, "Lluís Vilanova" <vilanova@ac.upc.edu>,
"Eric Blake" <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums
Date: Fri, 23 Sep 2016 15:23:44 +0100 [thread overview]
Message-ID: <20160923142344.GW8221@stefanha-x1.localdomain> (raw)
In-Reply-To: <1474533652-31170-9-git-send-email-berrange@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1701 bytes --]
On Thu, Sep 22, 2016 at 09:40:43AM +0100, Daniel P. Berrange wrote:
> The TraceEventID and TraceEventVCPUID enums constants are
> no longer actually used for anything critical.
>
> The TRACE_EVENT_COUNT limit is used to determine the size
> of the TraceEvents array, and can be removed if we just
> NULL terminate the array instead.
>
> The TRACE_VCPU_EVENT_COUNT limit is used as a magic value
> for marking non-vCPU events, and also for declaring the
> size of the trace dstate mask in the CPUState struct.
> The former usage can be replaced by a dedicated constant
> TRACE_EVENT_VCPU_NONE, defined as (uint32_t)-1. For the
> latter usage, we can simply define a constant for the
> number of VCPUs, avoiding the need for the full enum.
>
> The only other usages of the enum values can be replaced
> by accesing the id/vcpu_id fields via the named TraceEvent
> structs.
>
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
> scripts/tracetool/backend/simple.py | 4 ++--
> scripts/tracetool/format/events_c.py | 16 +++++++++++-----
> scripts/tracetool/format/events_h.py | 18 +++---------------
> scripts/tracetool/format/h.py | 3 +--
> trace/control-internal.h | 19 ++++++++++---------
> trace/control-target.c | 2 +-
> trace/control.c | 2 +-
> trace/control.h | 31 ++++++++-----------------------
> trace/event-internal.h | 6 ++++++
> trace/simple.c | 8 ++++----
> trace/simple.h | 2 +-
> 11 files changed, 48 insertions(+), 63 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-09-23 14:23 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 8:40 [Qemu-devel] [PATCH v4 00/17] Refactor trace to allow modular build Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 01/17] trace: add trace event iterator APIs Daniel P. Berrange
2016-09-23 13:39 ` Stefan Hajnoczi
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 02/17] trace: convert code to use event iterators Daniel P. Berrange
2016-09-22 12:20 ` Lluís Vilanova
2016-09-22 12:45 ` Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 03/17] trace: remove some now unused functions Daniel P. Berrange
2016-09-23 13:39 ` Stefan Hajnoczi
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 04/17] trace: remove global 'uint16 dstate[]' array Daniel P. Berrange
2016-09-23 13:51 ` Stefan Hajnoczi
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 05/17] trace: remove duplicate control.h includes in generated-tracers.h Daniel P. Berrange
2016-09-23 13:52 ` Stefan Hajnoczi
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-internal.h Daniel P. Berrange
2016-09-22 12:22 ` Lluís Vilanova
2016-09-23 13:53 ` Stefan Hajnoczi
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 07/17] trace: give each trace event a named TraceEvent struct Daniel P. Berrange
2016-09-22 12:26 ` Lluís Vilanova
2016-09-23 14:10 ` Stefan Hajnoczi
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums Daniel P. Berrange
2016-09-22 12:35 ` Lluís Vilanova
2016-09-22 12:44 ` Daniel P. Berrange
2016-09-22 16:12 ` Lluís Vilanova
2016-09-22 18:42 ` Lluís Vilanova
2016-09-23 14:12 ` Stefan Hajnoczi
2016-09-23 14:23 ` Stefan Hajnoczi [this message]
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 09/17] trace: emit name <-> ID mapping in simpletrace header Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 10/17] trace: don't abort qemu if ftrace can't be initialized Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 11/17] trace: provide mechanism for registering trace events Daniel P. Berrange
2016-09-22 12:44 ` Lluís Vilanova
2016-09-22 12:48 ` Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 12/17] trace: dynamically allocate trace_dstate in CPUState Daniel P. Berrange
2016-09-22 12:47 ` Lluís Vilanova
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 13/17] trace: dynamically allocate event IDs at runtime Daniel P. Berrange
2016-09-22 12:50 ` Lluís Vilanova
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 14/17] trace: get rid of generated-events.h/generated-events.c Daniel P. Berrange
2016-09-22 12:59 ` Lluís Vilanova
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 15/17] trace: rename _read_events to read_events Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 16/17] trace: push reading of events up a level to tracetool main Daniel P. Berrange
2016-09-22 8:40 ` [Qemu-devel] [PATCH v4 17/17] trace: pass trace-events to tracetool as a positional param Daniel P. Berrange
2016-09-22 13:00 ` Lluís Vilanova
2016-09-22 13:04 ` [Qemu-devel] [PATCH v4 00/17] Refactor trace to allow modular build Lluís Vilanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160923142344.GW8221@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vilanova@ac.upc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).