Received: from eggs.gnu.org ([2001:4830:134:3::10]:54510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1begwo-0003lN-SU for qemu-devel@nongnu.org; Tue, 30 Aug 2016 07:11:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1begwk-0001Mh-MO for qemu-devel@nongnu.org; Tue, 30 Aug 2016 07:11:17 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33061 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1begwk-0001MZ-HI for qemu-devel@nongnu.org; Tue, 30 Aug 2016 07:11:14 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7UB90ha013203 for ; Tue, 30 Aug 2016 07:11:13 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 255364nnn8-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 30 Aug 2016 07:11:13 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Aug 2016 12:11:11 +0100 Date: Tue, 30 Aug 2016 13:11:05 +0200 From: Cornelia Huck In-Reply-To: <20160830130926-mutt-send-email-mst@kernel.org> References: <1472526419-5900-1-git-send-email-jasowang@redhat.com> <1472526419-5900-3-git-send-email-jasowang@redhat.com> <20160830093127.49463d9d.cornelia.huck@de.ibm.com> <20160830130128-mutt-send-email-mst@kernel.org> <20160830130926-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20160830131105.74f78a45.cornelia.huck@de.ibm.com> Subject: [Qemu-devel] qom and debug (was: [PATCH for 2.8 02/11] virtio: convert to use DMA api) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Jason Wang , qemu-devel@nongnu.org, pbonzini@redhat.com, peterx@redhat.com, wexu@redhat.com, vkaplans@redhat.com, Stefan Hajnoczi , Kevin Wolf , Amit Shah , qemu-block@nongnu.org On Tue, 30 Aug 2016 13:21:23 +0300 "Michael S. Tsirkin" wrote: > BTW downstreams are building with --disable-qom-cast-debug which drops > all QOM casts on data path - one way is to say we just make this the > default upstream as well. Another to say that we want to distinguish > fast path calls from slow path, this way we will be able to bring back > some of the checks. I find CONFIG_QOM_CAST_DEBUG a bit inconsistent, btw: - for object casts, we optimize away all checks and just return the object for !debug - for class casts, we optimize away only the caching and still keep the checking (why would we drop the caching if this can speed up things?) We certainly want to have debug turned on during development to avoid nasty surprises later (otherwise, why even bother?), but it makes sense to turn it off for a release. (Is there an easy way to turn it off for the release, normal or stable, and keep it during the development cycle?)