[PATCH] D44181: Support resetting STATISTIC() values using llvm::ResetStatistics()

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 16:56:21 PST 2018


dsanders created this revision.
dsanders added reviewers: qcolombet, rtereshin, bogner, aditya_nandakumar.

Most of the time, compiler statistics can be obtained using a process that
performs a single compilation and terminates such as llc. However, this isn't
always the case. JITs for example, perform multiple compilations over their
lifetime and STATISTIC() will record cumulative values across all of them.

Provide tools like this with the facilities needed to measure individual
compilations by allowing them to reset the STATISTIC() values back to zero using
llvm::ResetStatistics(). It's still the tools responsibility to ensure that they
perform compilations in such a way that the results are meaningful to their
intended use.


Repository:
  rL LLVM

https://reviews.llvm.org/D44181

Files:
  include/llvm/ADT/Statistic.h
  lib/Support/Statistic.cpp
  unittests/ADT/StatisticTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44181.137296.patch
Type: text/x-patch
Size: 7545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180307/e783928b/attachment.bin>


More information about the llvm-commits mailing list