@@ -39,7 +39,7 @@ use std::{
3939 } ,
4040 time:: Instant ,
4141} ;
42- use tracing:: { debug, debug_span , instrument , trace, warn} ;
42+ use tracing:: { debug, trace, warn} ;
4343
4444/// A wrapper for transactions that includes their index in the block.
4545#[ derive( Clone ) ]
@@ -139,11 +139,8 @@ where
139139 let ctx = self . ctx . clone ( ) ;
140140 let max_concurrency = self . max_concurrency ;
141141 let transaction_count_hint = self . transaction_count_hint ;
142- let span = tracing:: Span :: current ( ) ;
143142
144143 self . executor . spawn_blocking ( move || {
145- let _enter = debug_span ! ( target: "engine::tree::payload_processor::prewarm" , parent: span, "spawn_all" ) . entered ( ) ;
146-
147144 let ( done_tx, done_rx) = mpsc:: channel ( ) ;
148145 let mut executing = 0usize ;
149146
@@ -160,8 +157,8 @@ where
160157 } ;
161158
162159 // Only spawn initial workers as needed
163- for i in 0 ..workers_needed {
164- handles. push ( ctx. spawn_worker ( i , & executor, actions_tx. clone ( ) , done_tx. clone ( ) ) ) ;
160+ for _ in 0 ..workers_needed {
161+ handles. push ( ctx. spawn_worker ( & executor, actions_tx. clone ( ) , done_tx. clone ( ) ) ) ;
165162 }
166163
167164 let mut tx_index = 0usize ;
@@ -251,7 +248,6 @@ where
251248 /// the new, warmed cache to be inserted.
252249 ///
253250 /// This method is called from `run()` only after all execution tasks are complete.
254- #[ instrument( level = "debug" , target = "engine::tree::payload_processor::prewarm" , skip_all) ]
255251 fn save_cache ( self , state : BundleState ) {
256252 let start = Instant :: now ( ) ;
257253
@@ -288,12 +284,6 @@ where
288284 ///
289285 /// This will execute the transactions until all transactions have been processed or the task
290286 /// was cancelled.
291- #[ instrument(
292- level = "debug" ,
293- target = "engine::tree::payload_processor::prewarm" ,
294- name = "prewarm" ,
295- skip_all
296- ) ]
297287 pub ( super ) fn run (
298288 self ,
299289 pending : mpsc:: Receiver < impl ExecutableTxFor < Evm > + Clone + Send + ' static > ,
@@ -374,7 +364,6 @@ where
374364{
375365 /// Splits this context into an evm, an evm config, metrics, and the atomic bool for terminating
376366 /// execution.
377- #[ instrument( level = "debug" , target = "engine::tree::payload_processor::prewarm" , skip_all) ]
378367 fn evm_for_ctx ( self ) -> Option < ( EvmFor < Evm , impl Database > , PrewarmMetrics , Arc < AtomicBool > ) > {
379368 let Self {
380369 env,
@@ -391,7 +380,7 @@ where
391380 Ok ( provider) => provider,
392381 Err ( err) => {
393382 trace ! (
394- target: "engine::tree::payload_processor::prewarm " ,
383+ target: "engine::tree" ,
395384 %err,
396385 "Failed to build state provider in prewarm thread"
397386 ) ;
@@ -440,7 +429,6 @@ where
440429 ///
441430 /// Note: There are no ordering guarantees; this does not reflect the state produced by
442431 /// sequential execution.
443- #[ instrument( level = "debug" , target = "engine::tree::payload_processor::prewarm" , skip_all) ]
444432 fn transact_batch < Tx > (
445433 self ,
446434 txs : mpsc:: Receiver < IndexedTransaction < Tx > > ,
@@ -451,15 +439,7 @@ where
451439 {
452440 let Some ( ( mut evm, metrics, terminate_execution) ) = self . evm_for_ctx ( ) else { return } ;
453441
454- while let Ok ( IndexedTransaction { index, tx } ) = {
455- let _enter = debug_span ! ( target: "engine::tree::payload_processor::prewarm" , "recv tx" )
456- . entered ( ) ;
457- txs. recv ( )
458- } {
459- let _enter =
460- debug_span ! ( target: "engine::tree::payload_processor::prewarm" , "prewarm tx" , index, tx_hash=%tx. tx( ) . tx_hash( ) )
461- . entered ( ) ;
462-
442+ while let Ok ( IndexedTransaction { index, tx } ) = txs. recv ( ) {
463443 // If the task was cancelled, stop execution, send an empty result to notify the task,
464444 // and exit.
465445 if terminate_execution. load ( Ordering :: Relaxed ) {
@@ -487,18 +467,12 @@ where
487467 } ;
488468 metrics. execution_duration . record ( start. elapsed ( ) ) ;
489469
490- drop ( _enter) ;
491-
492470 // Only send outcome for transactions after the first txn
493471 // as the main execution will be just as fast
494472 if index > 0 {
495- let _enter =
496- debug_span ! ( target: "engine::tree::payload_processor::prewarm" , "prewarm outcome" , index, tx_hash=%tx. tx( ) . tx_hash( ) )
497- . entered ( ) ;
498473 let ( targets, storage_targets) = multiproof_targets_from_state ( res. state ) ;
499474 metrics. prefetch_storage_targets . record ( storage_targets as f64 ) ;
500475 let _ = sender. send ( PrewarmTaskEvent :: Outcome { proof_targets : Some ( targets) } ) ;
501- drop ( _enter) ;
502476 }
503477
504478 metrics. total_runtime . record ( start. elapsed ( ) ) ;
@@ -511,7 +485,6 @@ where
511485 /// Spawns a worker task for transaction execution and returns its sender channel.
512486 fn spawn_worker < Tx > (
513487 & self ,
514- idx : usize ,
515488 executor : & WorkloadExecutor ,
516489 actions_tx : Sender < PrewarmTaskEvent > ,
517490 done_tx : Sender < ( ) > ,
@@ -521,11 +494,8 @@ where
521494 {
522495 let ( tx, rx) = mpsc:: channel ( ) ;
523496 let ctx = self . clone ( ) ;
524- let span =
525- debug_span ! ( target: "engine::tree::payload_processor::prewarm" , "prewarm worker" , idx) ;
526497
527498 executor. spawn_blocking ( move || {
528- let _enter = span. entered ( ) ;
529499 ctx. transact_batch ( rx, actions_tx, done_tx) ;
530500 } ) ;
531501
0 commit comments