qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 0/3] Use only trace_event_get_state_backends() to check trace


From: Stefan Hajnoczi
Subject: Re: [PATCH 0/3] Use only trace_event_get_state_backends() to check trace enablement
Date: Tue, 21 Jan 2020 11:39:04 +0000

On Mon, Jan 20, 2020 at 03:11:39PM +0000, Peter Maydell wrote:
> Currently docs/devel/tracing.txt recommends checking the
> TRACE_FOO_ENABLED macro to see if the FOO event is enabled,
> for the purpose of skipping expensive computations that
> are only used in trace output.
> 
> This is no longer the best way to do this; instead we
> should prefer trace_event_get_state_backends(), which
> checks both whether the event is compile-time disabled
> and also whether it is run-time disabled.
> 
> Update the documentation, and also the 5 uses of the
> old style in the tree.
> 
> thanks
> -- PMM
> 
> Peter Maydell (3):
>   docs/devel/tracing.txt: Recommend only
>     trace_event_get_state_backends()
>   memory.c: Use trace_event_get_state_backends()
>   hw/display/qxl.c: Use trace_event_get_state_backends()
> 
>  docs/devel/tracing.txt | 12 +++++-------
>  hw/display/qxl.c       |  2 +-
>  memory.c               |  8 ++++----
>  3 files changed, 10 insertions(+), 12 deletions(-)
> 
> -- 
> 2.20.1
> 
> 

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]