jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.45k stars 237 forks source link

pid/tid string format support #470

Open IntelligenceGeneral opened 5 months ago

IntelligenceGeneral commented 5 months ago

hi author,

I'm looking for a tool to replace chrome://tracing, and GPT tell me speedscope is a good interactive. i have tried to use speedscope to open a chrome://tracing file but failed to show the timeline, and I found the reason is : my json file uses string as "pid" and "tid" field. (chrome://tracing works) I tried to hack your code local but failed (I'm a EE guy) don't know any knowledge about Js? or the chrome.ts file, so open this question to ask for offical support for "string" pid and tid, could get your response, thanks!

one more thing, the reason I'm looking for a chrome://tracing alternatives is chrome only supports "pid" and "tid" my fundamental requirement is want to have more ID hierarchies: like Pid->Tid-> Aid-> Bid .... which could be customized any ideas are welcome.

jlfwong commented 5 months ago

Hey @ComputeGeneral! Where does the chrome://tracing file you're generating come from? I haven't seen this particular issue before. If you can provide a test file that imports successfully into chrome tracing but fails to import into speedscope that would be helpful.

Regarding the pid/tid/aid/bid, how would you expect to be able to navigate those hierarchies?

I don't intend to have speedscope support hierarchies in chrome tracing file format which neither the standard nor the chrome tracing format itself supports, though there may be some way of accomplishing your goals using speedscope which doesn't require that.

IntelligenceGeneral commented 5 months ago

Hi jif

the chrome://tracing file i used is generated by my own python script to handle my hardware model's output for perf analysis the example file is attached.

trace.json

"Regarding the pid/tid/aid/bid, how would you expect to be able to navigate those hierarchies?"

for the chrome://tracing there is a pid/tid bar(navigate bar?) on the left side of window, and can be folded, so I can manage my data easily. the pain to use chrome://tracing for me is when two event has overlap on timeline(event A's end time is later than event B's start time), chrome://tracing some times can't split them in multiple rows. but in some case it could split overlap events in different row. (do you know about these?)

I'm not asking speedscope to support what I want, just curious if there is easier way to achieve my target (for now I'm using python to plot data seems inefficient, and static)

IntelligenceGeneral commented 5 months ago

by the way, the readMe-admin is still not detail enough for a naive user who want to modify ->rebuild? ->publish ->depoly ?

hope there is a readMe for someone like me to modify -> rebuild -> publish (by the way I don't know where to see the Js console for the trace file load error)

IntelligenceGeneral commented 4 months ago

hi @jlfwong could you give me a brief guide to add string pid/tid support?