Implement performance profiler and call stack dump, and update toolchain document (#501)

And remove redundant FAST_INTERP macros in wasm_interp_fast.c, and fix wamrc --help wrong line order issue.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-01-17 23:23:10 -06:00
committed by GitHub
parent 794028a968
commit 240ca2ed46
26 changed files with 752 additions and 109 deletions

View File

@ -43,6 +43,7 @@ typedef struct AOTCompOption{
bool enable_thread_mgr;
bool enable_tail_call;
bool enable_simd;
bool enable_aux_stack_frame;
bool is_sgx_platform;
uint32_t opt_level;
uint32_t size_level;

View File

@ -227,7 +227,6 @@ wasm_runtime_free(void *ptr);
WASM_RUNTIME_API_EXTERN package_type_t
get_package_type(const uint8_t *buf, uint32_t size);
#if WASM_ENABLE_MULTI_MODULE != 0
/**
* It is a callback for WAMR providing by embedding to load a module file
* into a buffer
@ -275,7 +274,6 @@ wasm_runtime_register_module(const char *module_name, wasm_module_t module,
*/
WASM_RUNTIME_API_EXTERN wasm_module_t
wasm_runtime_find_module_registered(const char *module_name);
#endif /* WASM_ENABLE_MULTI_MODULE */
/**
* Load a WASM module from a specified byte buffer. The byte buffer can be
@ -787,7 +785,14 @@ wasm_runtime_get_user_data(wasm_exec_env_t exec_env);
WASM_RUNTIME_API_EXTERN void
wasm_runtime_dump_mem_consumption(wasm_exec_env_t exec_env);
#if WASM_ENABLE_THREAD_MGR != 0
/**
* Dump runtime performance profiler data of each function
*
* @param module_inst the WASM module instance to profile
*/
WASM_RUNTIME_API_EXTERN void
wasm_runtime_dump_perf_profiling(wasm_module_inst_t module_inst);
/* wasm thread callback function type */
typedef void* (*wasm_thread_callback_t)(wasm_exec_env_t, void *);
/* wasm thread type */
@ -844,7 +849,14 @@ wasm_runtime_spawn_thread(wasm_exec_env_t exec_env, wasm_thread_t *tid,
*/
WASM_RUNTIME_API_EXTERN int32_t
wasm_runtime_join_thread(wasm_thread_t tid, void **retval);
#endif
/**
* dump the call stack
*
* @param exec_env the execution environment
*/
WASM_RUNTIME_API_EXTERN void
wasm_runtime_dump_call_stack(wasm_exec_env_t exec_env);
#ifdef __cplusplus
}