tcg: Include "qemu/timer.h" for profile_getclock
PATCH 1/1 tcg: Include "qemu/timer.h" for profile_getclock
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());
| ^~~~~~~~~~~~~~~~
--- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+)
tcg/tcg.c +1 -0
@@ -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
Signature · 1 line
2.39.2
Quoted 10 lines · Richard W.M. Jones
When
CONFIG_PROFILERis set there are various undefined references toprofile_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());
| ^~~~~~~~~~~~~~~~
Quoted 4 lines
Signed-off-by Richard W.M. Jones <[email protected]>--- 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