From: Paolo Bonzini <pbonzini@redhat.com>
To: Laurent Desnogues <laurent.desnogues@gmail.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] QOM cast debug
Date: Thu, 20 Mar 2014 13:45:56 +0100 [thread overview]
Message-ID: <532AE304.8060904@redhat.com> (raw)
In-Reply-To: <CABoDooODBhUuVSzueGk1=uu2Gbvhy=RSBdxmgXiRmPcfXBLrEA@mail.gmail.com>
Il 20/03/2014 11:52, Laurent Desnogues ha scritto:
> Hello,
>
> while looking at some perf results, I saw object_dynamic_cast_assert
> taking more than 3% of the run time.
>
> After some digging I found out that this time can be cut by passing
> --disable-qom-cast-debug to configure. This was added by Paolo:
>
> commit 3556c233d931ad5ffa46a35cb25cfc057732ebb8
> Author: Paolo Bonzini <pbonzini@redhat.com>
> Date: Fri May 10 14:16:40 2013 +0200
>
> qom: allow turning cast debugging off
>
> Cast debugging can have a substantial cost (20% or more). Instead of adding
> special-cased "fast casts" in the hot paths, we can just disable it in
> releases. The tracing facilities we just added make it easier to analyze
> those problems that cast debugging would reveal.
>
> I find it odd that the default is to have this debug flag on by
> default while the other such debug options are off. Wouldn't it make
> more sense to have it off by default and let devs turn it on?
I agree, but Anthony (and Andreas?) did not.
Which path is calling object_dynamic_cast_assert so much? It was agreed
to just use C casts in hot code.
Paolo
next prev parent reply other threads:[~2014-03-20 12:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-20 10:52 [Qemu-devel] QOM cast debug Laurent Desnogues
2014-03-20 12:45 ` Paolo Bonzini [this message]
2014-03-20 13:24 ` Laurent Desnogues
2014-03-20 13:27 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=532AE304.8060904@redhat.com \
--to=pbonzini@redhat.com \
--cc=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.