From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMatF-0003VH-6h for qemu-devel@nongnu.org; Tue, 04 Aug 2015 08:00:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMatB-0005KZ-13 for qemu-devel@nongnu.org; Tue, 04 Aug 2015 08:00:17 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:40644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMatA-00058z-SP for qemu-devel@nongnu.org; Tue, 04 Aug 2015 08:00:12 -0400 Date: Tue, 4 Aug 2015 13:59:58 +0200 From: Aurelien Jarno Message-ID: <20150804115957.GA6574@aurel32.net> References: <1438593291-27109-1-git-send-email-alex.bennee@linaro.org> <1438593291-27109-2-git-send-email-alex.bennee@linaro.org> <55BF6F68.1090103@redhat.com> <87k2tblcxq.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <87k2tblcxq.fsf@linaro.org> Subject: Re: [Qemu-devel] [PATCH v4 01/11] tcg: add ability to dump /tmp/perf-.map files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex =?iso-8859-15?Q?Benn=E9e?= Cc: qemu-trivial@nongnu.org, Paolo Bonzini , crosthwaitepeter@gmail.com, qemu-devel@nongnu.org, rth@twiddle.net On 2015-08-04 08:39, Alex Benn=E9e wrote: >=20 > Paolo Bonzini writes: >=20 > > On 03/08/2015 11:14, Alex Benn=E9e wrote: > >> This allows the perf tool to map samples to each individual translation > >> block. This could be expanded for user space but currently it gives > >> enough information to find any hotblocks by other means. > >>=20 > >> Signed-off-by: Alex Benn=E9e > > > > What happens if you encounter a tb_flush? >=20 > At the point of a tb_flush all bets are off as we will re-generate all > the blocks at potentially different locations in the translation buffer. > However for most analysis cases you are unlikely to cause the code > buffer to overflow. Most other uses of tb_flush are the result > debugging. >=20 > I could add a printf when --perfmap is enabled to flag when a flush > happens to signal to the user? I guess some more caveats in the flag > description wouldn't hurt. >=20 > We could consider truncating and re-starting the JIT dump at each flush? You also need to take care about TB invalidation. When the last generated TB is invalidated, the code pointer is rolled back to the end of the previous TB. In that case the last entry of the dump might should be replaced by the new value. If the invalidated TB is not the last one, it is just left in the generated code. --=20 Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net