Received: from [140.186.70.92] (port=36223 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGEwK-00074J-Lt for qemu-devel@nongnu.org; Wed, 10 Nov 2010 12:58:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGEwI-0006Vi-2B for qemu-devel@nongnu.org; Wed, 10 Nov 2010 12:58:32 -0500 Received: from mailout-de.gmx.net ([213.165.64.23]:37190 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PGEwH-0006VB-MW for qemu-devel@nongnu.org; Wed, 10 Nov 2010 12:58:30 -0500 From: xscript@gmx.net (=?utf-8?Q?Llu=C3=ADs?=) Subject: Re: [Qemu-devel] [PATCH v2 3/3] trace: enable all events by default References: <20101109140818.29831.83592.stgit@ginnungagap.bsc.es> <20101109140848.29831.72280.stgit@ginnungagap.bsc.es> Date: Wed, 10 Nov 2010 18:59:41 +0100 In-Reply-To: (Blue Swirl's message of "Wed, 10 Nov 2010 17:21:25 +0000") Message-ID: <87tyjpvz3m.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Blue Swirl writes: > On Tue, Nov 9, 2010 at 2:08 PM, Llu=C3=ADs wrote: >> Enable all trace events by default, assuming their frequency is relative= ly low, >> so there will be no measurable performace impact. > Even if the impact for one tracepoint is low, if all tracepoints are > enabled, eventually (considering that the number of tracepoints will > increase) just the data flow to the trace file will start to slow down > the guest. > But I'm not completely opposed to removing 'disable' keyword, for > example by turning all tracepoints off initially. Though then there > would be no way to trace the initialization activities. Well, the default trace backend is 'nop' so there's no overhead at all on default compilations. Even more, if you enable a backend other than 'nop', right now you still have to manually (de)activate the trace-events you want, depending on the backend you choose. For example, right now backends behave: * nop No overhead regardless of the "disable" property/keyword * simple "disable" sets the initial event state, but they're always able to trace (compiled-in). * ust If "disable" is present the event is not compiled-in, but by default events are not tracing from the start. * dtrace Similar to "simple" (don't remember if "disable" has any effect at all). Then, with the patch I sent, "disable" always uses the "nop" backend with that event, and otherwise follows through the default per-backend state (all of which should have an inactive state by default). So, my patch is just a matter of having all events available _only_ when you use a backend other than "nop". Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth