From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf4zb-0000v6-Hi for qemu-devel@nongnu.org; Fri, 17 Oct 2014 06:42:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xf4zV-0007aR-Ui for qemu-devel@nongnu.org; Fri, 17 Oct 2014 06:42:43 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:47772 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xf4zV-0007X7-OQ for qemu-devel@nongnu.org; Fri, 17 Oct 2014 06:42:37 -0400 References: <543F232A.6080104@gmail.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= Message-ID: <87tx337zbu.fsf@linaro.org> In-reply-to: Date: Fri, 17 Oct 2014 11:43:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Counting barrier instructions in ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar Cc: Peter Maydell , QEMU Developers Pranith Kumar writes: > Hi Peter, > > On Thu, Oct 16, 2014 at 4:05 AM, Peter Maydell wrote: >> On 16 October 2014 03:45, Pranith Kumar wrote: >>> The problem I am facing is that this seems to be crashing when run with a >>> multi-threaded executable. >> >> This is nothing to do with your changes -- user-mode QEMU does not >> support multi-threaded guest executables. QEMU may crash, hang, >> or stop with an assertion failure, fairly randomly. Don't try >> to run multithreaded guests :-) > > OK, I will try to gather the statistics in system mode. Is there any > way to indicate from within the system to qemu to start collecting the stats? > > I dont want to collect the stats for bootup and other unrelated code > paths. You could enable CONTEXTIDR in the kernel and then make your counts against an array indexed by it. I've used that technique before to profile guest hot-blocks and work out which guest PID was responsible. -- Alex Bennée