Skip to content

[dbsp] Portable thread id for samply.#5928

Merged
ryzhyk merged 1 commit intomainfrom
samply-fixup
Mar 26, 2026
Merged

[dbsp] Portable thread id for samply.#5928
ryzhyk merged 1 commit intomainfrom
samply-fixup

Conversation

@ryzhyk
Copy link
Copy Markdown
Contributor

@ryzhyk ryzhyk commented Mar 26, 2026

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.

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>
@ryzhyk ryzhyk requested a review from blp March 26, 2026 17:39
Copy link
Copy Markdown
Member

@blp blp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ryzhyk ryzhyk added this pull request to the merge queue Mar 26, 2026
Copy link
Copy Markdown

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The samply-on-non-Linux concern is minor (profiling accuracy, not correctness); this restores previous behavior. Both #5928 and #5929 carry the samply commit — one of them will need a rebase after the other merges.

Merged via the queue into main with commit 336899f Mar 26, 2026
1 check passed
@ryzhyk ryzhyk deleted the samply-fixup branch March 26, 2026 21:06
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

Successfully merging this pull request may close these issues.

3 participants