Merge commit 'e39eacd2d415803ef82de3b6a314e4f2d0fbc4dc' into sync_cg_clif-2025-01-10
This commit is contained in:
@@ -73,12 +73,14 @@ impl Drop for TimingGuard {
|
||||
|
||||
impl cranelift_codegen::timing::Profiler for MeasuremeProfiler {
|
||||
fn start_pass(&self, pass: cranelift_codegen::timing::Pass) -> Box<dyn std::any::Any> {
|
||||
let mut timing_guard =
|
||||
TimingGuard { profiler: std::mem::ManuallyDrop::new(self.0.clone()), inner: None };
|
||||
let mut timing_guard = Box::new(TimingGuard {
|
||||
profiler: std::mem::ManuallyDrop::new(self.0.clone()),
|
||||
inner: None,
|
||||
});
|
||||
timing_guard.inner = Some(
|
||||
unsafe { &*(&*timing_guard.profiler as &SelfProfilerRef as *const SelfProfilerRef) }
|
||||
.generic_activity(pass.description()),
|
||||
);
|
||||
Box::new(timing_guard)
|
||||
timing_guard
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user