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/IR/Module.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/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 70d3641..30b5e48 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -44,6 +44,7 @@ #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/RandomNumberGenerator.h" +#include "llvm/Support/TimeProfiler.h" #include "llvm/Support/VersionTuple.h" #include <cassert> #include <cstdint> @@ -478,6 +479,7 @@ Error Module::materializeAll() { } Error Module::materializeMetadata() { + llvm::TimeTraceScope timeScope("Materialize metadata"); if (!Materializer) return Error::success(); return Materializer->materializeMetadata(); |