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

profiler: Fix pthread_getname_np not available on musl #110

Merged
merged 1 commit into from Mar 21, 2022

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented Mar 21, 2022

Signed-off-by: Xuanwo github@xuanwo.io

Fix #41

This PR will make pprof-rs compilable on x86_64-unknown-linux-musl

:( PKG_CONFIG_ALLOW_CROSS=1 cargo build --target x86_64-unknown-linux-musl
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s

Only tested on linux platform, please correct me if something is wrong.

Signed-off-by: Xuanwo <github@xuanwo.io>
Copy link
Member

@YangKeao YangKeao left a comment

Choose a reason for hiding this comment

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

LGTM

@YangKeao
Copy link
Member

YangKeao commented Mar 21, 2022

BTW, does it work (correctly)? The last time I tried to work on the musl support: #32, it turns out that it cannot get a meaningful backtrace. @Xuanwo

But anyway, I think it's fine to just fix the compile error for musl, so I will merge this PR.

@YangKeao YangKeao merged commit 666d9e2 into tikv:master Mar 21, 2022
@Xuanwo
Copy link
Member Author

Xuanwo commented Mar 21, 2022

The last time I tried to work on the musl support: #32, it turns out that it cannot get a meaningful backtrace. @Xuanwo

It's more important for us to make the whole project compilable on musl and make a static release to end-users who never run pprof. So in our use case, we don't care about the backtrace on musl, and I didn't test the behavior too 😿

@Xuanwo Xuanwo deleted the fix-pthread_getname_np branch March 21, 2022 06:09
@Xuanwo Xuanwo mentioned this pull request Mar 21, 2022
YangKeao added a commit to YangKeao/pprof-rs that referenced this pull request Apr 20, 2022
Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
YangKeao added a commit that referenced this pull request Apr 20, 2022
* Bump version to 0.8

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>

* add CHANGELOG for #110

Signed-off-by: YangKeao <yangkeao@chunibyo.icu>
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.

support musl
2 participants