-
Notifications
You must be signed in to change notification settings - Fork 60
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
Support marker file paths with thread ID #143
Conversation
On Linux we use the thread that |
Hmm, yeah, that would work. But threads would each still need to open a different filename anyway, and this approach seems more generic (i.e. it works on any platform, even if you have no way of obtaining the thread id of the Also wow is the marker format verbose. We spit out gigabytes of data (we have a lot of markers, many with very long names!) in 10 seconds. I was thinking of either extending it or defining a new format that lets marker names/info be defined and then referenced by ID (plus support for categories and other things). Did you have any plans in that direction? |
Oh absolutely, the marker file format is the dumbest and simplest format that was solving my problem at the time. I want to remove support for it as soon as we have something better. The super handwavy plan for markers / traces is as follows:
|
That's true. Until now I've only had a single thread per process that wanted markers.
Also true. But on Windows I'm not sure how to get the path to the marker file. I was passing a Anyway, I'm happy with the "put-thread-id-in-filename" approach. We can still do what I suggested later for cases where the tid isn't part of the filename - your approach is nicely composable with what I suggested. |
My super dumb approach to this was going to be to just look for them in $TEMP during processing of the etl file. In theory pid reuse could cause problems, but the chances of pid+tid pair reuse seem really low. |
... also, is there a Discord/Matrix/something channel for samply? :) |
https://chat.mozilla.org/#/room/#profiler:mozilla.org is currently the closest equivalent to a samply channel. |
Adds support for marker files of the format
marker-pid-tid.txt
so that markers can be assigned the correct thread, if provided. Non-tid files still work fine and go to the main thread as before.