aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Timer.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-01-06 14:35:07 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2021-01-06 15:16:09 -0800
commitb37de2afa30fe4312aa9b87b11208bd7e05c8fa1 (patch)
treea277cbc27d8cea4ceffe7713510ad96bb4d7eb02 /llvm/lib/Support/Timer.cpp
parent080943f7525f277579a000cf30364cc96fba6773 (diff)
downloadllvm-b37de2afa30fe4312aa9b87b11208bd7e05c8fa1.zip
llvm-b37de2afa30fe4312aa9b87b11208bd7e05c8fa1.tar.gz
llvm-b37de2afa30fe4312aa9b87b11208bd7e05c8fa1.tar.bz2
[Support] Untie the llvm::Signpost interface from llvm::Timer
Make llvm::Signpost more generic by untying from llvm::Timer. This allows signposts to be used in a different context. My motivation for doing this is being able to use signposts in LLDB. Differential revision: https://reviews.llvm.org/D93655
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r--llvm/lib/Support/Timer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp
index a3b86cf..f5a512f 100644
--- a/llvm/lib/Support/Timer.cpp
+++ b/llvm/lib/Support/Timer.cpp
@@ -143,7 +143,7 @@ TimeRecord TimeRecord::getCurrentTime(bool Start) {
void Timer::startTimer() {
assert(!Running && "Cannot start a running timer");
Running = Triggered = true;
- Signposts->startTimerInterval(this);
+ Signposts->startInterval(this, getName());
StartTime = TimeRecord::getCurrentTime(true);
}
@@ -152,7 +152,7 @@ void Timer::stopTimer() {
Running = false;
Time += TimeRecord::getCurrentTime(false);
Time -= StartTime;
- Signposts->endTimerInterval(this);
+ Signposts->endInterval(this, getName());
}
void Timer::clear() {