[PATCH] D51887: lld-link: Set PDB GUID to hash of PDB contents instead of to a random byte sequence.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 16:24:12 PDT 2018


thakis added a comment.

In https://reviews.llvm.org/D51887#1229530, @ruiu wrote:

> I wonder if you can just compute a hash for a mmap'ed PDB file instead of defining a new type of Stream. That's what we do for ELF when computing a build-id, and I found that's easy to do. It is also easy to parallelize hash computation by making it a tree hash.


I considered this, but I figured that's much worse cache-ing wise. Data passed to the stream is in memory, while walking the file again will likely cause lots of page faults, given how bad Windows's file system cache is. Since the new stream turned out to be very little code, I'm pretty happy with this approach.

If you want, I can prototype the other version too and see how much slower it is and how the code looks there. Most of the patch will stay the same in both cases.


https://reviews.llvm.org/D51887





More information about the llvm-commits mailing list