profiler functions - wqweto/tinycc GitHub Wiki
Profiling results as of commit cdc16d4
| Function Name | Inclusive Samples | Exclusive Samples | Inclusive Samples % | Exclusive Samples % |
|---|---|---|---|---|
| __open | 5'494 | 5'494 | 36.98 | 36.98 |
| next_nomacro1 | 10'803 | 2'533 | 72.72 | 17.05 |
| __read | 783 | 783 | 5.27 | 5.27 |
| __close | 609 | 609 | 4.10 | 4.10 |
| preprocess_skip | 607 | 494 | 4.09 | 3.33 |
| next | 12'781 | 304 | 86.03 | 2.05 |
| TOK_GET | 260 | 260 | 1.75 | 1.75 |
| memcpy | 254 | 254 | 1.71 | 1.71 |
| next_nomacro_spc | 11'689 | 237 | 78.68 | 1.60 |
| _free | 223 | 223 | 1.50 | 1.50 |
| macro_subst | 710 | 196 | 4.78 | 1.32 |
| _malloc | 187 | 187 | 1.26 | 1.26 |
| tok_alloc_new | 286 | 155 | 1.93 | 1.04 |
| tok_str_add2 | 191 | 154 | 1.29 | 1.04 |
| tal_realloc_impl | 177 | 149 | 1.19 | 1.00 |
| parse_btype | 1'669 | 144 | 11.23 | 0.97 |
| preprocess | 8'552 | 141 | 57.57 | 0.95 |
| define_find | 134 | 134 | 0.90 | 0.90 |
| sym_push2 | 120 | 120 | 0.81 | 0.81 |
| _remove | 118 | 118 | 0.79 | 0.79 |
| parse_define | 1'061 | 109 | 7.14 | 0.73 |
| __sym_malloc | 165 | 108 | 1.11 | 0.73 |
| cstr_ccat | 96 | 96 | 0.65 | 0.65 |
| free_defines | 109 | 95 | 0.73 | 0.64 |
| sym_pop | 94 | 94 | 0.63 | 0.63 |
| post_type | 911 | 89 | 6.13 | 0.60 |
| _realloc | 85 | 85 | 0.57 | 0.57 |
| type_decl | 1'231 | 79 | 8.29 | 0.53 |
| macro_subst_tok | 819 | 71 | 5.51 | 0.48 |
| _fgets | 70 | 70 | 0.47 | 0.47 |
| macro_twosharps | 134 | 68 | 0.90 | 0.46 |
| _fclose | 60 | 60 | 0.40 | 0.40 |
| struct_decl | 867 | 55 | 5.84 | 0.37 |
| define_push | 173 | 54 | 1.16 | 0.36 |
| decl0 | 13'613 | 51 | 91.63 | 0.34 |
| search_cached_include | 60 | 49 | 0.40 | 0.33 |
| next_nomacro | 1'102 | 40 | 7.42 | 0.27 |
| parse_comment | 39 | 39 | 0.26 | 0.26 |
| pstrcat | 52 | 33 | 0.35 | 0.22 |
| type_size | 32 | 32 | 0.22 | 0.22 |
| define_print | 30 | 30 | 0.20 | 0.20 |
| memset | 30 | 30 | 0.20 | 0.20 |
| parse_attribute | 403 | 30 | 2.71 | 0.20 |
| _fwrite | 28 | 28 | 0.19 | 0.19 |
| macro_arg_subst | 127 | 28 | 0.85 | 0.19 |
| preprocess_delete | 124 | 28 | 0.83 | 0.19 |
| tok_str_add | 40 | 27 | 0.27 | 0.18 |
| unary | 149 | 27 | 1.00 | 0.18 |
| parse_number | 22 | 22 | 0.15 | 0.15 |
| pstrcpy | 19 | 19 | 0.13 | 0.13 |
| _fopen | 18 | 18 | 0.12 | 0.12 |
| gen_cast | 22 | 17 | 0.15 | 0.11 |
| external_sym | 35 | 16 | 0.24 | 0.11 |
| args_parser_add_file | 50 | 15 | 0.34 | 0.10 |
| end_macro | 21 | 15 | 0.14 | 0.10 |
| __security_check_cookie | 14 | 14 | 0.09 | 0.09 |
| tcc_open_bf | 42 | 14 | 0.28 | 0.09 |
| sym_push | 32 | 13 | 0.22 | 0.09 |
| tcc_open | 5'487 | 13 | 36.93 | 0.09 |
| tok_str_add_tok | 39 | 12 | 0.26 | 0.08 |
| ___ascii_stricmp | 11 | 11 | 0.07 | 0.07 |
| expr_cond | 252 | 11 | 1.70 | 0.07 |
| expr_preprocess | 128 | 11 | 0.86 | 0.07 |
| sym_find | 11 | 11 | 0.07 | 0.07 |
| tcc_parse_args1 | 182 | 11 | 1.23 | 0.07 |
| define_print_prepared | 10 | 10 | 0.07 | 0.07 |
| next_argstream | 42 | 10 | 0.28 | 0.07 |
| vsetc | 10 | 10 | 0.07 | 0.07 |
| block | 267 | 9 | 1.80 | 0.06 |
| gen_opic | 24 | 9 | 0.16 | 0.06 |
| ___stdio_common_vsprintf | 8 | 8 | 0.05 | 0.05 |
| expr_and | 8 | 8 | 0.05 | 0.05 |
| get_reg | 8 | 8 | 0.05 | 0.05 |
| gv | 30 | 8 | 0.20 | 0.05 |
| tcc_fileextension | 12 | 8 | 0.08 | 0.05 |
| tcc_strdup | 16 | 8 | 0.11 | 0.05 |
| expr_cmp | 11 | 7 | 0.07 | 0.05 |
| handle_eob | 757 | 7 | 5.10 | 0.05 |
| parse_pp_string | 8 | 7 | 0.05 | 0.05 |
| expr_cmpeq | 13 | 6 | 0.09 | 0.04 |
| tok_alloc | 18 | 6 | 0.12 | 0.04 |
| _memcpy | 5 | 5 | 0.03 | 0.03 |
| expr_land | 234 | 5 | 1.58 | 0.03 |
| expr_lor | 239 | 5 | 1.61 | 0.03 |
| handle_stray_noerror | 5 | 5 | 0.03 | 0.03 |
| strchr | 5 | 5 | 0.03 | 0.03 |
| tok_str_free | 5 | 5 | 0.03 | 0.03 |
| _allmul | 4 | 4 | 0.03 | 0.03 |
| _GetModuleFileNameA@12 | 4 | 4 | 0.03 | 0.03 |
| dynarray_add | 7 | 4 | 0.05 | 0.03 |
| expr_or | 5 | 4 | 0.03 | 0.03 |
| expr_shift | 5 | 4 | 0.03 | 0.03 |
| expr_sum | 20 | 4 | 0.13 | 0.03 |
| gen_assign_cast | 4 | 4 | 0.03 | 0.03 |
| gen_op | 37 | 4 | 0.25 | 0.03 |
| get_tok_str | 9 | 4 | 0.06 | 0.03 |
| load | 10 | 4 | 0.07 | 0.03 |
| o | 4 | 4 | 0.03 | 0.03 |
| parse_escape_string | 4 | 4 | 0.03 | 0.03 |
| strrchr | 4 | 4 | 0.03 | 0.03 |
| decl_initializer | 32 | 3 | 0.22 | 0.02 |
| gen_modrm | 4 | 3 | 0.03 | 0.02 |
| gexpr | 18 | 3 | 0.12 | 0.02 |
| handle_stray1 | 3 | 3 | 0.02 | 0.02 |
| is_compatible_types | 3 | 3 | 0.02 | 0.02 |
| preprocess_new | 29 | 3 | 0.20 | 0.02 |
| rebuild_hash | 3 | 3 | 0.02 | 0.02 |
| RtlReAllocateHeap | 3 | 3 | 0.02 | 0.02 |
| vpushi | 9 | 3 | 0.06 | 0.02 |
| vswap | 3 | 3 | 0.02 | 0.02 |
| __SEH_epilog4 | 2 | 2 | 0.01 | 0.01 |
| __SEH_prolog4 | 2 | 2 | 0.01 | 0.01 |
| _RtlLeaveCriticalSection@4 | 2 | 2 | 0.01 | 0.01 |
| cstr_cat | 2 | 2 | 0.01 | 0.01 |
| elf_hash | 2 | 2 | 0.01 | 0.01 |
| expr_const | 85 | 2 | 0.57 | 0.01 |
| gen_inline_functions | 12 | 2 | 0.08 | 0.01 |
| gen_opi | 4 | 2 | 0.03 | 0.01 |
| gfunc_call | 18 | 2 | 0.12 | 0.01 |
| indir | 10 | 2 | 0.07 | 0.01 |
| parse_btype_qualify | 2 | 2 | 0.01 | 0.01 |
| put_elf_reloca | 2 | 2 | 0.01 | 0.01 |
| put_elf_sym | 6 | 2 | 0.04 | 0.01 |
| RtlAllocateHeap | 2 | 2 | 0.01 | 0.01 |
| tcc_output_elf | 33 | 2 | 0.22 | 0.01 |
| vpop | 2 | 2 | 0.01 | 0.01 |
| vstore | 15 | 2 | 0.10 | 0.01 |
| ___stdio_common_vsscanf | 1 | 1 | 0.01 | 0.01 |
| __acrt_stdio_allocate_stream | 1 | 1 | 0.01 | 0.01 |
| __acrt_stdio_parse_mode | 1 | 1 | 0.01 | 0.01 |
| __crt_char_traits::tcslen | 1 | 1 | 0.01 | 0.01 |
| __crt_seh_guarded_call::operator() | 1 | 1 | 0.01 | 0.01 |
| __get_initial_wide_environment | 1 | 1 | 0.01 | 0.01 |
| __read_nolock | 1 | 1 | 0.01 | 0.01 |
| __SEH_prolog4_GS | 1 | 1 | 0.01 | 0.01 |
| __stricmp | 1 | 1 | 0.01 | 0.01 |
| _fputc | 1 | 1 | 0.01 | 0.01 |
| _GetSystemDirectoryAStub@8 | 1 | 1 | 0.01 | 0.01 |
| add_cached_include | 21 | 1 | 0.14 | 0.01 |
| apply_visibility | 1 | 1 | 0.01 | 0.01 |
| compare_types | 1 | 1 | 0.01 | 0.01 |
| decl_designator | 19 | 1 | 0.13 | 0.01 |
| decl_initializer_alloc | 61 | 1 | 0.41 | 0.01 |
| default_outputfile | 1 | 1 | 0.01 | 0.01 |
| elf_output_file | 301 | 1 | 2.03 | 0.01 |
| expr_eq | 207 | 1 | 1.39 | 0.01 |
| find_elf_sym | 1 | 1 | 0.01 | 0.01 |
| gadd_sp | 1 | 1 | 0.01 | 0.01 |
| gaddrof | 1 | 1 | 0.01 | 0.01 |
| gcall_or_jmp | 10 | 1 | 0.07 | 0.01 |
| gen_addr32 | 1 | 1 | 0.01 | 0.01 |
| gfunc_prolog | 1 | 1 | 0.01 | 0.01 |
| is_null_pointer | 1 | 1 | 0.01 | 0.01 |
| lexpand | 3 | 1 | 0.02 | 0.01 |
| macro_is_equal | 7 | 1 | 0.05 | 0.01 |
| main | 14'856 | 1 | 100.00 | 0.01 |
| minp | 1 | 1 | 0.01 | 0.01 |
| next_inp | 1 | 1 | 0.01 | 0.01 |
| paste_tokens | 14 | 1 | 0.09 | 0.01 |
| pe_getimport | 1 | 1 | 0.01 | 0.01 |
| RtlUnicodeStringToAnsiString | 1 | 1 | 0.01 | 0.01 |
| section_realloc | 8 | 1 | 0.05 | 0.01 |
| skip | 1 | 1 | 0.01 | 0.01 |
| skip_spaces | 1 | 1 | 0.01 | 0.01 |
| store | 2 | 1 | 0.01 | 0.01 |
| tcc_basename | 1 | 1 | 0.01 | 0.01 |
| tcc_delete | 39 | 1 | 0.26 | 0.01 |
| tcc_malloc | 10 | 1 | 0.07 | 0.01 |
| tcc_set_lib_path_w32 | 8 | 1 | 0.05 | 0.01 |
| tcc_write_elf_file | 297 | 1 | 2.00 | 0.01 |
| unget_tok | 12 | 1 | 0.08 | 0.01 |
| __scrt_common_main_seh | 14'856 | 0 | 100.00 | 0.00 |
| add_elf_sym | 11 | 0 | 0.07 | 0.00 |
| expr_const1 | 15 | 0 | 0.10 | 0.00 |
| expr_prod | 180 | 0 | 1.21 | 0.00 |
| gen_function | 271 | 0 | 1.82 | 0.00 |
| gen_opl | 2 | 0 | 0.01 | 0.00 |
| get_sym_ref | 8 | 0 | 0.05 | 0.00 |
| greloc | 2 | 0 | 0.01 | 0.00 |
| gv_dup | 1 | 0 | 0.01 | 0.00 |
| gv2 | 4 | 0 | 0.03 | 0.00 |
| gvtst | 4 | 0 | 0.03 | 0.00 |
| inc | 1 | 0 | 0.01 | 0.00 |
| init_putv | 18 | 0 | 0.12 | 0.00 |
| is_compatible_func | 1 | 0 | 0.01 | 0.00 |
| parse_string | 4 | 0 | 0.03 | 0.00 |
| pragma_parse | 4 | 0 | 0.03 | 0.00 |
| put_extern_sym2 | 17 | 0 | 0.11 | 0.00 |
| save_regs | 1 | 0 | 0.01 | 0.00 |
| sort_syms | 3 | 0 | 0.02 | 0.00 |
| sprintf | 8 | 0 | 0.05 | 0.00 |
| sscanf | 1 | 0 | 0.01 | 0.00 |
| tcc_add_file | 14'106 | 0 | 94.95 | 0.00 |
| tcc_add_file_internal | 14'106 | 0 | 94.95 | 0.00 |
| tcc_cleanup | 168 | 0 | 1.13 | 0.00 |
| tcc_compile | 14'085 | 0 | 94.81 | 0.00 |
| tcc_define_symbol | 5 | 0 | 0.03 | 0.00 |
| tcc_new | 20 | 0 | 0.13 | 0.00 |
| tcc_parse_args | 187 | 0 | 1.26 | 0.00 |
| tcc_set_environment | 2 | 0 | 0.01 | 0.00 |
Here the same table as call-tree (filter < 0.1%) -- ext. link to preserve HTML formatting.
| Name | Inclusive Samples | Exclusive Samples | Inclusive Samples % | Exclusive Samples % |
|---|---|---|---|---|
| ucrtbase.dll | 7'707 | 7'707 | 51.88 | 51.88 |
| libtcc.dll | 14'854 | 6'840 | 99.99 | 46.04 |
| vcruntime140.dll | 293 | 293 | 1.97 | 1.97 |
| ntdll.dll | 8 | 8 | 0.05 | 0.05 |
| KernelBase.dll | 5 | 5 | 0.03 | 0.03 |
| tcc.exe | 14'856 | 2 | 100.00 | 0.01 |
| kernel32.dll | 1 | 1 | 0.01 | 0.01 |