core: add code read statistics#33442
Merged
rjl493456442 merged 1 commit intoethereum:masterfrom Dec 18, 2025
Merged
Conversation
04229ed to
779406f
Compare
Member
|
Naive question, but this adds these measurements to all execution, so this will somewhat impact the execution time on the negative side, right? Even if I don't want to use these code read statistics ever, it will still (?) spend a tiny amount of time on this. If I want maximum performance, then I would not want this. Or, does the execution at some point "know" this extra logic is not necessary and will not perform these operations while executing? |
Contributor
|
I don't think the extra overhead of capturing a timestamp for before/after every code read would be measurable in almost any circumstance. |
CPerezz
added a commit
to CPerezz/go-ethereum
that referenced
this pull request
Jan 3, 2026
This extends the execution statistics infrastructure from ethereum#33442 with: - Code cache hit/miss tracking (completing parity with account/storage) - Code bytes read metric for I/O volume analysis - Unique state access metrics (accounts, storage slots, contracts) The slow block log now shows: Code read: 626ns(4, 1.07 KiB) Unique state access: Accounts: 6 Storage slots: 11 Contracts executed: 4 Reader statistics account: hit: 4, miss: 6, rate: 40.00 storage: hit: 0, miss: 11, rate: 0.00 code: hit: 4, miss: 0, rate: 100.00
CPerezz
added a commit
to CPerezz/go-ethereum
that referenced
this pull request
Jan 3, 2026
This extends the execution statistics infrastructure from ethereum#33442 with: - Code cache hit/miss tracking (completing parity with account/storage) - Code bytes read metric for I/O volume analysis - Unique state access metrics (accounts, storage slots, contracts) The slow block log now shows: Code read: 626ns(4, 1.07 KiB) Unique state access: Accounts: 6 Storage slots: 11 Contracts executed: 4 Reader statistics account: hit: 4, miss: 6, rate: 40.00 storage: hit: 0, miss: 11, rate: 0.00 code: hit: 4, miss: 0, rate: 100.00
CPerezz
added a commit
to CPerezz/go-ethereum
that referenced
this pull request
Jan 13, 2026
This extends the execution statistics infrastructure from ethereum#33442 with: - Code cache hit/miss tracking (completing parity with account/storage) - Code bytes read metric for I/O volume analysis - Unique state access metrics (accounts, storage slots, contracts) The slow block log now shows: Code read: 626ns(4, 1.07 KiB) Unique state access: Accounts: 6 Storage slots: 11 Contracts executed: 4 Reader statistics account: hit: 4, miss: 6, rate: 40.00 storage: hit: 0, miss: 11, rate: 0.00 code: hit: 4, miss: 0, rate: 100.00
weiihann
pushed a commit
to weiihann/go-ethereum
that referenced
this pull request
Jan 14, 2026
weiihann
pushed a commit
to weiihann/go-ethereum
that referenced
this pull request
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the code read statistics and exposes them via the metrics and slow block report.