-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fix jemalloc compatibility with LLVM libunwind #37078
Conversation
jemalloc provides support for two different libunwind flavors: the original HP libunwind and the one coming with gcc / g++ / libstdc++. The latter is identified by `JEMALLOC_PROF_LIBGCC` and provides `_Unwind_Backtrace` method instead of `unw_backtrace`. At the time ClickHouse uses LLVM libunwind which follows libgcc's way of backtracing. ClickHouse has to provide `unw_backtrace` method by the means of [commit 8e2b31e](ClickHouse/libunwind@8e2b31e). While this PR does not allow complete remove of the patch (as ClickHouse itself uses unw_backtrace directly), it definitely sorts the things out.
@alexey-milovidov, @nikitamikhaylov, could you merge this? |
Functional test has failed: https://s3.amazonaws.com/clickhouse-test-reports/37078/6d28b226878f935505edef2606c860da3b58bc9b/stateless_tests__thread__actions__[3/3].html Obviously, it is not related to the changes in this PR but I will use this fact to highlight the principle that pull requests should be 100% green, regardless. We need to investigate and fix the test and only then merge this PR. |
@Mergifyio update |
✅ Branch has been successfully updated |
I merged prematurely, but the code is non-obvious, it needs a comment. It's literally impossible to understand, why
when libunwind is enabled we use "libgcc" for profiling in jemalloc. Need to copy-paste your description from the pull request to the code. |
jemalloc provides support for two different libunwind flavors: the original HP libunwind and the one coming with gcc / g++ / libstdc++.
The latter is identified by
JEMALLOC_PROF_LIBGCC
and uses_Unwind_Backtrace
method instead ofunw_backtrace
.At the time ClickHouse uses LLVM libunwind which follows libgcc's way of backtracing.
ClickHouse has to provide
unw_backtrace
method by the means of commit 8e2b31e.While this PR does not allow complete removal of the patch (as ClickHouse itself uses unw_backtrace directly), it definitely sorts some things out.
Changelog category (leave one):