From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1bQY-00028n-3O for qemu-devel@nongnu.org; Tue, 23 Jul 2013 08:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1bQV-0005B4-9l for qemu-devel@nongnu.org; Tue, 23 Jul 2013 08:10:50 -0400 Received: from wanbli.kerneis.info ([176.31.113.173]:41020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1bQU-00059u-Jb for qemu-devel@nongnu.org; Tue, 23 Jul 2013 08:10:46 -0400 Date: Tue, 23 Jul 2013 13:10:35 +0100 From: Gabriel Kerneis Message-ID: <20130723121035.GA5330@kerneis.info> References: <1374182502-10292-1-git-send-email-charlie@ctshepherd.com> <20130719052744.GF14330@stefanha-thinkpad.redhat.com> <20130719083711.GC2992@dhcp-200-207.str.redhat.com> <20130723120515.GA20857@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130723120515.GA20857@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] RFC [PATCH] Make bdrv_flush synchronous only and update callers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Charlie Shepherd , qemu-devel@nongnu.org, pbonzini@redhat.com On Tue, Jul 23, 2013 at 02:05:15PM +0200, Stefan Hajnoczi wrote: > A built-time check for coroutine_fn would be valuable if we ever hope to > get disciplined with this annotation. > > The check can detect when a coroutine_fn is invoked outside coroutine > context. I wonder if Coccinelle can detect this, although I never > figured out how to use it as a grep-like tool instead of just a > patch-like tool. The recent "cps-inference" branch of CPC enables precisely that kind of check. Charlie is using it to drive his modifications to QEMU and has already suggested several improvements that I have implemented. Hopefully we should reach something fully covering QEMU by the end his GSoC. If there is interest, I can post a script showing how to build it and use it to check QEMU annotations (it does not require any modifications to QEMU, only a couple of configure switches). Best regards, -- Gabriel