You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so __libc_malloc_impl, __libc_free, alloc_slot and get_meta all seem to be coming from musl's memory allocator. Seeing memcpy and memset in the top 20 is also with memcmp and strlen not too far behind :(.
Activity
nickdesaulniers commentedon Jun 17, 2022
https://github.com/jemalloc/jemalloc/wiki/Getting-Started
nickdesaulniers commentedon Jun 17, 2022
Here's a profile of the kernel build with stage5 pgo:
so
__libc_malloc_impl,__libc_free,alloc_slotandget_metaall seem to be coming from musl's memory allocator. Seeingmemcpyandmemsetin the top 20 is also with memcmp and strlen not too far behind :(.nickdesaulniers commentedon Jun 17, 2022
@petrhosek mentioned that https://github.com/mjansson/rpmalloc might be interesting to play with; it's used for host tools for fuchsia.
petrhosek commentedon Jun 17, 2022
I'd also experiment with https://github.com/microsoft/mimalloc and https://github.com/microsoft/snmalloc, all of these are already supported by LLVM on Windows and we could consider extending that support to other platforms.
nickdesaulniers commentedon Jun 18, 2022
heh, all of those are listed: https://github.com/llvm/llvm-project/blob/be6af89f85ebd04646b5704301470f02b70a0447/llvm/lib/Support/CMakeLists.txt#L89-L95 so it seems that we can just set
LLVM_INTEGRATED_CRT_ALLOC=path/to/rpmalloc.nickdesaulniers commentedon Jun 21, 2022
Adding the following
-D LLVM_INTEGRATED_CRT_ALLOC=/rpmalloc-1.4.4to my cmake invocation produces:which is lame. I guess that's the purpose of https://reviews.llvm.org/D101427.
llvm-project: link against jemalloc
llvm-project: link against jemalloc