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

track: Check for unw_set_caching_policy before using #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kraj
Copy link

@kraj kraj commented May 29, 2021

llvm libunwind does not implement unw_cache_* functions yet
Include inttypes.h got PRI* macros

Signed-off-by: Khem Raj raj.khem@gmail.com

llvm libunwind does not implement unw_cache_* functions yet
Include inttypes.h got PRI* macros

Signed-off-by: Khem Raj <raj.khem@gmail.com>
if (unw_set_caching_policy(unw_local_addr_space, UNW_CACHE_PER_THREAD)) {
fprintf(stderr, "WARNING: Failed to enable per-thread libunwind caching.\n");
}
#endif
#if LIBUNWIND_HAS_UNW_SET_CACHE_SIZE
Copy link
Collaborator

Choose a reason for hiding this comment

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

this here is set via cmake/FindLibunwind.cmake - you'll have to add the same check for UNW_CACHE_PER_THREAD and then add it to libunwind_config.h.cmake

@milianw
Copy link
Collaborator

milianw commented May 30, 2021

Interesting, I've never used heaptrack with any other libunwind than the one over at https://github.com/libunwind/libunwind/ - can you tell me how it performs with llvm's libunwind? how do you use it from cmake? if it works well, I'd like to officially document that.

@kraj
Copy link
Author

kraj commented Jun 1, 2021

Interesting, I've never used heaptrack with any other libunwind than the one over at https://github.com/libunwind/libunwind/ - can you tell me how it performs with llvm's libunwind? how do you use it from cmake? if it works well, I'd like to officially document that.

so far in my little testing I have not seen any issues. but then I have only run one sample.

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.

2 participants