From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] log-for-trace.h: Split out parts of log.h used by trace.h
Date: Tue, 13 Feb 2018 10:03:56 -0800 [thread overview]
Message-ID: <349e8191-35f5-5e33-3629-a195fbeaf9c2@linaro.org> (raw)
In-Reply-To: <20180213140029.8308-1-peter.maydell@linaro.org>
On 02/13/2018 06:00 AM, Peter Maydell wrote:
> A persistent build problem we see is where a source file
> accidentally omits the #include of log.h. This slips through
> local developer testing because if you configure with the
> default (log) trace backend trace.h will pull in log.h for you.
> Compilation fails only if some other backend is selected.
>
> To make this error cause a compile failure regardless of
> the configured trace backend, split out the parts of log.h
> that trace.h requires into a new log-for-trace.h header.
> Since almost all manual uses of the log.h functions will
> use constants or functions which aren't in log-for-trace.h,
> this will let us catch missing #include "qemu/log.h" more
> consistently.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> include/qemu/log-for-trace.h | 35 +++++++++++++++++++++++++++++++++++
> include/qemu/log.h | 18 ++++--------------
> scripts/tracetool/backend/log.py | 13 ++++++-------
> 3 files changed, 45 insertions(+), 21 deletions(-)
> create mode 100644 include/qemu/log-for-trace.h
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2018-02-13 18:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 14:00 [Qemu-devel] [PATCH] log-for-trace.h: Split out parts of log.h used by trace.h Peter Maydell
2018-02-13 15:19 ` Eric Blake
2018-02-13 18:33 ` Peter Maydell
2018-02-13 18:03 ` Richard Henderson [this message]
2018-02-23 16:33 ` Stefan Hajnoczi
2018-03-08 13:07 ` Peter Maydell
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=349e8191-35f5-5e33-3629-a195fbeaf9c2@linaro.org \
--to=richard.henderson@linaro.org \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).