diff options
author | Alexandre Ganea <aganea@havenstudios.com> | 2025-09-05 15:28:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-05 15:28:19 -0400 |
commit | 5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12 (patch) | |
tree | 81c45e1bb024b48f3089d8c5e4764ddf34bc662d /llvm/lib/Bitcode/Reader/MetadataLoader.cpp | |
parent | a549e73cad60336d8e9c0622ae7ad86aa65ef4ce (diff) | |
download | llvm-5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12.zip llvm-5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12.tar.gz llvm-5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12.tar.bz2 |
[LLD][COFF] Add more `--time-trace` tags for ThinLTO linking (#156471)
In order to better see what's going on during ThinLTO linking, this PR
adds more profile tags when using `--time-trace` on a `lld-link.exe`
invocation.
After PR, linking `clang.exe`:
<img width="3839" height="2026" alt="Capture d’écran 2025-09-02 082021"
src="https://github.com/user-attachments/assets/bf0c85ba-2f85-4bbf-a5c1-800039b56910"
/>
Linking a custom (Unreal Engine game) binary gives a completly
different picture, probably because of using Unity files, and the sheer
amount of input files (here, providing over 60 GB of .OBJs/.LIBs).
<img width="1940" height="1008" alt="Capture d’écran 2025-09-02 102048"
src="https://github.com/user-attachments/assets/60b28630-7995-45ce-9e8c-13f3cb5312e0"
/>
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp index 738e47b..a5cedad 100644 --- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp +++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp @@ -43,6 +43,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/TimeProfiler.h" #include <algorithm> #include <cassert> @@ -1052,6 +1053,7 @@ void MetadataLoader::MetadataLoaderImpl::callMDTypeCallback(Metadata **Val, /// Parse a METADATA_BLOCK. If ModuleLevel is true then we are parsing /// module level metadata. Error MetadataLoader::MetadataLoaderImpl::parseMetadata(bool ModuleLevel) { + llvm::TimeTraceScope timeScope("Parse metadata"); if (!ModuleLevel && MetadataList.hasFwdRefs()) return error("Invalid metadata: fwd refs into function blocks"); |