@@ -8,7 +8,6 @@ use std::num::NonZeroU64;
88use std:: time:: Instant ;
99
1010use log:: trace;
11- use measureme:: { DetachedTiming , EventId , Profiler , StringId } ;
1211use rand:: rngs:: StdRng ;
1312use rand:: SeedableRng ;
1413
@@ -47,7 +46,16 @@ pub struct FrameData<'tcx> {
4746 /// If `measureme` profiling is enabled, holds timing information
4847 /// for the start of this frame. When we finish executing this frame,
4948 /// we use this to register a completed event with `measureme`.
50- pub timing : Option < DetachedTiming > ,
49+ pub timing : Option < measureme:: DetachedTiming > ,
50+ }
51+
52+ impl < ' tcx > std:: fmt:: Debug for FrameData < ' tcx > {
53+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
54+ f. debug_struct ( "FrameData" )
55+ . field ( "call_id" , & self . call_id )
56+ . field ( "catch_unwind" , & self . catch_unwind )
57+ . finish ( )
58+ }
5159}
5260
5361/// Extra memory kinds
@@ -278,20 +286,19 @@ pub struct Evaluator<'mir, 'tcx> {
278286
279287 /// The `measureme` profiler used to record timing information about
280288 /// the emulated program.
281- profiler : Option < Profiler > ,
289+ profiler : Option < measureme :: Profiler > ,
282290 /// Used with `profiler` to cache the `StringId`s for event names
283291 /// uesd with `measureme`.
284- string_cache : FxHashMap < String , StringId > ,
292+ string_cache : FxHashMap < String , measureme :: StringId > ,
285293}
286294
287295impl < ' mir , ' tcx > Evaluator < ' mir , ' tcx > {
288296 pub ( crate ) fn new ( config : & MiriConfig , layout_cx : LayoutCx < ' tcx , TyCtxt < ' tcx > > ) -> Self {
289297 let layouts =
290298 PrimitiveLayouts :: new ( layout_cx) . expect ( "Couldn't get layouts of primitive types" ) ;
291- let profiler = config
292- . measureme_out
293- . as_ref ( )
294- . map ( |out| Profiler :: new ( out) . expect ( "Couldn't create `measureme` profiler" ) ) ;
299+ let profiler = config. measureme_out . as_ref ( ) . map ( |out| {
300+ measureme:: Profiler :: new ( out) . expect ( "Couldn't create `measureme` profiler" )
301+ } ) ;
295302 Evaluator {
296303 // `env_vars` could be initialized properly here if `Memory` were available before
297304 // calling this method.
@@ -619,7 +626,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
619626
620627 Some ( profiler. start_recording_interval_event_detached (
621628 * name,
622- EventId :: from_label ( * name) ,
629+ measureme :: EventId :: from_label ( * name) ,
623630 ecx. get_active_thread ( ) . to_u32 ( ) ,
624631 ) )
625632 } else {
0 commit comments