Description
Problem
The per_program_timings
is a HashMap<Pubkey, ProgramTiming>, where each ProgramTiming
internally holds a Vec<u64>
to track Compute Units consumed for unsuccessful program execution, and count such occurrence. During block execution, this map is updated per instruction by program Pubkey to track execution timing. This happens for every instruction executed across the block.
Based on a simple benchmark, this timing instrumentation adds ~200µs of overhead per block, solely due to the bookkeeping logic.
However, this tracking has become obsolete:
- Two precursor PRs (Set units_consumed by simulated transaction by executed_units #6061 , Not to use per-progam-timings for transaction actual executed units and time #6080 ) have already removed historical usage of this data, replaced with more direct and effecient methods.
- The only remaining consumer is aggregated metrics reporting at the slot level (no per-instruction details which is reported at datapoint_trace!() , but no one seem to submit this data).
Thus, the current reporting is largely redundant, if not wasteful.
Proposed Solution
Submit a PR (#6112) that removes ProgramTimings instrumentation entirely to:
- Eliminate ~200µs of overhead per block.
- Simplify execution path and reduce unnecessary memory churn.
Metadata
Metadata
Assignees
Labels
No labels