Repository navigation
Conversation
The flame graph ordered siblings by function name only. Siblings with the same name kept the order in which they appear in the call node table, which depends on the stack table. Two similar profiles could therefore show the same functions in opposite orders. Example: in the JS-only flame graph of https://share.firefox.dev/4jy20z8 vs https://share.firefox.dev/4k1tYTW, the call node for callHook in the stack below has two children named "view": view [../../src/components/Controls.js:9:5] callHook [../../node_modules/mithril/render/render.js:34:11] updateComponent [../../node_modules/mithril/render/render.js:462:11] updateNode [../../node_modules/mithril/render/render.js:396:11] updateNodes [../../node_modules/mithril/render/render.js:270:11] updateElement [../../node_modules/mithril/render/render.js:451:11] Both view functions come from the same bundle, so they have the same name and the same file name. The two profiles showed them in opposite orders. Siblings with the same function name are now compared by: 1. The generated file name. 2. The original (source-mapped) file name. 3. The line, then the column, where the function starts. This uses the original location if there is one, and the generated location otherwise. To support this, bisectionRightByStrKey is replaced with bisectionRightBy, which takes a comparison function. computeFlameGraphRows now also takes the SourceTable and the SourceLocationTable.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6419 +/- ##
==========================================
- Coverage 84.78% 84.78% -0.01%
==========================================
Files 358 358
Lines 38946 38987 +41
Branches 10917 11038 +121
==========================================
+ Hits 33022 33056 +34
- Misses 5488 5495 +7
Partials 436 436 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Main | Deploy preview
Compare these flame graphs: https://share.firefox.dev/4jy20z8 vs https://share.firefox.dev/4k1tYTW
There are two
viewcall nodes with the same parent which swap positions in the two views. That's because they currently do not have a defined order. This PR fixes that.