[PATCH] D116367: [ELF][LTO] Call madvise(MADV_DONTNEED) on BitcodeFile buffers

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 29 14:05:49 PST 2021


MaskRay added a comment.

In D116367#3212997 <https://reviews.llvm.org/D116367#3212997>, @tejohnson wrote:

> I tried a few times and didn't see a slowdown.
>
> However, with the latest version to only free the bitcode files, I am seeing less memory reduction (9.3G vs 9.1G before), and also a 30-40s slowdown (maybe the DenseSet lookups?). Something could probably be done to avoid the lookups, but do you have any idea why the memory reduction would be less? Hmm, probably there are some other non-bitcode files that are being read for symbol resolution but not being used further in index only mode?

It was my negligence. `--start-lib` bitcode files may not be extracted. They reside in the `lazyBitcodeFiles` list. The latest diff marked them as well.
I think this is sufficient for our use case. The diff tried a bit more to support other use cases.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116367/new/

https://reviews.llvm.org/D116367



More information about the llvm-commits mailing list