Comments (5)
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
from speedscope.
speedscope lets you apply sourcemaps after-the-fact.
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?
from speedscope.
Could this be related to esm code? I tried generating my code as .js
(from .mjs
) but that didn't help. Any way to debug sourcemaps to see if they are finding anything to apply?
from speedscope.
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
from speedscope.
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.
from speedscope.
Related Issues (20)
- when i use this, how can i get release when i change it?
- output for speedscope format is not loaded in Firefox in Ubuntu unless it has .json extension HOT 12
- Tooltip partially hidden under mouse HOT 2
- Add A/B comparison support HOT 6
- Could not import the json example into www.speedscope.app HOT 1
- Not support non-systemwide perf result HOT 3
- Ability to pass data encoded
- Callgrind inputs: Some called functions along with their callees are detached from the rest of execution at the root level HOT 1
- Incorrect rendering with long traces (thousands of seconds)
- Allow search by filename HOT 1
- xcode 15 instrument data load fail
- pid/tid string format support HOT 4
- unable to load the json file and getting error for files size above 172 KB HOT 1
- [Feature Request] View Multiple Process Flamegraphs at Once HOT 1
- Add support for Rust v0 symbol mangling scheme
- Use speedscope programmatically HOT 1
- It's non-obvious when speedscope imports a multi-threaded profile
- Native support for cProfile dump
- Cannot open large size JSON
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speedscope.