Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ky7W1-0006m4-BE for qemu-devel@nongnu.org; Thu, 06 Nov 2008 11:15:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ky7W0-0006lc-G5 for qemu-devel@nongnu.org; Thu, 06 Nov 2008 11:15:24 -0500 Received: from [199.232.76.173] (port=49969 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky7W0-0006lW-AQ for qemu-devel@nongnu.org; Thu, 06 Nov 2008 11:15:24 -0500 Received: from savannah.gnu.org ([199.232.41.3]:40609 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ky7W0-0007ud-3H for qemu-devel@nongnu.org; Thu, 06 Nov 2008 11:15:24 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Ky7Vy-00005S-6M for qemu-devel@nongnu.org; Thu, 06 Nov 2008 16:15:22 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Ky7Vw-00005N-Q8 for qemu-devel@nongnu.org; Thu, 06 Nov 2008 16:15:21 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Thu, 06 Nov 2008 16:15:20 +0000 Subject: [Qemu-devel] [5642] User qemu profiling Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5642 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5642 Author: aurel32 Date: 2008-11-06 16:15:18 +0000 (Thu, 06 Nov 2008) Log Message: ----------- User qemu profiling - Makefile.target: re-enable profiling for user qemu. It seems profiling was (accidently?) removed by commit 3937 - syscall.c: * add an include to get _mcleanup prototype * add a call to _mcleanup for exit_group in a way similar to what is done for exit (Laurent Desnogues) Modified Paths: -------------- trunk/Makefile.target trunk/linux-user/syscall.c Modified: trunk/Makefile.target =================================================================== --- trunk/Makefile.target 2008-11-06 16:15:08 UTC (rev 5641) +++ trunk/Makefile.target 2008-11-06 16:15:18 UTC (rev 5642) @@ -397,6 +397,12 @@ endif endif +# profiling code +ifdef TARGET_GPROF +LDFLAGS+=-p +CFLAGS+=-p +endif + OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \ elfload.o linuxload.o uaccess.o LIBS+= $(AIOLIBS) Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2008-11-06 16:15:08 UTC (rev 5641) +++ trunk/linux-user/syscall.c 2008-11-06 16:15:18 UTC (rev 5642) @@ -54,6 +54,9 @@ #include #include #include +#ifdef HAVE_GPROF +#include +#endif #define termios host_termios #define winsize host_winsize @@ -4864,6 +4867,9 @@ #ifdef __NR_exit_group /* new thread calls */ case TARGET_NR_exit_group: +#ifdef HAVE_GPROF + _mcleanup(); +#endif gdb_exit(cpu_env, arg1); ret = get_errno(exit_group(arg1)); break;