diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2018-05-16 18:15:56 +0000 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2018-05-16 18:15:56 +0000 |
commit | d9ade38d4eda40dba34e545c47f121fc1d95e517 (patch) | |
tree | 0b8806fb1382021013bece88ffb7a5ae96ff130f /llvm/lib/Support/Timer.cpp | |
parent | ddfefc3538f6e501e8dd62441546880ce4190695 (diff) | |
download | llvm-d9ade38d4eda40dba34e545c47f121fc1d95e517.zip llvm-d9ade38d4eda40dba34e545c47f121fc1d95e517.tar.gz llvm-d9ade38d4eda40dba34e545c47f121fc1d95e517.tar.bz2 |
[Timers] TimerGroup: make printJSONValues() method public
Summary:
This is needed for the continuation of D46504,
to be able to store the timings.
Reviewers: george.karpenkov, NoQ, alexfh, sbenza
Reviewed By: alexfh
Subscribers: llvm-commits, cfe-commits
Differential Revision: https://reviews.llvm.org/D46938
llvm-svn: 332505
Diffstat (limited to 'llvm/lib/Support/Timer.cpp')
-rw-r--r-- | llvm/lib/Support/Timer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Timer.cpp b/llvm/lib/Support/Timer.cpp index 4dbc8ed..fd587fb 100644 --- a/llvm/lib/Support/Timer.cpp +++ b/llvm/lib/Support/Timer.cpp @@ -378,6 +378,8 @@ void TimerGroup::printJSONValue(raw_ostream &OS, const PrintRecord &R, } const char *TimerGroup::printJSONValues(raw_ostream &OS, const char *delim) { + sys::SmartScopedLock<true> L(*TimerLock); + prepareToPrintList(); for (const PrintRecord &R : TimersToPrint) { OS << delim; |