-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hermes-specific support for the trace event format (#458)
Profiles that are transformed into the hermes trace event format are guaranteed to have specific arguments that supply metadata that is useful for debugging - namely the filename, line + col number that the function call originated from, with sourcemaps applied. This PR adds specific support for this information to the trace event importer. This means that we can have the Frame name be just the name of the function, since we know all the information we want to be displayed in the UI is captured in the frame info, which makes the traces cleaner to look at. | Before | After | |-----|-----| | <img width="1728" alt="Screenshot 2023-12-26 at 2 40 01 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/f9dff608-5df3-4098-b1f8-91a69185d906"> | <img width="1726" alt="Screenshot 2023-12-26 at 2 39 13 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/b8ff360e-a316-4bef-8ebc-620c9ff1a998"> | | <img width="1728" alt="Screenshot 2023-12-26 at 2 41 03 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/127a49b5-458e-4ac8-934a-202e565cb20f"> | <img width="1728" alt="Screenshot 2023-12-26 at 2 41 29 PM" src="https://github.com/jlfwong/speedscope/assets/9957046/ebb285ce-6b33-4535-8e45-b9ada4e4d97f"> |
- Loading branch information
1 parent
88f4fe6
commit 4feb1e5
Showing
4 changed files
with
214 additions
and
16 deletions.
There are no files selected for viewing
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,76 @@ | ||
[ | ||
{ | ||
"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": 13, | ||
"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": "[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