@@ -466,7 +466,7 @@ impl MemoryCellClocks {
466
466
index : VectorIdx ,
467
467
access_size : Size ,
468
468
) -> Result < ( ) , DataRace > {
469
- log :: trace!( "Atomic read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
469
+ trace ! ( "Atomic read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
470
470
let atomic = self . atomic_access ( thread_clocks, access_size) ?;
471
471
atomic. read_vector . set_at_index ( & thread_clocks. clock , index) ;
472
472
// Make sure the last non-atomic write and all non-atomic reads were before this access.
@@ -485,7 +485,7 @@ impl MemoryCellClocks {
485
485
index : VectorIdx ,
486
486
access_size : Size ,
487
487
) -> Result < ( ) , DataRace > {
488
- log :: trace!( "Atomic write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
488
+ trace ! ( "Atomic write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
489
489
let atomic = self . atomic_access ( thread_clocks, access_size) ?;
490
490
atomic. write_vector . set_at_index ( & thread_clocks. clock , index) ;
491
491
// Make sure the last non-atomic write and all non-atomic reads were before this access.
@@ -504,7 +504,7 @@ impl MemoryCellClocks {
504
504
index : VectorIdx ,
505
505
current_span : Span ,
506
506
) -> Result < ( ) , DataRace > {
507
- log :: trace!( "Unsynchronized read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
507
+ trace ! ( "Unsynchronized read with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
508
508
if !current_span. is_dummy ( ) {
509
509
thread_clocks. clock [ index] . span = current_span;
510
510
}
@@ -533,7 +533,7 @@ impl MemoryCellClocks {
533
533
write_type : NaWriteType ,
534
534
current_span : Span ,
535
535
) -> Result < ( ) , DataRace > {
536
- log :: trace!( "Unsynchronized write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
536
+ trace ! ( "Unsynchronized write with vectors: {:#?} :: {:#?}" , self , thread_clocks) ;
537
537
if !current_span. is_dummy ( ) {
538
538
thread_clocks. clock [ index] . span = current_span;
539
539
}
@@ -743,7 +743,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
743
743
& this. machine . threads ,
744
744
current_span,
745
745
|index, mut clocks| {
746
- log :: trace!( "Atomic fence on {:?} with ordering {:?}" , index, atomic) ;
746
+ trace ! ( "Atomic fence on {:?} with ordering {:?}" , index, atomic) ;
747
747
748
748
// Apply data-race detection for the current fences
749
749
// this treats AcqRel and SeqCst as the same as an acquire
@@ -841,7 +841,7 @@ impl VClockAlloc {
841
841
// Find an index, if one exists where the value
842
842
// in `l` is greater than the value in `r`.
843
843
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) ;
845
845
let l_slice = l. as_slice ( ) ;
846
846
let r_slice = r. as_slice ( ) ;
847
847
l_slice
@@ -1270,7 +1270,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
1270
1270
// Load and log the atomic operation.
1271
1271
// Note that atomic loads are possible even from read-only allocations, so `get_alloc_extra_mut` is not an option.
1272
1272
let alloc_meta = this. get_alloc_extra ( alloc_id) ?. data_race . as_ref ( ) . unwrap ( ) ;
1273
- log :: trace!(
1273
+ trace ! (
1274
1274
"Atomic op({}) with ordering {:?} on {:?} (size={})" ,
1275
1275
access. description( ) ,
1276
1276
& atomic,
@@ -1311,11 +1311,11 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
1311
1311
) ?;
1312
1312
1313
1313
// Log changes to atomic memory.
1314
- if log :: log_enabled! ( log :: Level :: Trace ) {
1314
+ if tracing :: enabled! ( tracing :: Level :: TRACE ) {
1315
1315
for ( _offset, mem_clocks) in
1316
1316
alloc_meta. alloc_ranges . borrow ( ) . iter ( base_offset, size)
1317
1317
{
1318
- log :: trace!(
1318
+ trace ! (
1319
1319
"Updated atomic memory({:?}, size={}) to {:#?}" ,
1320
1320
place. ptr( ) ,
1321
1321
size. bytes( ) ,
@@ -1530,7 +1530,7 @@ impl GlobalState {
1530
1530
vector_info. push ( thread)
1531
1531
} ;
1532
1532
1533
- log :: trace!( "Creating thread = {:?} with vector index = {:?}" , thread, created_index) ;
1533
+ trace ! ( "Creating thread = {:?} with vector index = {:?}" , thread, created_index) ;
1534
1534
1535
1535
// Mark the chosen vector index as in use by the thread.
1536
1536
thread_info[ thread] . vector_index = Some ( created_index) ;
0 commit comments