From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46921 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PtjGa-00057l-ES for qemu-devel@nongnu.org; Sun, 27 Feb 2011 11:14:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PtjGT-0003iS-9a for qemu-devel@nongnu.org; Sun, 27 Feb 2011 11:14:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:19812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PtjGT-0003iN-1D for qemu-devel@nongnu.org; Sun, 27 Feb 2011 11:14:33 -0500 Message-ID: <4D6A7863.2030406@redhat.com> Date: Sun, 27 Feb 2011 18:14:27 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] simpletrace: Thread-safe tracing References: <1298818682-5404-1-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1298818682-5404-1-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , qemu-devel@nongnu.org, Prerna Saxena On 02/27/2011 04:58 PM, Stefan Hajnoczi wrote: > Trace events outside the global mutex cannot be used with the simple > trace backend since it is not thread-safe. There is no check to prevent > them being enabled so people sometimes learn this the hard way. > > This patch restructures the simple trace backend with a ring buffer > suitable for multiple concurrent writers. A writeout thread empties the > trace buffer when threshold fill levels are reached. Should the > writeout thread be unable to keep up with trace generation, records will > simply be dropped. It would be good to have an indication of the fact that records were dropped in the file. -- error compiling committee.c: too many arguments to function