diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp --- a/lld/MachO/Driver.cpp +++ b/lld/MachO/Driver.cpp @@ -1073,6 +1073,7 @@ } static void foldIdenticalLiterals() { + TimeTraceScope timeScope("Fold identical literals"); // We always create a cStringSection, regardless of whether dedupLiterals is // true. If it isn't, we simply create a non-deduplicating CStringSection. // Either way, we must unconditionally finalize it here. diff --git a/lld/MachO/ICF.cpp b/lld/MachO/ICF.cpp --- a/lld/MachO/ICF.cpp +++ b/lld/MachO/ICF.cpp @@ -373,6 +373,7 @@ } void macho::markAddrSigSymbols() { + TimeTraceScope timeScope("Mark addrsig symbols"); for (InputFile *file : inputFiles) { ObjFile *obj = dyn_cast(file); if (!obj) diff --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp --- a/lld/MachO/Writer.cpp +++ b/lld/MachO/Writer.cpp @@ -1126,8 +1126,10 @@ } void Writer::writeCodeSignature() { - if (codeSignatureSection) + if (codeSignatureSection) { + TimeTraceScope timeScope("Write code signature"); codeSignatureSection->writeHashes(buffer->getBufferStart()); + } } void Writer::writeOutputFile() {