33//! `CompiledModule` to allow compiling and instantiating to be done as separate
44//! steps.
55
6+ use crate :: code:: EngineCode ;
67use crate :: prelude:: * ;
78use crate :: profiling_agent:: ProfilingAgent ;
89use crate :: runtime:: vm:: CompiledModuleId ;
9- use crate :: { Engine , code:: EngineCode } ;
1010use alloc:: sync:: Arc ;
1111use core:: ops:: Range ;
1212use core:: str;
@@ -47,7 +47,6 @@ impl CompiledModule {
4747 /// The `profiler` argument here is used to inform JIT profiling runtimes
4848 /// about new code that is loaded.
4949 pub fn from_artifacts (
50- engine : & Engine ,
5150 engine_code : Arc < EngineCode > ,
5251 info : CompiledModuleInfo ,
5352 index : Arc < CompiledFunctionsTable > ,
@@ -61,20 +60,15 @@ impl CompiledModule {
6160 index,
6261 func_names : info. func_names ,
6362 } ;
64- ret. register_profiling ( engine , profiler) ?;
63+ ret. register_profiling ( profiler) ?;
6564
6665 Ok ( ret)
6766 }
6867
69- fn register_profiling ( & mut self , engine : & Engine , profiler : & dyn ProfilingAgent ) -> Result < ( ) > {
68+ fn register_profiling ( & mut self , profiler : & dyn ProfilingAgent ) -> Result < ( ) > {
7069 // TODO-Bug?: "code_memory" is not exclusive for this module in the case of components,
7170 // so we may be registering the same code range multiple times here.
7271
73- if engine. tunables ( ) . debug_guest {
74- // TODO(#12105): support this case.
75- anyhow:: bail!( "Cannot register profiling when guest debugging is enabled" ) ;
76- }
77-
7872 profiler. register_module ( self . engine_code . image ( ) , & |addr| {
7973 let idx = self . func_by_text_offset ( addr) ?;
8074 let idx = self . module . func_index ( idx) ;
0 commit comments