@@ -202,10 +202,6 @@ void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
202
202
uintptr_t host_pc )
203
203
{
204
204
uint64_t data [TARGET_INSN_START_WORDS ];
205
- #ifdef CONFIG_PROFILER
206
- TCGProfile * prof = & tcg_ctx -> prof ;
207
- int64_t ti = profile_getclock ();
208
- #endif
209
205
int insns_left = cpu_unwind_data_from_tb (tb , host_pc , data );
210
206
211
207
if (insns_left < 0 ) {
@@ -222,12 +218,6 @@ void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb,
222
218
}
223
219
224
220
cpu -> cc -> tcg_ops -> restore_state_to_opc (cpu , tb , data );
225
-
226
- #ifdef CONFIG_PROFILER
227
- qatomic_set (& prof -> restore_time ,
228
- prof -> restore_time + profile_getclock () - ti );
229
- qatomic_set (& prof -> restore_count , prof -> restore_count + 1 );
230
- #endif
231
221
}
232
222
233
223
bool cpu_restore_state (CPUState * cpu , uintptr_t host_pc )
@@ -290,13 +280,6 @@ static int setjmp_gen_code(CPUArchState *env, TranslationBlock *tb,
290
280
tcg_ctx -> cpu = NULL ;
291
281
* max_insns = tb -> icount ;
292
282
293
- #ifdef CONFIG_PROFILER
294
- qatomic_set (& tcg_ctx -> prof .tb_count , tcg_ctx -> prof .tb_count + 1 );
295
- qatomic_set (& tcg_ctx -> prof .interm_time ,
296
- tcg_ctx -> prof .interm_time + profile_getclock () - * ti );
297
- * ti = profile_getclock ();
298
- #endif
299
-
300
283
return tcg_gen_code (tcg_ctx , tb , pc );
301
284
}
302
285
@@ -310,9 +293,6 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
310
293
tb_page_addr_t phys_pc ;
311
294
tcg_insn_unit * gen_code_buf ;
312
295
int gen_code_size , search_size , max_insns ;
313
- #ifdef CONFIG_PROFILER
314
- TCGProfile * prof = & tcg_ctx -> prof ;
315
- #endif
316
296
int64_t ti ;
317
297
void * host_pc ;
318
298
@@ -371,12 +351,6 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
371
351
372
352
tb_overflow :
373
353
374
- #ifdef CONFIG_PROFILER
375
- /* includes aborted translations because of exceptions */
376
- qatomic_set (& prof -> tb_count1 , prof -> tb_count1 + 1 );
377
- ti = profile_getclock ();
378
- #endif
379
-
380
354
trace_translate_block (tb , pc , tb -> tc .ptr );
381
355
382
356
gen_code_size = setjmp_gen_code (env , tb , pc , host_pc , & max_insns , & ti );
@@ -431,13 +405,6 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
431
405
*/
432
406
perf_report_code (pc , tb , tcg_splitwx_to_rx (gen_code_buf ));
433
407
434
- #ifdef CONFIG_PROFILER
435
- qatomic_set (& prof -> code_time , prof -> code_time + profile_getclock () - ti );
436
- qatomic_set (& prof -> code_in_len , prof -> code_in_len + tb -> size );
437
- qatomic_set (& prof -> code_out_len , prof -> code_out_len + gen_code_size );
438
- qatomic_set (& prof -> search_out_len , prof -> search_out_len + search_size );
439
- #endif
440
-
441
408
if (qemu_loglevel_mask (CPU_LOG_TB_OUT_ASM ) &&
442
409
qemu_log_in_addr_range (pc )) {
443
410
FILE * logfile = qemu_log_trylock ();
0 commit comments