[5642] User qemu profiling
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
===================================================================
Makefile.target +6 -0
@@ -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
===================================================================
linux-user/syscall.c +6 -0
@@ -54,6 +54,9 @@#include <netinet/ip.h> #include <netinet/tcp.h> #include <qemu-common.h> +#ifdef HAVE_GPROF +#include <sys/gmon.h> +#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 ;