Received: from eggs.gnu.org ([2001:4830:134:3::10]:46659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBnHq-0005nQ-Lr for qemu-devel@nongnu.org; Fri, 07 Feb 2014 10:24:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBnHj-0005xU-OS for qemu-devel@nongnu.org; Fri, 07 Feb 2014 10:24:14 -0500 Received: from roura.ac.upc.es ([147.83.33.10]:44144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBnHj-0005xJ-BF for qemu-devel@nongnu.org; Fri, 07 Feb 2014 10:24:07 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <20140131160902.32741.2680.stgit@fimbulvetr.bsc.es> <52F0FFBD.8050801@twiddle.net> <87k3davcs3.fsf@fimbulvetr.bsc.es> <52F3B105.80908@twiddle.net> <87a9e411r9.fsf@fimbulvetr.bsc.es> <52F4F27F.5000703@twiddle.net> Date: Fri, 07 Feb 2014 16:24:03 +0100 In-Reply-To: (Peter Maydell's message of "Fri, 7 Feb 2014 15:13:09 +0000") Message-ID: <8761orkkto.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 00/12] trace: [tcg] Allow tracing guest events in TCG-generated code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Stefan Hajnoczi , Richard Henderson Peter Maydell writes: > On 7 February 2014 14:49, Richard Henderson wrote: >> On 02/06/2014 11:26 AM, Llu=C3=ADs Vilanova wrote: >>>> > At which point, option 2 would be the best bet, I think. >>> Right. For the 3rd option I was also thinking about having per-vCPU tra= cing >>> states (in the case of guest events), so that you can trace separate ev= ents >>> depending on the vCPU. >>>=20 >>> Which reminds me, I should add a vCPU pointer to the "guest_vmem" event= , since >>> otherwise you cannot differentiate accesses among different vCPUs. >>=20 >> The TB cache is shared, so you won't be able to do option 3 for different >> events for different cpus. You could only do option 1 for that > I have a vague plan in the back of my mind that we should make the > TB cache be per-CPU, as a step towards better handling of multithreaded > linux-user guest binaries and also heterogenous multiple CPU support... What I implemented is something in between. I have multiple TB caches, and = each CPU selects one of them according to what tcg tracing events they have enab= led (i.e., if two CPUs have the same events, they use the same TB cache). Although I can see how having one private TB per core could improve TB cache hits when running multiple applications. 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