benchmark: add runtime funcinfo scaling probes#2011
Closed
cpunion wants to merge 24 commits into
Closed
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
Superseded: the scaling harness was carried into #2016 as benchmark/runtime_funcinfo, now also covering ordinary-code (plain), call-depth and big-method scale dimensions. |
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.
Depends on #2010.
Adds reusable scaling probes to
benchmark/runtime_funcinfoso runtime funcinfo performance can be compared against Go across project sizes and cold first-use paths.Changes
coldscenario that measures first-useFuncForPC,Func.FileLine,runtime.Caller, andCallersFramesfrom a fresh process.-scales=PxM,...to generate multiplemultipkg_*andcold_*scenarios in one run.results.json, including package/function counts and target counts.Validation
go test ./benchmark/runtime_funcinfogo run ./benchmark/runtime_funcinfo -out /tmp/llgo-runtime-funcinfo-scale-smoke -runs=1 -iters=1000 -scenarios=multipkg,cold -scales=2x2,3x2 -variant go=gogo run ./benchmark/runtime_funcinfo -out /tmp/llgo-runtime-funcinfo-scale-llgo-smoke2 -runs=1 -iters=1000 -scenarios=cold -scales=2x2,3x2 -variant llgo=llgo,/tmp/llgo-scaling-bench,/Users/lijie/source/goplus/llgo-wt-runtime-funcinfo-scaling-runs=5 -iters=200000 -scenarios=multipkg,cold -scales=6x6,12x12,24x24Cells are
best/trimmed avg.multipkg.*Manyandcold.Warm*Manyare batch metrics over the target count in each row.Go 1.26.4 vs #2010 Scaling Snapshot
Interpretation
#2010 is faster than Go 1.26.4 on hot many-PC entry lookup in these generated probes, but still has a large cold first-use gap. The cold
FirstFuncForPCresults show lazy runtime funcinfo table initialization around 14 ms on macOS for this probe, while Go's linker-generated pclntab/findfunctab path stays in low microseconds.