Skip to content

Commit 7cb7fb0

Browse files
committed
fix double promotion for memory profiling
1 parent 2762de7 commit 7cb7fb0

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

core/iwasm/aot/aot_runtime.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4607,16 +4607,16 @@ aot_dump_perf_profiling(const AOTModuleInstance *module_inst)
46074607
os_printf(
46084608
" func %s, execution time: %.3f ms, execution count: %" PRIu32
46094609
" times, children execution time: %.3f ms\n",
4610-
func_name, perf_prof->total_exec_time / 1000.0f,
4610+
func_name, perf_prof->total_exec_time / 1000.0,
46114611
perf_prof->total_exec_cnt,
4612-
perf_prof->children_exec_time / 1000.0f);
4612+
perf_prof->children_exec_time / 1000.0);
46134613
else
46144614
os_printf(" func %" PRIu32
46154615
", execution time: %.3f ms, execution count: %" PRIu32
46164616
" times, children execution time: %.3f ms\n",
4617-
i, perf_prof->total_exec_time / 1000.0f,
4617+
i, perf_prof->total_exec_time / 1000.0,
46184618
perf_prof->total_exec_cnt,
4619-
perf_prof->children_exec_time / 1000.0f);
4619+
perf_prof->children_exec_time / 1000.0);
46204620
}
46214621
}
46224622

@@ -4632,7 +4632,7 @@ aot_summarize_wasm_execute_time(const AOTModuleInstance *inst)
46324632
AOTFuncPerfProfInfo *perf_prof =
46334633
(AOTFuncPerfProfInfo *)inst->func_perf_profilings + i;
46344634
ret += (perf_prof->total_exec_time - perf_prof->children_exec_time)
4635-
/ 1000.0f;
4635+
/ 1000.0;
46364636
}
46374637

46384638
return ret;
@@ -5497,7 +5497,8 @@ aot_const_str_set_insert(const uint8 *str, int32 len, AOTModule *module,
54975497
#if WASM_ENABLE_DYNAMIC_AOT_DEBUG != 0
54985498
AOTModule *g_dynamic_aot_module = NULL;
54995499

5500-
void __attribute__((noinline)) __enable_dynamic_aot_debug(void)
5500+
void __attribute__((noinline))
5501+
__enable_dynamic_aot_debug(void)
55015502
{
55025503
/* empty implementation. */
55035504
}

core/iwasm/interpreter/wasm_runtime.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3744,16 +3744,16 @@ wasm_dump_perf_profiling(const WASMModuleInstance *module_inst)
37443744
os_printf(
37453745
" func %s, execution time: %.3f ms, execution count: %" PRIu32
37463746
" times, children execution time: %.3f ms\n",
3747-
func_name, func_inst->total_exec_time / 1000.0f,
3747+
func_name, func_inst->total_exec_time / 1000.0,
37483748
func_inst->total_exec_cnt,
3749-
func_inst->children_exec_time / 1000.0f);
3749+
func_inst->children_exec_time / 1000.0);
37503750
else
37513751
os_printf(" func %" PRIu32
37523752
", execution time: %.3f ms, execution count: %" PRIu32
37533753
" times, children execution time: %.3f ms\n",
3754-
i, func_inst->total_exec_time / 1000.0f,
3754+
i, func_inst->total_exec_time / 1000.0,
37553755
func_inst->total_exec_cnt,
3756-
func_inst->children_exec_time / 1000.0f);
3756+
func_inst->children_exec_time / 1000.0);
37573757
}
37583758
}
37593759

@@ -3765,7 +3765,7 @@ wasm_summarize_wasm_execute_time(const WASMModuleInstance *inst)
37653765
unsigned i;
37663766
for (i = 0; i < inst->e->function_count; i++) {
37673767
WASMFunctionInstance *func = inst->e->functions + i;
3768-
ret += (func->total_exec_time - func->children_exec_time) / 1000.0f;
3768+
ret += (func->total_exec_time - func->children_exec_time) / 1000.0;
37693769
}
37703770

37713771
return ret;

0 commit comments

Comments
 (0)