[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/3] trace: instrument and trace tcg tb flush activity |
Date: |
Tue, 15 Jul 2014 15:16:26 +0100 |
Paolo Bonzini writes:
> Il 15/07/2014 13:42, Alex Bennée ha scritto:
>> + trace_inc_counter(&cpu->tb_jmp_cache_stats.misses);
>> tb = tb_find_slow(env, pc, cs_base, flags);
>> + } else {
>> + trace_inc_counter(&cpu->tb_jmp_cache_stats.hits);
>> }
>
> I think this is premature optimization...
How do you mean? It's not really an optimization as much as an
instrumentation. It should compile away to nothing if you don't have
tracing enabled in your build.
OTOH the numbers I'm seeing are very interesting in so far as the fast
path could be a potential waste of code in a lot of cases.
--
Alex Bennée
[Qemu-devel] [PATCH v2 2/3] trace: add some tcg tracing support, Alex Bennée, 2014/07/15