[ELF] Add gdb index time trace
authorAndreas Hollandt <trass3r@gmail.com>
Sun, 6 Nov 2022 23:13:32 +0000 (15:13 -0800)
committerFangrui Song <i@maskray.me>
Sun, 6 Nov 2022 23:13:32 +0000 (15:13 -0800)
Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D135659

lld/ELF/SyntheticSections.cpp

index cb98a2d..316d894 100644 (file)
@@ -2835,6 +2835,8 @@ createSymbols(
 
 // Returns a newly-created .gdb_index section.
 template <class ELFT> GdbIndexSection *GdbIndexSection::create() {
+  llvm::TimeTraceScope timeScope("Create gdb index");
+
   // Collect InputFiles with .debug_info. See the comment in
   // LLDDwarfObj<ELFT>::LLDDwarfObj. If we do lightweight parsing in the future,
   // note that isec->data() may uncompress the full content, which should be