qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] log-for-trace.h: Split out parts of log.h used


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] log-for-trace.h: Split out parts of log.h used by trace.h
Date: Fri, 23 Feb 2018 16:33:54 +0000
User-agent: Mutt/1.9.2 (2017-12-15)

On Tue, Feb 13, 2018 at 02:00:29PM +0000, 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 <address@hidden>
> ---
>  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

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]