[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] What's the intended use of log.h logging?
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] What's the intended use of log.h logging? |
Date: |
Thu, 22 Oct 2015 15:05:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 22/10/2015 14:26, Stefan Hajnoczi wrote:
> printk() - plain old printf
> printk_once() - uses a static bool for once-only semantics,
> modulo races between CPUs
> printk_ratelimited() - time-based rate-limiting
>
> (And if you need to configure the ratelimit threshold, you can use the
> underlying __ratelimit() function.)
>
> The same could work for QEMU. Existing "qemu log" stuff is mostly
> printk(). Any messages that are not errors or warnings don't need
> rate-limiting because they shouldn't be enabled by default (and when you
> do want them for troubleshooting, then rate-limiting gets in the way).
Actually, most of the "qemu log" stuff is TCG tracing.
UNIMP and GUEST_ERROR are not tracing, and could indeed go to stderr
with a rate-limiter (with a "-msg ratelimit=no" option).
I agree with you about DPRINTF being sometimes tracing and sometimes
logging.
I'm planning to integrate the stderr tracing backend with qemu log. I
think this is the most pressing need, and I think I can have some
patches ready for comments on Monday. It depends on whether I'll decide
to play with QEMU or LEGO Digital Designer on the way to Seoul.
Second, we can integrate qemu log with "-msg timestamp=yes" and add the
above rate-limiting functionality.
Paolo
- Re: [Qemu-devel] What's the intended use of log.h logging?, (continued)
- Re: [Qemu-devel] What's the intended use of log.h logging?, Dr. David Alan Gilbert, 2015/10/19
- Re: [Qemu-devel] What's the intended use of log.h logging?, Dr. David Alan Gilbert, 2015/10/19
- Re: [Qemu-devel] What's the intended use of log.h logging?, Kevin Wolf, 2015/10/20
- Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event), Alex Bennée, 2015/10/16
- Re: [Qemu-devel] What's the intended use of log.h logging?, Markus Armbruster, 2015/10/19
- Re: [Qemu-devel] What's the intended use of log.h logging?, Peter Maydell, 2015/10/19
- Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event), Stefan Hajnoczi, 2015/10/21
- Re: [Qemu-devel] What's the intended use of log.h logging?, Denis V. Lunev, 2015/10/21
- Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event), Peter Maydell, 2015/10/21
- Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event), Stefan Hajnoczi, 2015/10/22
- Re: [Qemu-devel] What's the intended use of log.h logging?,
Paolo Bonzini <=
[Qemu-devel] [PATCH 3/3] log: adds a timestamp to each log entry, Denis V. Lunev, 2015/10/15
[Qemu-devel] [PATCH 1/3] log: improve performance of qemu_log and qemu_log_mask if disabled, Denis V. Lunev, 2015/10/15
Re: [Qemu-devel] [PATCH 1/3] log: improve performance of qemu_log and qemu_log_mask if disabled, Markus Armbruster, 2015/10/16