@@ -466,7 +466,7 @@ impl MemoryCellClocks {
466466 index : VectorIdx ,
467467 access_size : Size ,
468468 ) -> Result < ( ) , DataRace > {
469- log :: trace!( "Atomic read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
469+ trace ! ( "Atomic read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
470470 let atomic = self . atomic_access ( thread_clocks, access_size) ?;
471471 atomic. read_vector . set_at_index ( & thread_clocks. clock , index) ;
472472 // Make sure the last non-atomic write and all non-atomic reads were before this access.
@@ -485,7 +485,7 @@ impl MemoryCellClocks {
485485 index : VectorIdx ,
486486 access_size : Size ,
487487 ) -> Result < ( ) , DataRace > {
488- log :: trace!( "Atomic write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
488+ trace ! ( "Atomic write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
489489 let atomic = self . atomic_access ( thread_clocks, access_size) ?;
490490 atomic. write_vector . set_at_index ( & thread_clocks. clock , index) ;
491491 // Make sure the last non-atomic write and all non-atomic reads were before this access.
@@ -504,7 +504,7 @@ impl MemoryCellClocks {
504504 index : VectorIdx ,
505505 current_span : Span ,
506506 ) -> Result < ( ) , DataRace > {
507- log :: trace!( "Unsynchronized read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
507+ trace ! ( "Unsynchronized read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
508508 if !current_span. is_dummy ( ) {
509509 thread_clocks. clock [ index] . span = current_span;
510510 }
@@ -533,7 +533,7 @@ impl MemoryCellClocks {
533533 write_type : NaWriteType ,
534534 current_span : Span ,
535535 ) -> Result < ( ) , DataRace > {
536- log :: trace!( "Unsynchronized write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
536+ trace ! ( "Unsynchronized write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
537537 if !current_span. is_dummy ( ) {
538538 thread_clocks. clock [ index] . span = current_span;
539539 }
@@ -743,7 +743,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
743743 & this. machine . threads ,
744744 current_span,
745745 |index, mut clocks| {
746- log :: trace!( "Atomic fence on {:?} with ordering {:?}" , index, atomic) ;
746+ trace ! ( "Atomic fence on {:?} with ordering {:?}" , index, atomic) ;
747747
748748 // Apply data-race detection for the current fences
749749 // this treats AcqRel and SeqCst as the same as an acquire
@@ -841,7 +841,7 @@ impl VClockAlloc {
841841 // Find an index, if one exists where the value
842842 // in `l` is greater than the value in `r`.
843843 fn find_gt_index ( l : & VClock , r : & VClock ) -> Option < VectorIdx > {
844- log :: trace!( "Find index where not {:?} <= {:?}" , l, r) ;
844+ trace ! ( "Find index where not {:?} <= {:?}" , l, r) ;
845845 let l_slice = l. as_slice ( ) ;
846846 let r_slice = r. as_slice ( ) ;
847847 l_slice
@@ -1270,7 +1270,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
12701270 // Load and log the atomic operation.
12711271 // Note that atomic loads are possible even from read-only allocations, so `get_alloc_extra_mut` is not an option.
12721272 let alloc_meta = this. get_alloc_extra ( alloc_id) ?. data_race . as_ref ( ) . unwrap ( ) ;
1273- log :: trace!(
1273+ trace ! (
12741274 "Atomic op({}) with ordering {:?} on {:?} (size={})" ,
12751275 access. description( ) ,
12761276 & atomic,
@@ -1311,11 +1311,11 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
13111311 ) ?;
13121312
13131313 // Log changes to atomic memory.
1314- if log :: log_enabled! ( log :: Level :: Trace ) {
1314+ if tracing :: enabled! ( tracing :: Level :: TRACE ) {
13151315 for ( _offset, mem_clocks) in
13161316 alloc_meta. alloc_ranges . borrow ( ) . iter ( base_offset, size)
13171317 {
1318- log :: trace!(
1318+ trace ! (
13191319 "Updated atomic memory({:?}, size={}) to {:#?}" ,
13201320 place. ptr( ) ,
13211321 size. bytes( ) ,
@@ -1530,7 +1530,7 @@ impl GlobalState {
15301530 vector_info. push ( thread)
15311531 } ;
15321532
1533- log :: trace!( "Creating thread = {:?} with vector index = {:?}" , thread, created_index) ;
1533+ trace ! ( "Creating thread = {:?} with vector index = {:?}" , thread, created_index) ;
15341534
15351535 // Mark the chosen vector index as in use by the thread.
15361536 thread_info[ thread] . vector_index = Some ( created_index) ;
0 commit comments