* [PATCH] build: move TARGET_GPROF to config-host.mak
@ 2020-02-04 16:11 Paolo Bonzini
2020-02-04 16:41 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-02-04 16:11 UTC (permalink / raw)
To: qemu-devel
TARGET_GPROF is the same for all targets, write it to
config-host.mak instead.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
bsd-user/syscall.c | 6 +++---
configure | 4 +++-
linux-user/exit.c | 4 ++--
linux-user/signal.c | 2 +-
tests/check-block.sh | 2 +-
5 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
index 0d45b654bb..d38ec7a162 100644
--- a/bsd-user/syscall.c
+++ b/bsd-user/syscall.c
@@ -330,7 +330,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
switch(num) {
case TARGET_FREEBSD_NR_exit:
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
_mcleanup();
#endif
gdb_exit(cpu_env, arg1);
@@ -432,7 +432,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
switch(num) {
case TARGET_NETBSD_NR_exit:
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
_mcleanup();
#endif
gdb_exit(cpu_env, arg1);
@@ -511,7 +511,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
switch(num) {
case TARGET_OPENBSD_NR_exit:
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
_mcleanup();
#endif
gdb_exit(cpu_env, arg1);
diff --git a/configure b/configure
index 5095f01728..08c28e73db 100755
--- a/configure
+++ b/configure
@@ -6771,6 +6771,9 @@ fi
if test "$l2tpv3" = "yes" ; then
echo "CONFIG_L2TPV3=y" >> $config_host_mak
fi
+if test "$gprof" = "yes" ; then
+ echo "CONFIG_GPROF=y" >> $config_host_mak
+fi
if test "$cap_ng" = "yes" ; then
echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
fi
@@ -7951,7 +7954,6 @@ alpha)
esac
if test "$gprof" = "yes" ; then
- echo "TARGET_GPROF=y" >> $config_target_mak
if test "$target_linux_user" = "yes" ; then
cflags="-p $cflags"
ldflags="-p $ldflags"
diff --git a/linux-user/exit.c b/linux-user/exit.c
index a362ef67d2..1594015444 100644
--- a/linux-user/exit.c
+++ b/linux-user/exit.c
@@ -18,7 +18,7 @@
*/
#include "qemu/osdep.h"
#include "qemu.h"
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
#include <sys/gmon.h>
#endif
@@ -28,7 +28,7 @@ extern void __gcov_dump(void);
void preexit_cleanup(CPUArchState *env, int code)
{
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
_mcleanup();
#endif
#ifdef CONFIG_GCOV
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 5ca6d62b15..02f860ecb9 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -509,7 +509,7 @@ void signal_init(void)
act.sa_flags = SA_SIGINFO;
act.sa_sigaction = host_signal_handler;
for(i = 1; i <= TARGET_NSIG; i++) {
-#ifdef TARGET_GPROF
+#ifdef CONFIG_GPROF
if (i == SIGPROF) {
continue;
}
diff --git a/tests/check-block.sh b/tests/check-block.sh
index 679aedec50..ad320c21ba 100755
--- a/tests/check-block.sh
+++ b/tests/check-block.sh
@@ -16,7 +16,7 @@ if [ "$#" -ne 0 ]; then
format_list="$@"
fi
-if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
+if grep -q "CONFIG_GPROF=y" config-host.mak 2>/dev/null ; then
echo "GPROF is enabled ==> Not running the qemu-iotests."
exit 0
fi
--
2.21.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] build: move TARGET_GPROF to config-host.mak
2020-02-04 16:11 [PATCH] build: move TARGET_GPROF to config-host.mak Paolo Bonzini
@ 2020-02-04 16:41 ` Marc-André Lureau
2020-02-04 17:22 ` Philippe Mathieu-Daudé
2020-02-04 17:37 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Marc-André Lureau @ 2020-02-04 16:41 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU
On Tue, Feb 4, 2020 at 5:11 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> TARGET_GPROF is the same for all targets, write it to
> config-host.mak instead.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> bsd-user/syscall.c | 6 +++---
> configure | 4 +++-
> linux-user/exit.c | 4 ++--
> linux-user/signal.c | 2 +-
> tests/check-block.sh | 2 +-
> 5 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
> index 0d45b654bb..d38ec7a162 100644
> --- a/bsd-user/syscall.c
> +++ b/bsd-user/syscall.c
> @@ -330,7 +330,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_FREEBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> @@ -432,7 +432,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_NETBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> @@ -511,7 +511,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_OPENBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> diff --git a/configure b/configure
> index 5095f01728..08c28e73db 100755
> --- a/configure
> +++ b/configure
> @@ -6771,6 +6771,9 @@ fi
> if test "$l2tpv3" = "yes" ; then
> echo "CONFIG_L2TPV3=y" >> $config_host_mak
> fi
> +if test "$gprof" = "yes" ; then
> + echo "CONFIG_GPROF=y" >> $config_host_mak
> +fi
> if test "$cap_ng" = "yes" ; then
> echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
> fi
> @@ -7951,7 +7954,6 @@ alpha)
> esac
>
> if test "$gprof" = "yes" ; then
> - echo "TARGET_GPROF=y" >> $config_target_mak
> if test "$target_linux_user" = "yes" ; then
> cflags="-p $cflags"
> ldflags="-p $ldflags"
> diff --git a/linux-user/exit.c b/linux-user/exit.c
> index a362ef67d2..1594015444 100644
> --- a/linux-user/exit.c
> +++ b/linux-user/exit.c
> @@ -18,7 +18,7 @@
> */
> #include "qemu/osdep.h"
> #include "qemu.h"
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> #include <sys/gmon.h>
> #endif
>
> @@ -28,7 +28,7 @@ extern void __gcov_dump(void);
>
> void preexit_cleanup(CPUArchState *env, int code)
> {
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> #ifdef CONFIG_GCOV
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 5ca6d62b15..02f860ecb9 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -509,7 +509,7 @@ void signal_init(void)
> act.sa_flags = SA_SIGINFO;
> act.sa_sigaction = host_signal_handler;
> for(i = 1; i <= TARGET_NSIG; i++) {
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> if (i == SIGPROF) {
> continue;
> }
> diff --git a/tests/check-block.sh b/tests/check-block.sh
> index 679aedec50..ad320c21ba 100755
> --- a/tests/check-block.sh
> +++ b/tests/check-block.sh
> @@ -16,7 +16,7 @@ if [ "$#" -ne 0 ]; then
> format_list="$@"
> fi
>
> -if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
> +if grep -q "CONFIG_GPROF=y" config-host.mak 2>/dev/null ; then
> echo "GPROF is enabled ==> Not running the qemu-iotests."
> exit 0
> fi
> --
> 2.21.0
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build: move TARGET_GPROF to config-host.mak
2020-02-04 16:11 [PATCH] build: move TARGET_GPROF to config-host.mak Paolo Bonzini
2020-02-04 16:41 ` Marc-André Lureau
@ 2020-02-04 17:22 ` Philippe Mathieu-Daudé
2020-02-04 17:37 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-02-04 17:22 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 2/4/20 5:11 PM, Paolo Bonzini wrote:
> TARGET_GPROF is the same for all targets, write it to
> config-host.mak instead.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> bsd-user/syscall.c | 6 +++---
> configure | 4 +++-
> linux-user/exit.c | 4 ++--
> linux-user/signal.c | 2 +-
> tests/check-block.sh | 2 +-
> 5 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
> index 0d45b654bb..d38ec7a162 100644
> --- a/bsd-user/syscall.c
> +++ b/bsd-user/syscall.c
> @@ -330,7 +330,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_FREEBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> @@ -432,7 +432,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_NETBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> @@ -511,7 +511,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_OPENBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> diff --git a/configure b/configure
> index 5095f01728..08c28e73db 100755
> --- a/configure
> +++ b/configure
> @@ -6771,6 +6771,9 @@ fi
> if test "$l2tpv3" = "yes" ; then
> echo "CONFIG_L2TPV3=y" >> $config_host_mak
> fi
> +if test "$gprof" = "yes" ; then
> + echo "CONFIG_GPROF=y" >> $config_host_mak
> +fi
> if test "$cap_ng" = "yes" ; then
> echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
> fi
> @@ -7951,7 +7954,6 @@ alpha)
> esac
>
> if test "$gprof" = "yes" ; then
> - echo "TARGET_GPROF=y" >> $config_target_mak
> if test "$target_linux_user" = "yes" ; then
> cflags="-p $cflags"
> ldflags="-p $ldflags"
> diff --git a/linux-user/exit.c b/linux-user/exit.c
> index a362ef67d2..1594015444 100644
> --- a/linux-user/exit.c
> +++ b/linux-user/exit.c
> @@ -18,7 +18,7 @@
> */
> #include "qemu/osdep.h"
> #include "qemu.h"
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> #include <sys/gmon.h>
> #endif
>
> @@ -28,7 +28,7 @@ extern void __gcov_dump(void);
>
> void preexit_cleanup(CPUArchState *env, int code)
> {
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> #ifdef CONFIG_GCOV
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 5ca6d62b15..02f860ecb9 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -509,7 +509,7 @@ void signal_init(void)
> act.sa_flags = SA_SIGINFO;
> act.sa_sigaction = host_signal_handler;
> for(i = 1; i <= TARGET_NSIG; i++) {
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> if (i == SIGPROF) {
> continue;
> }
> diff --git a/tests/check-block.sh b/tests/check-block.sh
> index 679aedec50..ad320c21ba 100755
> --- a/tests/check-block.sh
> +++ b/tests/check-block.sh
> @@ -16,7 +16,7 @@ if [ "$#" -ne 0 ]; then
> format_list="$@"
> fi
>
> -if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
> +if grep -q "CONFIG_GPROF=y" config-host.mak 2>/dev/null ; then
> echo "GPROF is enabled ==> Not running the qemu-iotests."
> exit 0
> fi
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] build: move TARGET_GPROF to config-host.mak
2020-02-04 16:11 [PATCH] build: move TARGET_GPROF to config-host.mak Paolo Bonzini
2020-02-04 16:41 ` Marc-André Lureau
2020-02-04 17:22 ` Philippe Mathieu-Daudé
@ 2020-02-04 17:37 ` Alex Bennée
2 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2020-02-04 17:37 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
Paolo Bonzini <pbonzini@redhat.com> writes:
> TARGET_GPROF is the same for all targets, write it to
> config-host.mak instead.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> bsd-user/syscall.c | 6 +++---
> configure | 4 +++-
> linux-user/exit.c | 4 ++--
> linux-user/signal.c | 2 +-
> tests/check-block.sh | 2 +-
> 5 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
> index 0d45b654bb..d38ec7a162 100644
> --- a/bsd-user/syscall.c
> +++ b/bsd-user/syscall.c
> @@ -330,7 +330,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_FREEBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> @@ -432,7 +432,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_NETBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> @@ -511,7 +511,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
>
> switch(num) {
> case TARGET_OPENBSD_NR_exit:
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> gdb_exit(cpu_env, arg1);
> diff --git a/configure b/configure
> index 5095f01728..08c28e73db 100755
> --- a/configure
> +++ b/configure
> @@ -6771,6 +6771,9 @@ fi
> if test "$l2tpv3" = "yes" ; then
> echo "CONFIG_L2TPV3=y" >> $config_host_mak
> fi
> +if test "$gprof" = "yes" ; then
> + echo "CONFIG_GPROF=y" >> $config_host_mak
> +fi
> if test "$cap_ng" = "yes" ; then
> echo "CONFIG_LIBCAP_NG=y" >> $config_host_mak
> fi
> @@ -7951,7 +7954,6 @@ alpha)
> esac
>
> if test "$gprof" = "yes" ; then
> - echo "TARGET_GPROF=y" >> $config_target_mak
> if test "$target_linux_user" = "yes" ; then
> cflags="-p $cflags"
> ldflags="-p $ldflags"
> diff --git a/linux-user/exit.c b/linux-user/exit.c
> index a362ef67d2..1594015444 100644
> --- a/linux-user/exit.c
> +++ b/linux-user/exit.c
> @@ -18,7 +18,7 @@
> */
> #include "qemu/osdep.h"
> #include "qemu.h"
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> #include <sys/gmon.h>
> #endif
>
> @@ -28,7 +28,7 @@ extern void __gcov_dump(void);
>
> void preexit_cleanup(CPUArchState *env, int code)
> {
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> _mcleanup();
> #endif
> #ifdef CONFIG_GCOV
> diff --git a/linux-user/signal.c b/linux-user/signal.c
> index 5ca6d62b15..02f860ecb9 100644
> --- a/linux-user/signal.c
> +++ b/linux-user/signal.c
> @@ -509,7 +509,7 @@ void signal_init(void)
> act.sa_flags = SA_SIGINFO;
> act.sa_sigaction = host_signal_handler;
> for(i = 1; i <= TARGET_NSIG; i++) {
> -#ifdef TARGET_GPROF
> +#ifdef CONFIG_GPROF
> if (i == SIGPROF) {
> continue;
> }
> diff --git a/tests/check-block.sh b/tests/check-block.sh
> index 679aedec50..ad320c21ba 100755
> --- a/tests/check-block.sh
> +++ b/tests/check-block.sh
> @@ -16,7 +16,7 @@ if [ "$#" -ne 0 ]; then
> format_list="$@"
> fi
>
> -if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
> +if grep -q "CONFIG_GPROF=y" config-host.mak 2>/dev/null ; then
> echo "GPROF is enabled ==> Not running the qemu-iotests."
> exit 0
> fi
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-04 17:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 16:11 [PATCH] build: move TARGET_GPROF to config-host.mak Paolo Bonzini
2020-02-04 16:41 ` Marc-André Lureau
2020-02-04 17:22 ` Philippe Mathieu-Daudé
2020-02-04 17:37 ` Alex Bennée
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.