@@ -13,7 +13,7 @@ use crate::{Database, DatabaseKeyIndex, Event, EventKind, QueryDb};
13
13
use parking_lot:: { RawRwLock , RwLock } ;
14
14
use std:: ops:: Deref ;
15
15
use std:: sync:: atomic:: { AtomicBool , Ordering } ;
16
- use tracing:: { debug , info } ;
16
+ use tracing:: trace ;
17
17
18
18
pub ( super ) struct Slot < Q >
19
19
where
@@ -126,7 +126,7 @@ where
126
126
// doing any `set` invocations while the query function runs.
127
127
let revision_now = runtime. current_revision ( ) ;
128
128
129
- info ! ( "{:?}: invoked at {:?}" , self , revision_now, ) ;
129
+ trace ! ( "{:?}: invoked at {:?}" , self , revision_now, ) ;
130
130
131
131
// First, do a check with a read-lock.
132
132
loop {
@@ -152,7 +152,7 @@ where
152
152
) -> StampedValue < Q :: Value > {
153
153
let runtime = db. salsa_runtime ( ) ;
154
154
155
- debug ! ( "{:?}: read_upgrade(revision_now={:?})" , self , revision_now, ) ;
155
+ trace ! ( "{:?}: read_upgrade(revision_now={:?})" , self , revision_now, ) ;
156
156
157
157
// Check with an upgradable read to see if there is a value
158
158
// already. (This permits other readers but prevents anyone
@@ -184,7 +184,7 @@ where
184
184
// inputs and check whether they are out of date.
185
185
if let Some ( memo) = & mut old_memo {
186
186
if let Some ( value) = memo. verify_value ( db. ops_database ( ) , revision_now, & active_query) {
187
- info ! ( "{:?}: validated old memoized value" , self , ) ;
187
+ trace ! ( "{:?}: validated old memoized value" , self , ) ;
188
188
189
189
db. salsa_event ( Event {
190
190
runtime_id : runtime. id ( ) ,
@@ -212,7 +212,7 @@ where
212
212
old_memo : Option < Memo < Q :: Value > > ,
213
213
key : & Q :: Key ,
214
214
) -> StampedValue < Q :: Value > {
215
- tracing:: info !( "{:?}: executing query" , self . database_key_index( ) . debug( db) ) ;
215
+ tracing:: trace !( "{:?}: executing query" , self . database_key_index( ) . debug( db) ) ;
216
216
217
217
db. salsa_event ( Event {
218
218
runtime_id : db. salsa_runtime ( ) . id ( ) ,
@@ -224,7 +224,7 @@ where
224
224
let value = match Cycle :: catch ( || Q :: execute ( db, key. clone ( ) ) ) {
225
225
Ok ( v) => v,
226
226
Err ( cycle) => {
227
- tracing:: debug !(
227
+ tracing:: trace !(
228
228
"{:?}: caught cycle {:?}, have strategy {:?}" ,
229
229
self . database_key_index( ) . debug( db) ,
230
230
cycle,
@@ -272,9 +272,10 @@ where
272
272
// consumers must be aware of. Becoming *more* durable
273
273
// is not. See the test `constant_to_non_constant`.
274
274
if revisions. durability >= old_memo. revisions . durability && old_memo. value == value {
275
- debug ! (
275
+ trace ! (
276
276
"read_upgrade({:?}): value is equal, back-dating to {:?}" ,
277
- self , old_memo. revisions. changed_at,
277
+ self ,
278
+ old_memo. revisions. changed_at,
278
279
) ;
279
280
280
281
assert ! ( old_memo. revisions. changed_at <= revisions. changed_at) ;
@@ -290,7 +291,7 @@ where
290
291
291
292
let memo_value = new_value. value . clone ( ) ;
292
293
293
- debug ! ( "read_upgrade({:?}): result.revisions = {:#?}" , self , revisions, ) ;
294
+ trace ! ( "read_upgrade({:?}): result.revisions = {:#?}" , self , revisions, ) ;
294
295
295
296
panic_guard. proceed ( Some ( Memo { value : memo_value, verified_at : revision_now, revisions } ) ) ;
296
297
@@ -339,9 +340,11 @@ where
339
340
}
340
341
341
342
QueryState :: Memoized ( memo) => {
342
- debug ! (
343
+ trace ! (
343
344
"{:?}: found memoized value, verified_at={:?}, changed_at={:?}" ,
344
- self , memo. verified_at, memo. revisions. changed_at,
345
+ self ,
346
+ memo. verified_at,
347
+ memo. revisions. changed_at,
345
348
) ;
346
349
347
350
if memo. verified_at < revision_now {
@@ -355,7 +358,7 @@ where
355
358
value : value. clone ( ) ,
356
359
} ;
357
360
358
- info ! ( "{:?}: returning memoized value changed at {:?}" , self , value. changed_at) ;
361
+ trace ! ( "{:?}: returning memoized value changed at {:?}" , self , value. changed_at) ;
359
362
360
363
ProbeState :: UpToDate ( value)
361
364
}
@@ -387,7 +390,7 @@ where
387
390
}
388
391
389
392
pub ( super ) fn invalidate ( & self , new_revision : Revision ) -> Option < Durability > {
390
- tracing:: debug !( "Slot::invalidate(new_revision = {:?})" , new_revision) ;
393
+ tracing:: trace !( "Slot::invalidate(new_revision = {:?})" , new_revision) ;
391
394
match & mut * self . state . write ( ) {
392
395
QueryState :: Memoized ( memo) => {
393
396
memo. revisions . untracked = true ;
@@ -411,9 +414,11 @@ where
411
414
412
415
db. unwind_if_cancelled ( ) ;
413
416
414
- debug ! (
417
+ trace ! (
415
418
"maybe_changed_after({:?}) called with revision={:?}, revision_now={:?}" ,
416
- self , revision, revision_now,
419
+ self ,
420
+ revision,
421
+ revision_now,
417
422
) ;
418
423
419
424
// Do an initial probe with just the read-lock.
@@ -680,9 +685,11 @@ where
680
685
assert ! ( self . verified_at != revision_now) ;
681
686
let verified_at = self . verified_at ;
682
687
683
- debug ! (
688
+ trace ! (
684
689
"verify_revisions: verified_at={:?}, revision_now={:?}, inputs={:#?}" ,
685
- verified_at, revision_now, self . revisions. inputs
690
+ verified_at,
691
+ revision_now,
692
+ self . revisions. inputs
686
693
) ;
687
694
688
695
if self . check_durability ( db. salsa_runtime ( ) ) {
@@ -708,7 +715,7 @@ where
708
715
let changed_input =
709
716
inputs. slice . iter ( ) . find ( |& & input| db. maybe_changed_after ( input, verified_at) ) ;
710
717
if let Some ( input) = changed_input {
711
- debug ! ( "validate_memoized_value: `{:?}` may have changed" , input) ;
718
+ trace ! ( "validate_memoized_value: `{:?}` may have changed" , input) ;
712
719
713
720
return false ;
714
721
}
@@ -721,7 +728,7 @@ where
721
728
/// True if this memo is known not to have changed based on its durability.
722
729
fn check_durability ( & self , runtime : & Runtime ) -> bool {
723
730
let last_changed = runtime. last_changed_revision ( self . revisions . durability ) ;
724
- debug ! (
731
+ trace ! (
725
732
"check_durability(last_changed={:?} <= verified_at={:?}) = {:?}" ,
726
733
last_changed,
727
734
self . verified_at,
0 commit comments