introduce WAMR memory profiling tool (experimental) (#390)

This commit is contained in:
Xu Jun
2020-09-18 18:04:56 +08:00
committed by GitHub
parent 04a7cc322f
commit 0226dbbb3d
27 changed files with 848 additions and 205 deletions

View File

@ -1510,6 +1510,14 @@ recover_br_info:
if (frame_lp[addr1] < exec_env->aux_stack_boundary)
goto out_of_bounds;
*(int32*)global_addr = frame_lp[addr1];
#if WASM_ENABLE_MEMORY_PROFILING != 0
if (module->module->aux_stack_top_global_index != (uint32)-1) {
uint32 aux_stack_used =
module->module->aux_stack_bottom - *(uint32*)global_addr;
if (aux_stack_used > module->max_aux_stack_used)
module->max_aux_stack_used = aux_stack_used;
}
#endif
HANDLE_OP_END ();
}