forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 333
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
More aggressively deduplicate global warnings based on contents. (#1… #9450
Merged
adrian-prantl
merged 6 commits into
swiftlang:stable/20240723
from
adrian-prantl:138144624-rebranch
Oct 22, 2024
Merged
More aggressively deduplicate global warnings based on contents. (#1… #9450
adrian-prantl
merged 6 commits into
swiftlang:stable/20240723
from
adrian-prantl:138144624-rebranch
Oct 22, 2024
+277
−134
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…m#112801) I've been getting complaints from users being spammed by -gmodules missing file warnings going out of control because each object file depends on an entire DAG of PCM files that usually are all missing at once. To reduce this problem, this patch does two things: 1. Module now maintains a DenseMap<hash, once> that is used to display each warning only once, based on its actual text. 2. The PCM warning itself is reworded to include less details, such as the DIE offset, which is only useful to LLDB developers, who can get this from the dwarf log if they need it. Because the detail is omitted the hashing from (1) deduplicates the warnings. rdar://138144624 (cherry picked from commit 697a455) Conflicts: lldb/include/lldb/Core/Module.h
@swift-ci test |
FNV, used by stable_hash_combine_string is extremely slow. For string hashing with good avalanche effects, we prefer xxh3_64bits. StableHashing.h might still be useful as it provides a stable hash_combine while Hashing.h's might be non-deterministic (llvm#96282). Pull Request: llvm#100668 (cherry picked from commit c538434)
I found the current stable hash is not deterministic across multiple runs on a specific platform. This is because it uses `hash_combine` instead of `stable_hash_combine`. (cherry picked from commit c9b6339)
This is a follow-up to address a suggestion from llvm#105619. The main goal of this change is to efficiently implement stable hash functions using the xxh3 64bits API. `stable_hash_combine_range` and `stable_hash_combine_array` functions are removed and consolidated into a more general `stable_hash_combine` function that takes an `ArrayRef<stable_hash>` as input. (cherry picked from commit 7615c0b)
…lvm#106156) LLVM often extends global names by adding suffixes to distinguish unique identities. However, these suffixes are not always stable across different runs and build environments. To address this issue, I implemented `get_stable_name` to ignore such suffixes and obtain the original name. This approach is not new, as PGO or Bolt already handle this issue similarly. Using the stable name obtained from `get_stable_name`, I implemented `stable_hash_name` while utilizing the same underlying `xxh3_64bit` algorithm as before. (cherry picked from commit f9ad249)
@swift-ci test |
FNV is slow and the name StableHashing.h might be misleading. Just use xxh3_64bits, which has been adopted in many places. (cherry picked from commit 7b1bb2b)
@swift-ci test |
@swift-ci test linux |
@swift-ci test windows |
@swift-ci test linux |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
adrian-prantl
merged commit Oct 22, 2024
e2db10a
into
swiftlang:stable/20240723
2 of 3 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…12801)
I've been getting complaints from users being spammed by -gmodules missing file warnings going out of control because each object file depends on an entire DAG of PCM files that usually are all missing at once. To reduce this problem, this patch does two things:
Module now maintains a DenseMap<hash, once> that is used to display each warning only once, based on its actual text.
The PCM warning itself is reworded to include less details, such as the DIE offset, which is only useful to LLDB developers, who can get this from the dwarf log if they need it. Because the detail is omitted the hashing from (1) deduplicates the warnings.
rdar://138144624
(cherry picked from commit 697a455)
Conflicts:
lldb/include/lldb/Core/Module.h