[all-commits] [llvm/llvm-project] 7bd4f1: [memprof] Use BLAKE for FrameId (#109501)
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Tue Sep 24 15:32:47 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7bd4f1a0ed64aaf13e6acdafaaf50c4e7bf1d4dc
https://github.com/llvm/llvm-project/commit/7bd4f1a0ed64aaf13e6acdafaaf50c4e7bf1d4dc
Author: Kazu Hirata <kazu at google.com>
Date: 2024-09-24 (Tue, 24 Sep 2024)
Changed paths:
M llvm/include/llvm/ProfileData/MemProf.h
Log Message:
-----------
[memprof] Use BLAKE for FrameId (#109501)
This patch uses a stronger hash function for FrameId.
Without this patch, I've observed hash collisions in fairly common
scenarios. Specifically, for a given GUID, I see three pairs of hash
collisions in the two-dimensional range 1 <= LineOffset <= 70 and
1 <= Column <= 50, which may be a bit too frequent. With the new
function, I don't see collisions at all even for a large profile.
Impact on serialization/deserialization should be as follows:
- Up to indexed memprof format Version 2, inclusive: The FrameIds
computed with the new hash function will show up as part of the
profile file. However, the deserializer only treats FrameIds as
keys (but not hash values) to retrieve Frames from the on-disk hash
table, so a change of the hash function shouldn't matter.
- For indexed memprof format Version 3, FrameIds do not show up at all
in the resulting profile file. FrameIds are only used to break ties
when we sort Frames in writeMemProfFrameArray.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list