[lld][ELF] Add additional time trace categories

I noticed when running a large link with the --time-trace option that
there were several areas which were missing any specific time trace
categories (aside from the generic link/ExecuteLinker categories). This
patch adds new categories to fill most of the "gaps", or to provide more
detail than was previously provided.

Reviewed by: MaskRay, grimar, russell.gallop

Differential Revision: https://reviews.llvm.org/D90686
This commit is contained in:
James Henderson
2020-11-03 14:41:09 +00:00
parent fd407e1f1e
commit 439341b9bf
8 changed files with 210 additions and 137 deletions

View File

@@ -30,6 +30,7 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Parallel.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/TimeProfiler.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
@@ -765,6 +766,7 @@ void LinkerScript::addOrphanSections() {
}
void LinkerScript::diagnoseOrphanHandling() const {
llvm::TimeTraceScope timeScope("Diagnose orphan sections");
for (const InputSectionBase *sec : orphanSections) {
// Input SHT_REL[A] retained by --emit-relocs are ignored by
// computeInputSections(). Don't warn/error.