qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: [PATCH 0/3] Use only trace_event_get_state_backends() to check trace enablement
Date: Mon, 20 Jan 2020 15:11:39 +0000

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




reply via email to

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