docs: correct a false claim, perf does sample on the bench (#452) - #849
Merged
Conversation
I wrote that perf cannot sample on jd-tests and used it to justify replacing the
symbol-bucket attribution with a differential design. The claim was false and the
reason is the rule this session wrote down:
perf record -e cpu-clock -- sleep 1 -> file written, no samples
sleep consumes no CPU, so a cpu-clock profile of it has no samples whether or not
the profiler works. The probe could not have distinguished the two outcomes.
Re-run against a CPU-burning workload, same box, same settings: 1K samples, zero
lost.
Hardware events are genuinely unavailable (no PMU; cycles unsupported, which is
what #505 records). Software events work. Extending the first to 'cannot sample'
was mine.
The differential method stands on its own merits -- it measures the milliseconds
each route would remove rather than inferring a saving from symbol shares -- but
it was chosen for a false reason, and the attribution it replaced was available.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeNm2Gw6h16Z123We3F1vJ
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.
design/ISSUE_452_ROUTE_B_VS_PHASE_1.mdon main states thatperfcannot sampleon the bench box, and uses that to justify replacing the symbol-bucket
attribution with a differential design. The claim is false.
The probe behind it was:
sleepconsumes no CPU, so acpu-clockprofile of it has no samples whether ornot the profiler works. The probe could not produce the outcome it was testing
for, so it could not distinguish the two cases.
What is true is narrower: this host has no hardware PMU, so
cyclesis genuinelyunsupported, which is what #505 records. Software events work. Extending the
first fact to "cannot sample at all" was the error.
Re-checked before opening this, on jd-laptop rather than the bench, because the
point at issue is whether the probe can distinguish the two outcomes:
sleep 1, the original probeThe near-empty first result reports an idle workload, not a broken profiler. The
commit records the equivalent re-run on the bench itself: 1K samples, zero lost.
The differential method is not withdrawn. It measures the milliseconds each route
would remove rather than inferring a saving from symbol shares, which is better
evidence for the decision either way. What changes is the record of why it was
chosen, and the note that the attribution it replaced was available.
Documentation only. No code, no test, no build surface.
The commit is
bdaacdafromfeat/452-late-materialization, an unmerged localbranch found during a branch sweep. It is cherry-picked onto current main here
and applies cleanly. Every other branch in that sweep was verified already
contained in main and deleted.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CmUVgsuNiCxuf3FjQKFoGx