tooling: add profiling harness for V8 cpu/heap/tick profiles#69
Merged
Conversation
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.
Summary
Adds a small profiling harness so the next round of perf work can be driven by measured hot frames instead of guesses. Pairs naturally with the existing
scripts/bench-diff.shworkflow — bench-diff tells you whether a change is a win, this harness tells you where to look for one.scripts/profile-driver.js— runs ONE scenario (init/opf/gpf/eachmap-gen/eachmap-orig) against ONE fixture, sized so a single node invocation produces a useful profile. Warms up before the measured loop so V8 has tier-upped before sampling starts. HonorsSCENARIO/FIXTURE/ITERS/WARMUPenv vars.scripts/profile.sh— wraps node with--cpu-prof,--heap-prof, and--profflags and writes outputs totmp/profiles/. Honors aMODEenv var (all/cpu/heap/prof) so individual modes can be run alone.scripts/analyze-cpuprofile.js— bucket-by-frame self-time summary of a.cpuprofile(top N).scripts/analyze-heapprofile.js— bucket-by-frame self-allocation-bytes summary of a.heapprofile(top N)..gitignore— addstmp/so profile output stays out of version control.The CPU profile output (via Chrome DevTools or the analyzer) was what surfaced the gpf hot frame addressed in #68.
Usage
Test plan
babel.min.js.map.cpuprofile,.heapprofile,.prof.txt) are produced intmp/profiles/