adjust for SVN r286524 and SVN r287369

Groups are required for Timers after SVN r286524.  SVN r287369 requires that
timers have short names and long descriptions.  Adjust the API usage
accordingly.  Reorder some words to make some more sense as a description.
This commit is contained in:
Saleem Abdulrasool
2016-11-20 12:19:35 -08:00
committed by Bob Wilson
parent 13da3fa8b1
commit 2f21735256
3 changed files with 5 additions and 4 deletions

View File

@@ -33,7 +33,8 @@ namespace swift {
public:
explicit SharedTimer(StringRef name) {
if (CompilationTimersEnabled == State::Enabled)
Timer.emplace(name, StringRef("Swift compilation"));
Timer.emplace(name, StringRef("Swift compilation"), StringRef("swift"),
StringRef("swift related timers"));
else
CompilationTimersEnabled = State::Skipped;
}

View File

@@ -438,7 +438,7 @@ int Compilation::performJobsImpl() {
}
int Result = EXIT_SUCCESS;
llvm::TimerGroup DriverTimerGroup("Driver Time Compilation");
llvm::TimerGroup DriverTimerGroup("driver", "Driver Compilation Time");
llvm::SmallDenseMap<const Job *, std::unique_ptr<llvm::Timer>, 16>
DriverTimers;
@@ -470,7 +470,7 @@ int Compilation::performJobsImpl() {
DriverTimers.insert({
BeganCmd,
std::unique_ptr<llvm::Timer>(
new llvm::Timer(OS.str(), DriverTimerGroup))
new llvm::Timer("task", OS.str(), DriverTimerGroup))
});
DriverTimers[BeganCmd]->startTimer();
}

View File

@@ -1,7 +1,7 @@
// RUN: %target-build-swift -typecheck -driver-time-compilation %s 2>&1 | %FileCheck %s
// RUN: %target-build-swift -typecheck -driver-time-compilation %s %S/../Inputs/empty.swift 2>&1 | %FileCheck -check-prefix CHECK-MULTIPLE %s
// CHECK: Driver Time Compilation
// CHECK: Driver Compilation Time
// CHECK: Total Execution Time: {{[0-9]+}}.{{[0-9]+}} seconds ({{[0-9]+}}.{{[0-9]+}} wall clock)
// CHECK: ---Wall Time---
// CHECK: --- Name ---