20
20
#include "qemu/osdep.h"
21
21
#include "qemu/qemu-print.h"
22
22
#include "qapi/error.h"
23
- #include "qapi/qapi-commands-machine.h"
24
23
#include "qapi/type-helpers.h"
25
24
#include "hw/core/tcg-cpu-ops.h"
26
25
#include "trace.h"
27
26
#include "disas/disas.h"
28
27
#include "exec/exec-all.h"
29
28
#include "tcg/tcg.h"
30
29
#include "qemu/atomic.h"
31
- #include "qemu/timer.h"
32
30
#include "qemu/rcu.h"
33
31
#include "exec/log.h"
34
32
#include "qemu/main-loop.h"
38
36
#include "sysemu/cpus.h"
39
37
#include "exec/cpu-all.h"
40
38
#include "sysemu/cpu-timers.h"
41
- #include "sysemu /replay.h"
39
+ #include "exec /replay-core .h"
42
40
#include "sysemu/tcg.h"
43
41
#include "qemu/etrace.h"
44
42
#include "exec/helper-proto.h"
@@ -65,8 +63,8 @@ typedef struct SyncClocks {
65
63
#define MAX_DELAY_PRINT_RATE 2000000000LL
66
64
#define MAX_NB_PRINTS 100
67
65
68
- static int64_t max_delay ;
69
- static int64_t max_advance ;
66
+ int64_t max_delay ;
67
+ int64_t max_advance ;
70
68
71
69
static void align_clocks (SyncClocks * sc , CPUState * cpu )
72
70
{
@@ -1123,86 +1121,3 @@ void tcg_exec_unrealizefn(CPUState *cpu)
1123
1121
tlb_destroy (cpu );
1124
1122
g_free_rcu (cpu -> tb_jmp_cache , rcu );
1125
1123
}
1126
-
1127
- #ifndef CONFIG_USER_ONLY
1128
-
1129
- static void dump_drift_info (GString * buf )
1130
- {
1131
- if (!icount_enabled ()) {
1132
- return ;
1133
- }
1134
-
1135
- g_string_append_printf (buf , "Host - Guest clock %" PRIi64 " ms\n" ,
1136
- (cpu_get_clock () - icount_get ()) / SCALE_MS );
1137
- if (icount_align_option ) {
1138
- g_string_append_printf (buf , "Max guest delay %" PRIi64 " ms\n" ,
1139
- - max_delay / SCALE_MS );
1140
- g_string_append_printf (buf , "Max guest advance %" PRIi64 " ms\n" ,
1141
- max_advance / SCALE_MS );
1142
- } else {
1143
- g_string_append_printf (buf , "Max guest delay NA\n" );
1144
- g_string_append_printf (buf , "Max guest advance NA\n" );
1145
- }
1146
- }
1147
-
1148
- HumanReadableText * qmp_x_query_jit (Error * * errp )
1149
- {
1150
- g_autoptr (GString ) buf = g_string_new ("" );
1151
-
1152
- if (!tcg_enabled ()) {
1153
- error_setg (errp , "JIT information is only available with accel=tcg" );
1154
- return NULL ;
1155
- }
1156
-
1157
- dump_exec_info (buf );
1158
- dump_drift_info (buf );
1159
-
1160
- return human_readable_text_from_str (buf );
1161
- }
1162
-
1163
- HumanReadableText * qmp_x_query_opcount (Error * * errp )
1164
- {
1165
- g_autoptr (GString ) buf = g_string_new ("" );
1166
-
1167
- if (!tcg_enabled ()) {
1168
- error_setg (errp , "Opcode count information is only available with accel=tcg" );
1169
- return NULL ;
1170
- }
1171
-
1172
- tcg_dump_op_count (buf );
1173
-
1174
- return human_readable_text_from_str (buf );
1175
- }
1176
-
1177
- #ifdef CONFIG_PROFILER
1178
-
1179
- int64_t dev_time ;
1180
-
1181
- HumanReadableText * qmp_x_query_profile (Error * * errp )
1182
- {
1183
- g_autoptr (GString ) buf = g_string_new ("" );
1184
- static int64_t last_cpu_exec_time ;
1185
- int64_t cpu_exec_time ;
1186
- int64_t delta ;
1187
-
1188
- cpu_exec_time = tcg_cpu_exec_time ();
1189
- delta = cpu_exec_time - last_cpu_exec_time ;
1190
-
1191
- g_string_append_printf (buf , "async time %" PRId64 " (%0.3f)\n" ,
1192
- dev_time , dev_time / (double )NANOSECONDS_PER_SECOND );
1193
- g_string_append_printf (buf , "qemu time %" PRId64 " (%0.3f)\n" ,
1194
- delta , delta / (double )NANOSECONDS_PER_SECOND );
1195
- last_cpu_exec_time = cpu_exec_time ;
1196
- dev_time = 0 ;
1197
-
1198
- return human_readable_text_from_str (buf );
1199
- }
1200
- #else
1201
- HumanReadableText * qmp_x_query_profile (Error * * errp )
1202
- {
1203
- error_setg (errp , "Internal profiler not compiled" );
1204
- return NULL ;
1205
- }
1206
- #endif
1207
-
1208
- #endif /* !CONFIG_USER_ONLY */
0 commit comments