All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Use only trace_event_get_state_backends() to check trace enablement
@ 2020-01-20 15:11 Peter Maydell
  2020-01-20 15:11 ` [PATCH 1/3] docs/devel/tracing.txt: Recommend only trace_event_get_state_backends() Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Peter Maydell @ 2020-01-20 15:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann, Stefan Hajnoczi

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-21 11:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 15:11 [PATCH 0/3] Use only trace_event_get_state_backends() to check trace enablement Peter Maydell
2020-01-20 15:11 ` [PATCH 1/3] docs/devel/tracing.txt: Recommend only trace_event_get_state_backends() Peter Maydell
2020-01-20 15:11 ` [PATCH 2/3] memory.c: Use trace_event_get_state_backends() Peter Maydell
2020-01-20 15:11 ` [PATCH 3/3] hw/display/qxl.c: " Peter Maydell
2020-01-21  5:54   ` Gerd Hoffmann
2020-01-21 11:39 ` [PATCH 0/3] Use only trace_event_get_state_backends() to check trace enablement Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.