[Top][All Lists]

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

Re: [PATCH 1/6] dma/pl330: Convert to support tracing

From: Peter Maydell
Subject: Re: [PATCH 1/6] dma/pl330: Convert to support tracing
Date: Fri, 17 Jan 2020 17:05:07 +0000

On Fri, 17 Jan 2020 at 16:46, Guenter Roeck <address@hidden> wrote:
> On Fri, Jan 17, 2020 at 01:23:46PM +0000, Peter Maydell wrote:
> > Won't this now do all the work of constructing the hexdump strings,
> > even if tracing is disabled ?
> >
> That is correct. Can I check
>         if (trace_event_get_state(TRACE_PL330_HEXDUMP) &&
>             qemu_loglevel_mask(LOG_TRACE)) {
> directly in pl330_hexdump(), or is there some other means to handle
> this kind of situation ?

It's not something I've had to do before.
docs/devel/tracing.txt says "just use the TRACE_FOO_ENABLED
macro", but looking at what it does that doesn't seem to check
the runtime state of the trace event, so maybe those docs are out
of date. Stefan, what's the current best way to guard expensive
computations used only for trace output ?

-- PMM

reply via email to

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