Revision 57fec1fe exec.c

b/exec.c
312 312
    int cpu_index;
313 313

  
314 314
    if (!code_gen_ptr) {
315
        cpu_gen_init();
315 316
        code_gen_ptr = code_gen_buffer;
316 317
        page_init();
317 318
        io_mem_init();
......
1238 1239
    { CPU_LOG_TB_IN_ASM, "in_asm",
1239 1240
      "show target assembly code for each compiled TB" },
1240 1241
    { CPU_LOG_TB_OP, "op",
1241
      "show micro ops for each compiled TB (only usable if 'in_asm' used)" },
1242
      "show micro ops for each compiled TB" },
1242 1243
#ifdef TARGET_I386
1243 1244
    { CPU_LOG_TB_OP_OPT, "op_opt",
1244
      "show micro ops after optimization for each compiled TB" },
1245
      "show micro ops before eflags optimization" },
1245 1246
#endif
1246 1247
    { CPU_LOG_INT, "int",
1247 1248
      "show interrupts/exceptions in short format" },
......
2935 2936
        }
2936 2937
    }
2937 2938
    /* XXX: avoid using doubles ? */
2939
    cpu_fprintf(f, "Translation buffer state:\n");
2938 2940
    cpu_fprintf(f, "TB count            %d\n", nb_tbs);
2939 2941
    cpu_fprintf(f, "TB avg target size  %d max=%d bytes\n",
2940 2942
                nb_tbs ? target_code_size / nb_tbs : 0,
......
2950 2952
                nb_tbs ? (direct_jmp_count * 100) / nb_tbs : 0,
2951 2953
                direct_jmp2_count,
2952 2954
                nb_tbs ? (direct_jmp2_count * 100) / nb_tbs : 0);
2955
    cpu_fprintf(f, "\nStatistics:\n");
2953 2956
    cpu_fprintf(f, "TB flush count      %d\n", tb_flush_count);
2954 2957
    cpu_fprintf(f, "TB invalidate count %d\n", tb_phys_invalidate_count);
2955 2958
    cpu_fprintf(f, "TLB flush count     %d\n", tlb_flush_count);
2959
#ifdef CONFIG_PROFILER
2960
    {
2961
        int64_t tot;
2962
        tot = dyngen_interm_time + dyngen_code_time;
2963
        cpu_fprintf(f, "JIT cycles          %" PRId64 " (%0.3f s at 2.4 GHz)\n",
2964
                    tot, tot / 2.4e9);
2965
        cpu_fprintf(f, "translated TBs      %" PRId64 " (aborted=%" PRId64 " %0.1f%%)\n", 
2966
                    dyngen_tb_count, 
2967
                    dyngen_tb_count1 - dyngen_tb_count,
2968
                    dyngen_tb_count1 ? (double)(dyngen_tb_count1 - dyngen_tb_count) / dyngen_tb_count1 * 100.0 : 0);
2969
        cpu_fprintf(f, "avg ops/TB          %0.1f max=%d\n", 
2970
                    dyngen_tb_count ? (double)dyngen_op_count / dyngen_tb_count : 0, dyngen_op_count_max);
2971
        cpu_fprintf(f, "old ops/total ops   %0.1f%%\n", 
2972
                    dyngen_op_count ? (double)dyngen_old_op_count / dyngen_op_count * 100.0 : 0);
2973
        cpu_fprintf(f, "deleted ops/TB      %0.2f\n",
2974
                    dyngen_tb_count ? 
2975
                    (double)dyngen_tcg_del_op_count / dyngen_tb_count : 0);
2976
        cpu_fprintf(f, "cycles/op           %0.1f\n", 
2977
                    dyngen_op_count ? (double)tot / dyngen_op_count : 0);
2978
        cpu_fprintf(f, "cycles/in byte     %0.1f\n", 
2979
                    dyngen_code_in_len ? (double)tot / dyngen_code_in_len : 0);
2980
        cpu_fprintf(f, "cycles/out byte     %0.1f\n", 
2981
                    dyngen_code_out_len ? (double)tot / dyngen_code_out_len : 0);
2982
        if (tot == 0)
2983
            tot = 1;
2984
        cpu_fprintf(f, "  gen_interm time   %0.1f%%\n", 
2985
                    (double)dyngen_interm_time / tot * 100.0);
2986
        cpu_fprintf(f, "  gen_code time     %0.1f%%\n", 
2987
                    (double)dyngen_code_time / tot * 100.0);
2988
        cpu_fprintf(f, "cpu_restore count   %" PRId64 "\n",
2989
                    dyngen_restore_count);
2990
        cpu_fprintf(f, "  avg cycles        %0.1f\n",
2991
                    dyngen_restore_count ? (double)dyngen_restore_time / dyngen_restore_count : 0);
2992
        {
2993
            extern void dump_op_count(void);
2994
            dump_op_count();
2995
        }
2996
    }
2997
#endif
2956 2998
}
2957 2999

  
2958 3000
#if !defined(CONFIG_USER_ONLY)

Also available in: Unified diff