@@ -320,6 +320,7 @@ pub(crate) struct HypervLinuxDriver {
320320 gdb_conn : Option < DebugCommChannel < DebugResponse , DebugMsg > > ,
321321 #[ cfg( crashdump) ]
322322 rt_cfg : SandboxRuntimeConfig ,
323+ #[ allow( dead_code) ]
323324 #[ cfg( feature = "trace_guest" ) ]
324325 trace_info : TraceInfo ,
325326}
@@ -774,14 +775,6 @@ impl Hypervisor for HypervLinuxDriver {
774775 {
775776 Err ( mshv_ioctls:: MshvError :: from ( libc:: EINTR ) )
776777 } else {
777- #[ cfg( feature = "trace_guest" ) ]
778- if self . trace_info . guest_start_epoch . is_none ( ) {
779- // Store the guest start epoch and cycles to trace the guest execution time
780- crate :: debug!( "MSHV - Guest Start Epoch set" ) ;
781- self . trace_info . guest_start_tsc =
782- Some ( hyperlight_guest_tracing:: invariant_tsc:: read_tsc ( ) ) ;
783- self . trace_info . guest_start_epoch = Some ( std:: time:: Instant :: now ( ) ) ;
784- }
785778 // Note: if a `InterruptHandle::kill()` called while this thread is **here**
786779 // Then the vcpu will run, but we will keep sending signals to this thread
787780 // to interrupt it until `running` is set to false. The `vcpu_fd::run()` call will
@@ -1147,7 +1140,7 @@ impl Hypervisor for HypervLinuxDriver {
11471140 Ok ( X86_64Regs :: from ( self . vcpu_fd . get_regs ( ) ?) )
11481141 }
11491142
1150- #[ cfg( feature = "trace_guest " ) ]
1143+ #[ cfg( feature = "mem_profile " ) ]
11511144 fn trace_info_mut ( & mut self ) -> & mut TraceInfo {
11521145 & mut self . trace_info
11531146 }
0 commit comments