annotate lld/COFF/COFFLinkerContext.cpp @ 240:ca573705d418

merge
author matac
date Fri, 28 Jul 2023 20:50:09 +0900
parents c4bab56944e8
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
1 //===- COFFContext.cpp ----------------------------------------------------===//
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
3 // See https://llvm.org/LICENSE.txt for license information.
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
5 //
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
6 //===----------------------------------------------------------------------===//
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
7 //
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
8 // Description
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
9 //
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
10 //===----------------------------------------------------------------------===//
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
11
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
12 #include "COFFLinkerContext.h"
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
13 #include "lld/Common/Memory.h"
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
14 #include "llvm/DebugInfo/CodeView/TypeHashing.h"
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
15
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
16 namespace lld::coff {
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
17
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
18 COFFLinkerContext::COFFLinkerContext()
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
19 : symtab(*this), rootTimer("Total Linking Time"),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
20 inputFileTimer("Input File Reading", rootTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
21 ltoTimer("LTO", rootTimer), gcTimer("GC", rootTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
22 icfTimer("ICF", rootTimer), codeLayoutTimer("Code Layout", rootTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
23 outputCommitTimer("Commit Output File", rootTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
24 totalMapTimer("MAP Emission (Cumulative)", rootTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
25 symbolGatherTimer("Gather Symbols", totalMapTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
26 symbolStringsTimer("Build Symbol Strings", totalMapTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
27 writeTimer("Write to File", totalMapTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
28 totalPdbLinkTimer("PDB Emission (Cumulative)", rootTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
29 addObjectsTimer("Add Objects", totalPdbLinkTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
30 typeMergingTimer("Type Merging", addObjectsTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
31 loadGHashTimer("Global Type Hashing", addObjectsTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
32 mergeGHashTimer("GHash Type Merging", addObjectsTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
33 symbolMergingTimer("Symbol Merging", addObjectsTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
34 publicsLayoutTimer("Publics Stream Layout", totalPdbLinkTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
35 tpiStreamLayoutTimer("TPI Stream Layout", totalPdbLinkTimer),
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
36 diskCommitTimer("Commit to Disk", totalPdbLinkTimer) {}
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
37
c4bab56944e8 LLVM 16
kono
parents:
diff changeset
38 } // namespace lld::coff