summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGraydon Hoare <ghoare@apple.com>2017-04-03 18:04:15 +0000
committerGraydon Hoare <ghoare@apple.com>2017-04-03 18:04:15 +0000
commit3875cfafa17d6ff5cf0f048c18b3c0da4d363ab5 (patch)
treecb87f4c4258f9ee5d865515967c8abb4cf942c28
parentf5af7783897b3d350df8d06f722c8dbf32075d38 (diff)
downloadbcm5719-llvm-3875cfafa17d6ff5cf0f048c18b3c0da4d363ab5.tar.gz
bcm5719-llvm-3875cfafa17d6ff5cf0f048c18b3c0da4d363ab5.zip
[Support] Make printAllJSONValues public, for custom output.
Summary: This changes the static method TimerGroup::printAllJSONValues from private to public, to match the static method TimerGroup::printAll. When trying to drive the reporting machinery by hand, the existing API is _almost_ flexible enough, but this entrypoint is required to intermix printing timers with other non-timer output. The underlying motive here is a Swift change to consolidate the collection of timers, LLVM statistics and other (non-assert-dependent) counters into JSON files, which requires a bit of manual intervention in LLVM's stat and timer output routines. See https://github.com/apple/swift/pull/8477 for details. Reviewers: MatzeB Reviewed By: MatzeB Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31566 llvm-svn: 299371
-rw-r--r--llvm/include/llvm/Support/Timer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/Timer.h b/llvm/include/llvm/Support/Timer.h
index 80e8f13dccf..198855ae037 100644
--- a/llvm/include/llvm/Support/Timer.h
+++ b/llvm/include/llvm/Support/Timer.h
@@ -207,6 +207,9 @@ public:
/// This static method prints all timers and clears them all out.
static void printAll(raw_ostream &OS);
+ /// Prints all timers as JSON key/value pairs, and clears them all out.
+ static const char *printAllJSONValues(raw_ostream &OS, const char *delim);
+
/// Ensure global timer group lists are initialized. This function is mostly
/// used by the Statistic code to influence the construction and destruction
/// order of the global timer lists.
@@ -221,7 +224,6 @@ private:
void printJSONValue(raw_ostream &OS, const PrintRecord &R,
const char *suffix, double Value);
const char *printJSONValues(raw_ostream &OS, const char *delim);
- static const char *printAllJSONValues(raw_ostream &OS, const char *delim);
};
} // end namespace llvm
OpenPOWER on IntegriCloud