* [PATCH] tcg: Include "qemu/timer.h" for profile_getclock
@ 2023-03-02 16:29 Richard W.M. Jones
2023-03-02 21:56 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Richard W.M. Jones @ 2023-03-02 16:29 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson
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());
| ^~~~~~~~~~~~~~~~
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
---
tcg/tcg.c | 1 +
1 file changed, 1 insertion(+)
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] 2+ messages in thread
* Re: [PATCH] tcg: Include "qemu/timer.h" for profile_getclock
2023-03-02 16:29 [PATCH] tcg: Include "qemu/timer.h" for profile_getclock Richard W.M. Jones
@ 2023-03-02 21:56 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-03-02 21:56 UTC (permalink / raw)
To: Richard W.M. Jones, qemu-devel; +Cc: richard.henderson
On 2/3/23 17:29, 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());
> | ^~~~~~~~~~~~~~~~
>
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
> tcg/tcg.c | 1 +
> 1 file changed, 1 insertion(+)
These files have the same issue:
- softmmu/runstate.c
- accel/tcg/translate-all.c
- accel/tcg/tcg-accel-ops.c
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-02 21:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 16:29 [PATCH] tcg: Include "qemu/timer.h" for profile_getclock Richard W.M. Jones
2023-03-02 21:56 ` Philippe Mathieu-Daudé
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.