From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] User qemu profiling
Date: Thu, 6 Nov 2008 17:16:33 +0100 [thread overview]
Message-ID: <20081106161633.GD5083@volta.aurel32.net> (raw)
In-Reply-To: <761ea48b0810290228i6ad068b1maa9cd4ea325ab691@mail.gmail.com>
On Wed, Oct 29, 2008 at 10:28:14AM +0100, Laurent Desnogues wrote:
> Hello,
>
> this patch:
>
> - 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
>
> BTW, I wonder why -p is preferred over -pg for profiling.
>
> Thanks,
>
> Laurent
Applied, thanks
> Index: Makefile.target
> ===================================================================
> --- Makefile.target (revision 5545)
> +++ Makefile.target (working copy)
> @@ -394,6 +394,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)
> Index: linux-user/syscall.c
> ===================================================================
> --- linux-user/syscall.c (revision 5566)
> +++ linux-user/syscall.c (working copy)
> @@ -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;
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
prev parent reply other threads:[~2008-11-06 16:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 9:28 [Qemu-devel] [PATCH] User qemu profiling Laurent Desnogues
2008-11-06 16:16 ` Aurelien Jarno [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081106161633.GD5083@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.