From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL7Oq-0002yO-3z for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:51:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aL7Om-0000Qj-Sp for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:51:04 -0500 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL7Om-0000Qb-Lt for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:51:00 -0500 Received: by mail-wm0-x242.google.com with SMTP id l65so15748737wmf.3 for ; Mon, 18 Jan 2016 02:51:00 -0800 (PST) Sender: Paolo Bonzini References: <145287587081.11400.4178335509020334684.stgit@localhost> <145287591675.11400.12508957244344480632.stgit@localhost> From: Paolo Bonzini Message-ID: <569CC38F.60302@redhat.com> Date: Mon, 18 Jan 2016 11:50:55 +0100 MIME-Version: 1.0 In-Reply-To: <145287591675.11400.12508957244344480632.stgit@localhost> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 8/9] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Llu=c3=ads_Vilanova?= , qemu-devel@nongnu.org Cc: Eduardo Habkost , Peter Crosthwaite , Stefan Hajnoczi , Riku Voipio , Markus Armbruster , Luiz Capitulino , Blue Swirl , Stefan Hajnoczi , =?UTF-8?Q?Andreas_F=c3=a4rber?= , Richard Henderson On 15/01/2016 17:38, Lluís Vilanova wrote: > Each event with the 'vcpu' property gets a per-vCPU dynamic tracing state. > > The set of enabled events with the 'vcpu' and 'tcg' properties is used > to select a per-vCPU physical TB cache. The number of events with both > properties is used to select the number of physical TB caches, and a > bitmap of the identifiers of such enabled events is used to select a > physical TB cache. > > Signed-off-by: Lluís Vilanova I may be wrong, but this patch and patches 3+5 seem overengineered. Why can't you just flush the TB cache entirely whenever the set of trace events changes, independent of whether they use the vcpu attribute? That's a very rare event. Paolo