Implement Fast JIT dump call stack and perf profiling (#1633)

Implement dump call stack and perf profiling features for Fast JIT,
and refine some code.
This commit is contained in:
Wenyong Huang
2022-10-27 09:28:32 +08:00
committed by GitHub
parent 6adf9194d4
commit ef21f0c951
8 changed files with 240 additions and 139 deletions

View File

@ -133,22 +133,6 @@ typedef enum FloatArithmetic {
JitBasicBlock *
jit_frontend_translate_func(JitCompContext *cc);
/**
* Generate a block leaving the compiled code, which must store the
* target bcip and other necessary information for switching to
* interpreter or other compiled code and then jump to the exit of the
* cc.
*
* @param cc the compilation context
* @param bcip the target bytecode instruction pointer
* @param sp_offset stack pointer offset at the beginning of the block
*
* @return the leaving block if succeeds, NULL otherwise
*/
JitBlock *
jit_frontend_gen_leaving_block(JitCompContext *cc, void *bcip,
unsigned sp_offset);
/**
* Lower the IR of the given compilation context.
*
@ -159,6 +143,16 @@ jit_frontend_gen_leaving_block(JitCompContext *cc, void *bcip,
bool
jit_frontend_lower(JitCompContext *cc);
uint32
jit_frontend_get_global_data_offset(const WASMModule *module,
uint32 global_idx);
uint32
jit_frontend_get_table_inst_offset(const WASMModule *module, uint32 tbl_idx);
uint32
jit_frontend_get_module_inst_extra_offset(const WASMModule *module);
JitReg
get_module_inst_reg(JitFrame *frame);