From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQaaU-0000l8-NA for qemu-devel@nongnu.org; Thu, 20 Mar 2014 06:52:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQaaS-0000MX-CB for qemu-devel@nongnu.org; Thu, 20 Mar 2014 06:52:38 -0400 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:33926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQaaS-0000MI-6a for qemu-devel@nongnu.org; Thu, 20 Mar 2014 06:52:36 -0400 Received: by mail-ob0-f176.google.com with SMTP id wp18so667446obc.35 for ; Thu, 20 Mar 2014 03:52:35 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 20 Mar 2014 11:52:35 +0100 Message-ID: From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] QOM cast debug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" , Paolo Bonzini 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 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? Thanks, Laurent