Skip to content

Commit 1e9a597

Browse files
SC llvm teamSC llvm team
SC llvm team
authored and
SC llvm team
committed
Merged main:356139bd027d into amd-gfx:112f651afc0f
Local branch amd-gfx 112f651 Merged main:2e26d091060e into amd-gfx:22f2ec2d35d2 Remote branch main 356139b [LLD][COFF] Add support for `--time-trace` (llvm#68236)
2 parents 112f651 + 356139b commit 1e9a597

27 files changed

+460
-228
lines changed

clang/lib/Format/Format.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3914,7 +3914,7 @@ llvm::Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName,
39143914

39153915
FormatStyle FallbackStyle = getNoStyle();
39163916
if (!getPredefinedStyle(FallbackStyleName, Style.Language, &FallbackStyle))
3917-
return make_string_error("Invalid fallback style \"" + FallbackStyleName);
3917+
return make_string_error("Invalid fallback style: " + FallbackStyleName);
39183918

39193919
llvm::SmallVector<std::unique_ptr<llvm::MemoryBuffer>, 1>
39203920
ChildFormatTextToApply;

lld/COFF/Config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ struct Configuration {
286286
uint32_t minorSubsystemVersion = 0;
287287
uint32_t timestamp = 0;
288288
uint32_t functionPadMin = 0;
289+
uint32_t timeTraceGranularity = 0;
289290
bool dynamicBase = true;
290291
bool allowBind = true;
291292
bool cetCompat = false;
@@ -309,6 +310,7 @@ struct Configuration {
309310
bool swaprunNet = false;
310311
bool thinLTOEmitImportsFiles;
311312
bool thinLTOIndexOnly;
313+
bool timeTraceEnabled = false;
312314
bool autoImport = false;
313315
bool pseudoRelocs = false;
314316
bool stdcallFixup = false;

lld/COFF/DebugTypes.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "llvm/Support/FormatVariadic.h"
3030
#include "llvm/Support/Parallel.h"
3131
#include "llvm/Support/Path.h"
32+
#include "llvm/Support/TimeProfiler.h"
3233

3334
using namespace llvm;
3435
using namespace llvm::codeview;
@@ -1068,13 +1069,15 @@ TypeMerger::~TypeMerger() = default;
10681069
void TypeMerger::mergeTypesWithGHash() {
10691070
// Load ghashes. Do type servers and PCH objects first.
10701071
{
1072+
llvm::TimeTraceScope timeScope("Load GHASHes");
10711073
ScopedTimer t1(ctx.loadGHashTimer);
10721074
parallelForEach(dependencySources,
10731075
[&](TpiSource *source) { source->loadGHashes(); });
10741076
parallelForEach(objectSources,
10751077
[&](TpiSource *source) { source->loadGHashes(); });
10761078
}
10771079

1080+
llvm::TimeTraceScope timeScope("Merge types (GHASH)");
10781081
ScopedTimer t2(ctx.mergeGHashTimer);
10791082
GHashState ghashState;
10801083

0 commit comments

Comments
 (0)