]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg: Include "qemu/timer.h" for profile_getclock
authorRichard W.M. Jones <rjones@redhat.com>
Fri, 3 Mar 2023 08:49:48 +0000 (08:49 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 5 Mar 2023 21:44:07 +0000 (13:44 -0800)
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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230303084948.3351546-1-rjones@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/tcg-accel-ops.c
accel/tcg/translate-all.c
softmmu/runstate.c
tcg/tcg.c

index aeb1cbaf65ff57be3c2f60a29d5ceda036367c28..af35e0d0921b45e35a3a66d6a1b771d698f48a8e 100644 (file)
@@ -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"
index 4b5abc0f44b4d42d14df717db84faa8a7522ea5e..a5bea8f99c8eda6ef3c446b8cd8deac0da27359e 100644 (file)
@@ -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"
index f9ad88e6a733b9273308d9590da9c9cc76d32a7f..9b3611d56db3b4652db38c1e871eb03def56b61d 100644 (file)
@@ -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"
index 5cccc06ae38d986eeda195e9a240d6cb45d53a96..6b830ade4c4a71d1c8e5d83ec63fd2996962675c 100644 (file)
--- 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