@@ -13,7 +13,7 @@ use crate::{Database, DatabaseKeyIndex, Event, EventKind, QueryDb};
1313use parking_lot:: { RawRwLock , RwLock } ;
1414use std:: ops:: Deref ;
1515use std:: sync:: atomic:: { AtomicBool , Ordering } ;
16- use tracing:: { debug , info } ;
16+ use tracing:: trace ;
1717
1818pub ( super ) struct Slot < Q >
1919where
@@ -126,7 +126,7 @@ where
126126 // doing any `set` invocations while the query function runs.
127127 let revision_now = runtime. current_revision ( ) ;
128128
129- info ! ( "{:?}: invoked at {:?}" , self , revision_now, ) ;
129+ trace ! ( "{:?}: invoked at {:?}" , self , revision_now, ) ;
130130
131131 // First, do a check with a read-lock.
132132 loop {
@@ -152,7 +152,7 @@ where
152152 ) -> StampedValue < Q :: Value > {
153153 let runtime = db. salsa_runtime ( ) ;
154154
155- debug ! ( "{:?}: read_upgrade(revision_now={:?})" , self , revision_now, ) ;
155+ trace ! ( "{:?}: read_upgrade(revision_now={:?})" , self , revision_now, ) ;
156156
157157 // Check with an upgradable read to see if there is a value
158158 // already. (This permits other readers but prevents anyone
@@ -184,7 +184,7 @@ where
184184 // inputs and check whether they are out of date.
185185 if let Some ( memo) = & mut old_memo {
186186 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 , ) ;
188188
189189 db. salsa_event ( Event {
190190 runtime_id : runtime. id ( ) ,
@@ -212,7 +212,7 @@ where
212212 old_memo : Option < Memo < Q :: Value > > ,
213213 key : & Q :: Key ,
214214 ) -> 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) ) ;
216216
217217 db. salsa_event ( Event {
218218 runtime_id : db. salsa_runtime ( ) . id ( ) ,
@@ -224,7 +224,7 @@ where
224224 let value = match Cycle :: catch ( || Q :: execute ( db, key. clone ( ) ) ) {
225225 Ok ( v) => v,
226226 Err ( cycle) => {
227- tracing:: debug !(
227+ tracing:: trace !(
228228 "{:?}: caught cycle {:?}, have strategy {:?}" ,
229229 self . database_key_index( ) . debug( db) ,
230230 cycle,
@@ -272,9 +272,10 @@ where
272272 // consumers must be aware of. Becoming *more* durable
273273 // is not. See the test `constant_to_non_constant`.
274274 if revisions. durability >= old_memo. revisions . durability && old_memo. value == value {
275- debug ! (
275+ trace ! (
276276 "read_upgrade({:?}): value is equal, back-dating to {:?}" ,
277- self , old_memo. revisions. changed_at,
277+ self ,
278+ old_memo. revisions. changed_at,
278279 ) ;
279280
280281 assert ! ( old_memo. revisions. changed_at <= revisions. changed_at) ;
@@ -290,7 +291,7 @@ where
290291
291292 let memo_value = new_value. value . clone ( ) ;
292293
293- debug ! ( "read_upgrade({:?}): result.revisions = {:#?}" , self , revisions, ) ;
294+ trace ! ( "read_upgrade({:?}): result.revisions = {:#?}" , self , revisions, ) ;
294295
295296 panic_guard. proceed ( Some ( Memo { value : memo_value, verified_at : revision_now, revisions } ) ) ;
296297
@@ -339,9 +340,11 @@ where
339340 }
340341
341342 QueryState :: Memoized ( memo) => {
342- debug ! (
343+ trace ! (
343344 "{:?}: 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,
345348 ) ;
346349
347350 if memo. verified_at < revision_now {
@@ -355,7 +358,7 @@ where
355358 value : value. clone ( ) ,
356359 } ;
357360
358- info ! ( "{:?}: returning memoized value changed at {:?}" , self , value. changed_at) ;
361+ trace ! ( "{:?}: returning memoized value changed at {:?}" , self , value. changed_at) ;
359362
360363 ProbeState :: UpToDate ( value)
361364 }
@@ -387,7 +390,7 @@ where
387390 }
388391
389392 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) ;
391394 match & mut * self . state . write ( ) {
392395 QueryState :: Memoized ( memo) => {
393396 memo. revisions . untracked = true ;
@@ -411,9 +414,11 @@ where
411414
412415 db. unwind_if_cancelled ( ) ;
413416
414- debug ! (
417+ trace ! (
415418 "maybe_changed_after({:?}) called with revision={:?}, revision_now={:?}" ,
416- self , revision, revision_now,
419+ self ,
420+ revision,
421+ revision_now,
417422 ) ;
418423
419424 // Do an initial probe with just the read-lock.
@@ -680,9 +685,11 @@ where
680685 assert ! ( self . verified_at != revision_now) ;
681686 let verified_at = self . verified_at ;
682687
683- debug ! (
688+ trace ! (
684689 "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
686693 ) ;
687694
688695 if self . check_durability ( db. salsa_runtime ( ) ) {
@@ -708,7 +715,7 @@ where
708715 let changed_input =
709716 inputs. slice . iter ( ) . find ( |& & input| db. maybe_changed_after ( input, verified_at) ) ;
710717 if let Some ( input) = changed_input {
711- debug ! ( "validate_memoized_value: `{:?}` may have changed" , input) ;
718+ trace ! ( "validate_memoized_value: `{:?}` may have changed" , input) ;
712719
713720 return false ;
714721 }
@@ -721,7 +728,7 @@ where
721728 /// True if this memo is known not to have changed based on its durability.
722729 fn check_durability ( & self , runtime : & Runtime ) -> bool {
723730 let last_changed = runtime. last_changed_revision ( self . revisions . durability ) ;
724- debug ! (
731+ trace ! (
725732 "check_durability(last_changed={:?} <= verified_at={:?}) = {:?}" ,
726733 last_changed,
727734 self . verified_at,
0 commit comments