From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atcDo-00013S-2A for qemu-devel@nongnu.org; Fri, 22 Apr 2016 10:38:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atcDj-0000bC-QR for qemu-devel@nongnu.org; Fri, 22 Apr 2016 10:38:15 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:35420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atcDj-0000b7-KC for qemu-devel@nongnu.org; Fri, 22 Apr 2016 10:38:11 -0400 Received: by mail-wm0-x235.google.com with SMTP id e201so20779159wme.0 for ; Fri, 22 Apr 2016 07:38:11 -0700 (PDT) References: <1461107270-19234-1-git-send-email-cota@braap.org> <1461107270-19234-12-git-send-email-cota@braap.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <1461107270-19234-12-git-send-email-cota@braap.org> Date: Fri, 22 Apr 2016 15:38:09 +0100 Message-ID: <87fuudu2su.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 11/11] translate-all: add tb hash bucket info to 'info jit' dump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" Cc: QEMU Developers , MTTCG Devel , Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Peter Maydell , Sergey Fedorov Emilio G. Cota writes: > Suggested-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > translate-all.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/translate-all.c b/translate-all.c > index 617a572..769bffc 100644 > --- a/translate-all.c > +++ b/translate-all.c > @@ -1664,6 +1664,8 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) > { > int i, target_code_size, max_target_code_size; > int direct_jmp_count, direct_jmp2_count, cross_page; > + double ht_avg_len; > + size_t ht_heads; > TranslationBlock *tb; > > target_code_size = 0; > @@ -1715,6 +1717,9 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) > direct_jmp2_count, > tcg_ctx.tb_ctx.nb_tbs ? (direct_jmp2_count * 100) / > tcg_ctx.tb_ctx.nb_tbs : 0); > + ht_avg_len = qht_avg_bucket_chain_length(&tcg_ctx.tb_ctx.htable, &ht_heads); > + cpu_fprintf(f, "TB hash avg chain %0.5f buckets\n", ht_avg_len); > + cpu_fprintf(f, "TB hash size %zu head buckets\n", ht_heads); > cpu_fprintf(f, "\nStatistics:\n"); > cpu_fprintf(f, "TB flush count %d\n", tcg_ctx.tb_ctx.tb_flush_count); > cpu_fprintf(f, "TB invalidate count %d\n", -- Alex Bennée