* [PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock
@ 2023-03-03 8:49 Richard W.M. Jones
2023-03-03 9:30 ` Philippe Mathieu-Daudé
2023-03-04 18:24 ` Richard Henderson
0 siblings, 2 replies; 3+ messages in thread
From: Richard W.M. Jones @ 2023-03-03 8:49 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, pbonzini, philmd
When CONFIG_PROFILER is set there are various undefined references to
profile_getclock. Include the header which defines this function.
For example:
../tcg/tcg.c: In function ‘tcg_gen_code’:
../tcg/tcg.c:4905:51: warning: implicit declaration of function ‘profile_getclock’ [-Wimplicit-function-declaration]
4905 | qatomic_set(&prof->opt_time, prof->opt_time - profile_getclock());
| ^~~~~~~~~~~~~~~~
Thanks: Philippe Mathieu-Daudé
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
accel/tcg/tcg-accel-ops.c | 1 +
accel/tcg/translate-all.c | 1 +
softmmu/runstate.c | 1 +
tcg/tcg.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index aeb1cbaf65..af35e0d092 100644
--- a/accel/tcg/tcg-accel-ops.c
+++ b/accel/tcg/tcg-accel-ops.c
@@ -31,6 +31,7 @@
#include "sysemu/cpu-timers.h"
#include "qemu/main-loop.h"
#include "qemu/guest-random.h"
+#include "qemu/timer.h"
#include "exec/exec-all.h"
#include "exec/hwaddr.h"
#include "exec/gdbstub.h"
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 4b5abc0f44..a5bea8f99c 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -51,6 +51,7 @@
#include "qemu/qemu-print.h"
#include "qemu/main-loop.h"
#include "qemu/cacheinfo.h"
+#include "qemu/timer.h"
#include "exec/log.h"
#include "sysemu/cpus.h"
#include "sysemu/cpu-timers.h"
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
index f9ad88e6a7..9b3611d56d 100644
--- a/softmmu/runstate.c
+++ b/softmmu/runstate.c
@@ -46,6 +46,7 @@
#include "qemu/module.h"
#include "qemu/plugin.h"
#include "qemu/sockets.h"
+#include "qemu/timer.h"
#include "qemu/thread.h"
#include "qom/object.h"
#include "qom/object_interfaces.h"
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 5cccc06ae3..6b830ade4c 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -36,6 +36,7 @@
#include "qemu/qemu-print.h"
#include "qemu/cacheflush.h"
#include "qemu/cacheinfo.h"
+#include "qemu/timer.h"
/* Note: the long term plan is to reduce the dependencies on the QEMU
CPU definitions. Currently they are used for qemu_ld/st
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock
2023-03-03 8:49 [PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock Richard W.M. Jones
@ 2023-03-03 9:30 ` Philippe Mathieu-Daudé
2023-03-04 18:24 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-03 9:30 UTC (permalink / raw)
To: Richard W.M. Jones, qemu-devel; +Cc: richard.henderson, pbonzini
On 3/3/23 09:49, Richard W.M. Jones wrote:
> When CONFIG_PROFILER is set there are various undefined references to
> profile_getclock. Include the header which defines this function.
>
> For example:
>
> ../tcg/tcg.c: In function ‘tcg_gen_code’:
> ../tcg/tcg.c:4905:51: warning: implicit declaration of function ‘profile_getclock’ [-Wimplicit-function-declaration]
> 4905 | qatomic_set(&prof->opt_time, prof->opt_time - profile_getclock());
> | ^~~~~~~~~~~~~~~~
>
> Thanks: Philippe Mathieu-Daudé
;)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
> accel/tcg/tcg-accel-ops.c | 1 +
> accel/tcg/translate-all.c | 1 +
> softmmu/runstate.c | 1 +
> tcg/tcg.c | 1 +
> 4 files changed, 4 insertions(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock
2023-03-03 8:49 [PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock Richard W.M. Jones
2023-03-03 9:30 ` Philippe Mathieu-Daudé
@ 2023-03-04 18:24 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-03-04 18:24 UTC (permalink / raw)
To: Richard W.M. Jones, qemu-devel; +Cc: pbonzini, philmd
On 3/3/23 00:49, Richard W.M. Jones wrote:
> When CONFIG_PROFILER is set there are various undefined references to
> profile_getclock. Include the header which defines this function.
>
> For example:
>
> ../tcg/tcg.c: In function ‘tcg_gen_code’:
> ../tcg/tcg.c:4905:51: warning: implicit declaration of function ‘profile_getclock’ [-Wimplicit-function-declaration]
> 4905 | qatomic_set(&prof->opt_time, prof->opt_time - profile_getclock());
> | ^~~~~~~~~~~~~~~~
>
> Thanks: Philippe Mathieu-Daudé
> Signed-off-by: Richard W.M. Jones<rjones@redhat.com>
> ---
> accel/tcg/tcg-accel-ops.c | 1 +
> accel/tcg/translate-all.c | 1 +
> softmmu/runstate.c | 1 +
> tcg/tcg.c | 1 +
> 4 files changed, 4 insertions(+)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
And queued to tcg-next.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-04 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-03 8:49 [PATCH v2] tcg: Include "qemu/timer.h" for profile_getclock Richard W.M. Jones
2023-03-03 9:30 ` Philippe Mathieu-Daudé
2023-03-04 18:24 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).