Skip to content
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

Better main thread detection during Instruments data import. #91

Closed
rudro opened this issue Jul 12, 2018 · 4 comments
Closed

Better main thread detection during Instruments data import. #91

rudro opened this issue Jul 12, 2018 · 4 comments

Comments

@rudro
Copy link

rudro commented Jul 12, 2018

For a complex, heavily multi-threaded app, the logic that assumes that the thread with the most samples is the main thread can be mislead.

Sadly, I don't have a concrete suggestion for something better. I notice that main appears to usually be thread id '4', but there has to be something less hacky.

Just wanted to open this issues to start a discussion about this.

@jlfwong
Copy link
Owner

jlfwong commented Aug 5, 2018

@rudro Would this still be important to solve if speedscope supported importing profiles w/ multiple threads & processes? (See #82)

jlfwong added a commit that referenced this issue Aug 12, 2018
More broadly, this just supports multiple profiles loaded into the editor in the same time, which supports import from profiles which are multithreaded by importing each thread as a different profile.

For now, the only two file formats that support multiprocess import are Instruments .trace files and speedscope's own file format

In the process of doing this, I refactored the container code considerably and extracted all the dispatch calls into containers rather than them being part of the non-container view code. This is nice because it means that views don't have to be aware of which Flamechart they are or which profile index is being operated upon.

Fixes #66 
Fixes #82 
Fixes #91
jlfwong added a commit that referenced this issue Aug 12, 2018
More broadly, this just supports multiple profiles loaded into the editor in the same time, which supports import from profiles which are multithreaded by importing each thread as a different profile.

For now, the only two file formats that support multiprocess import are Instruments .trace files and speedscope's own file format

In the process of doing this, I refactored the container code considerably and extracted all the dispatch calls into containers rather than them being part of the non-container view code. This is nice because it means that views don't have to be aware of which Flamechart they are or which profile index is being operated upon.

Fixes #66
Fixes #82
Fixes #91
@jlfwong
Copy link
Owner

jlfwong commented Aug 14, 2018

@rudro When you drop an instruments trace onto https://www.speedscope.app/, it should now import all threads in all runs. If you get a chance to give it a try, please let me know how it works for you!

@rudro
Copy link
Author

rudro commented Aug 16, 2018

Tried this out, works great! Thanks.

@jlfwong
Copy link
Owner

jlfwong commented Aug 21, 2018

@rudro Hey I'm writing a blogpost for the release of speedscope 1.0. Any chance you'd be able to share some information about what you've been using this for? It sounds like you've been using this predominately through Instruements. Is it for iOS profiling? Is speedscope being used at Uber?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants