-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
souremaps arent being applied #446
Comments
Hey! As far as I remember, there's no circumstance where source-maps are automatically applied. That said, speedscope lets you apply sourcemaps after-the-fact. See #317 |
Thats cool! Unfortunately, dropping sourcemaps doesn't seem to have any effect on paths or symbols. Is there another way to load them that I can try? |
Could this be related to esm code? I tried generating my code as |
I'm not sure offhand if this would have anything to do with esm! If you want to debug, your best bet would be to step through the code here: speedscope/src/lib/js-source-map.ts Line 75 in de17f12
To get up and running locally, check out https://github.com/jlfwong/speedscope/blob/main/CONTRIBUTING.md |
Good call! It seems that the prof traces aren't having their filename/line/column populated. Not sure if this is the best way to do it, but the following patch fixes that: diff --git a/src/lib/profile.ts b/src/lib/profile.ts
index 4e04742..13b189b 100644
--- a/src/lib/profile.ts
+++ b/src/lib/profile.ts
@@ -66,6 +66,15 @@ export class Frame extends HasWeights {
private constructor(info: FrameInfo) {
super()
+ if (!info.file && !info.line && !info.col) {
+ const matches = info.name.match(/(?:\/\/?)?([^:]+):(\d+):(\d+)/)
+ if (matches) {
+ info.file = matches[1]
+ info.line = parseInt(matches[2], 10)
+ info.col = parseInt(matches[3], 10)
+ }
+ }
+
this.key = info.key
this.name = info.name
this.file = info.file However, even with this patch, the frames aren't remapped to their proper sources. |
Hi - trying to run speedscope to help optimize program startup. It doesn't seem like sourcemaps are being applied, making tracing operations challenging.
Here is a standalone script that closely mimics my setup, illustrating the issue:
test.sh
Thanks!
The text was updated successfully, but these errors were encountered: