Conversation
Use thread-id crate to get thread id on non-linux systems. We used to do this in the past, but this logic was removed in the recent samply rework, causing compilation to fail on MacOS. There is a concern that the thread id returned by the `thread-id` crate is not the thread id expected by samply. If that's the case, we won't get a correct per-thread timeline in the resulting samply profile; however we're not sure how to get the correct thread id, and this is in any case better than compilation errors. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
mythical-fred
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use thread-id crate to get thread id on non-linux systems. We used to do this in the past, but this logic was removed in the recent samply rework, causing compilation to fail on MacOS.
There is a concern that the thread id returned by the
thread-idcrate is not the thread id expected by samply. If that's the case, we won't get a correct per-thread timeline in the resulting samply profile; however we're not sure how to get the correct thread id, and this is in any case better than compilation errors.