-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve hermes profile frame keys to better group frames (#459)
Because all args are serialized in the key for hermes profiles, frames were not properly getting grouped since the "parent" property was different. This PR ensures that the frame key is properly constructed from the function name, file name, line + column number. | Before | After | | ----- | ----- | | <img width="1727" alt="Screenshot 2023-12-27 at 2 25 32 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/4ec04653-5a80-4f34-9506-48e0eb415983"> | <img width="1728" alt="Screenshot 2023-12-27 at 2 26 02 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/c3edc447-e8ad-4757-8576-cbb8c27eafe3"> | | <img width="1720" alt="Screenshot 2023-12-27 at 2 13 37 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/10194aba-8f26-48ca-bf15-06917b44ea99"> | <img width="1728" alt="Screenshot 2023-12-27 at 2 14 20 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/75c32401-1705-4b23-b71a-5f0a720160dd"> |
- Loading branch information
1 parent
3f3da22
commit e9a17d5
Showing
4 changed files
with
210 additions
and
7 deletions.
There are no files selected for viewing
156 changes: 156 additions & 0 deletions
156
sample/profiles/trace-event/hermes-multiple-frames.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
[ | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"B", | ||
"name":"[root]", | ||
"ts":0, | ||
"args":{ | ||
"name":"[root]", | ||
"category":"root", | ||
"url":null, | ||
"line":null, | ||
"column":null, | ||
"params":null, | ||
"allocatedCategory":"root", | ||
"allocatedName":"[root]" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"B", | ||
"name":"beta", | ||
"ts":1, | ||
"args":{ | ||
"line":54, | ||
"column":12, | ||
"funcLine":"1", | ||
"funcColumn":"1", | ||
"name":"beta", | ||
"category":"JavaScript", | ||
"parent":1, | ||
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js", | ||
"params":null, | ||
"allocatedCategory":"JavaScript", | ||
"allocatedName":"beta" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"E", | ||
"name":"beta", | ||
"ts":2, | ||
"args":{ | ||
"line":54, | ||
"column":12, | ||
"funcLine":"1", | ||
"funcColumn":"1", | ||
"name":"beta", | ||
"category":"JavaScript", | ||
"parent":1, | ||
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js", | ||
"params":null, | ||
"allocatedCategory":"JavaScript", | ||
"allocatedName":"beta" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"B", | ||
"name":"gamma", | ||
"ts":4, | ||
"args":{ | ||
"line":54, | ||
"column":12, | ||
"funcLine":"1", | ||
"funcColumn":"1", | ||
"name":"beta", | ||
"category":"blah", | ||
"parent":1, | ||
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js", | ||
"params":null, | ||
"allocatedCategory":"JavaScript", | ||
"allocatedName":"beta" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"E", | ||
"name":"gamma", | ||
"ts":13, | ||
"args":{ | ||
"line":54, | ||
"column":12, | ||
"funcLine":"1", | ||
"funcColumn":"1", | ||
"name":"beta", | ||
"category":"blah", | ||
"parent":1, | ||
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js", | ||
"params":null, | ||
"allocatedCategory":"JavaScript", | ||
"allocatedName":"beta" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"B", | ||
"name":"beta", | ||
"ts":4, | ||
"args":{ | ||
"line":54, | ||
"column":12, | ||
"funcLine":"1", | ||
"funcColumn":"1", | ||
"name":"beta", | ||
"category":"blah", | ||
"parent":1, | ||
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js", | ||
"params":null, | ||
"allocatedCategory":"JavaScript", | ||
"allocatedName":"beta" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"E", | ||
"name":"beta", | ||
"ts":10, | ||
"args":{ | ||
"line":54, | ||
"column":12, | ||
"funcLine":"1", | ||
"funcColumn":"1", | ||
"name":"beta", | ||
"category":"blah", | ||
"parent":1, | ||
"url":"/Users/example/test_project/node_modules/metro-runtime/src/polyfills/require.js", | ||
"params":null, | ||
"allocatedCategory":"JavaScript", | ||
"allocatedName":"beta" | ||
} | ||
}, | ||
{ | ||
"pid":0, | ||
"tid":0, | ||
"ph":"E", | ||
"name":"[root]", | ||
"ts":14, | ||
"args":{ | ||
"name":"[root]", | ||
"category":"root", | ||
"url":null, | ||
"line":null, | ||
"column":null, | ||
"params":null, | ||
"allocatedCategory":"root", | ||
"allocatedName":"[root]" | ||
} | ||
} | ||
] |
This file contains 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
This file contains 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
This file contains 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