Provide proper function index and name in the FrameInfo (#824)
* fix function index * Add function name to JITFunctionTag * Add ModuleSyncString.
This commit is contained in:
@@ -166,9 +166,16 @@ impl Compiler {
|
||||
let body_len = compilation.get(i).body.len();
|
||||
self.jit_function_ranges
|
||||
.push((ptr as usize, ptr as usize + body_len));
|
||||
let func_index = module.func_index(i);
|
||||
let func_name = module
|
||||
.func_names
|
||||
.get(func_index)
|
||||
.cloned()
|
||||
.unwrap_or_else(Default::default);
|
||||
let tag = jit_function_registry::JITFunctionTag {
|
||||
module_id: module.name.clone(),
|
||||
func_index: i.index(),
|
||||
func_index: func_index.index(),
|
||||
func_name,
|
||||
};
|
||||
jit_function_registry::register(ptr as usize, ptr as usize + body_len, tag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user