aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Statistic.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Support: Add llvm::AreStatisticsEnabled().Daniel Dunbar2011-02-261-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126558 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* remove trailing whitespaceJim Grosbach2010-08-171-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111254 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce namespace-scope functions to enable LLVM statistics withoutDouglas Gregor2010-03-301-21/+37
| | | | | | | | | passing the command-line parameter "-stats" and to print the resulting statistics without calling llvm_shutdown(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99893 91177308-0d34-0410-b5e6-96231b3b80d8
* rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile andChris Lattner2010-03-301-6/+5
| | | | | | | have it always return a new stream to simplify clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99874 91177308-0d34-0410-b5e6-96231b3b80d8
* if a timergroup is destroyed before its timers, print times.Chris Lattner2010-03-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99873 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-051-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92642 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutexTorok Edwin2009-09-271-2/+2
| | | | | | | in RegisterStatistic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82896 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79842 91177308-0d34-0410-b5e6-96231b3b80d8
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
* Use atomic operations when accessing statistics, and make the lazy ↵Owen Anderson2009-06-231-4/+8
| | | | | | initialization of statistics actually threadsafe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74005 91177308-0d34-0410-b5e6-96231b3b80d8
* Guard the statistics table.Owen Anderson2009-06-221-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73916 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-0/+4
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak build with gcc 4.3: provide missed includes and silence most ↵Anton Korobeynikov2008-02-201-0/+1
| | | | | | annoying warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate constructor from Statistic class. It is now impossible to get aChris Lattner2006-12-191-4/+4
| | | | | | | static constructor for them :). Transition complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32710 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor statistic a big and introduce a horrible-but-necessary macroChris Lattner2006-12-191-4/+4
| | | | | | | | | (STATISTIC), which allows us to define statistics that don't introduce static ctors into the .o files. I'm migrating code over to use this incrementally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32687 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the implementation of statistic to not need destructors at all.Chris Lattner2006-12-081-61/+76
| | | | | | | | | | Instead, the stat info is printed when llvm_shutdown() is called. These also don't need static ctors, but getting rid of them is uglier: still investigating. This reduces the number of static dtors in llvm from ~1400 to ~750. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32372 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use <sstream> in Streams.h but <iosfwd> instead.Bill Wendling2006-12-071-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32340 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed more <iostream> includesBill Wendling2006-12-071-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32321 91177308-0d34-0410-b5e6-96231b3b80d8
* merge the Statistic and StatisticBase classes, eliminating virtual methodsChris Lattner2006-12-061-10/+5
| | | | | | | and eliminating #includes from the Statistic.h file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32282 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-3/+1
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Instantiate Statistic<> in one place, not in every .o file that uses it.Chris Lattner2006-08-301-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29971 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some out-of-line virtual dtors so that the class has a "home", preventingChris Lattner2006-06-211-0/+4
| | | | | | | vtables for (e.g.) Instruction from being emitted into every .o file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-011-2/+2
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass std::string to constructor as const reference to avoid multipleAlkis Evlogimenos2004-01-061-1/+1
| | | | | | | copies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10705 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2003-12-141-5/+2
| | | | | | | Make the Timer code give correct user/system/user+system times when -track-memory is enabled git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10463 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* This file uses stable_sortChris Lattner2003-08-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7831 91177308-0d34-0410-b5e6-96231b3b80d8
* Move debug functionality to Debug.cpp/Debug.hChris Lattner2003-08-011-12/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7494 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new info-output-file option (hidden from --help) which is to be used byChris Lattner2003-05-091-10/+18
| | | | | | | the testing scripts to avoid breaking diffs while still gathering stats. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6067 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -debug option from release executablesChris Lattner2003-02-091-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5521 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #includeChris Lattner2002-10-271-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4291 91177308-0d34-0410-b5e6-96231b3b80d8
* added cast to unsigned to compile with gcc3.2 (sparc)Anand Shukla2002-10-041-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4041 91177308-0d34-0410-b5e6-96231b3b80d8
* - Rework Statistics:Chris Lattner2002-10-011-6/+59
| | | | | | | | | | | | * Renamed StatisticReporter.h/cpp to Statistic.h/cpp * Broke constructor to take two const char * arguments instead of one, so that indendation can be taken care of automatically. * Sort the list by pass name when printing * Make sure to print all statistics as a group, instead of randomly when the statistics dtors are called. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3999 91177308-0d34-0410-b5e6-96231b3b80d8
* *** empty log message ***Chris Lattner2002-07-221-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a new command line option, -debug, which is meant to unify all ofChris Lattner2002-05-221-0/+3
| | | | | | | | | the random debugging macros scattered throughout llvm. The new DEBUG(x) macro should be used instead of special purpose debug macros. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2709 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of Statistic class.Chris Lattner2002-05-101-0/+31
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2598 91177308-0d34-0410-b5e6-96231b3b80d8