aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/Timer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back my last two commits, valgrind complains.Benjamin Kramer2010-08-071-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110518 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill rarely used std::sort.Benjamin Kramer2010-08-071-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110516 91177308-0d34-0410-b5e6-96231b3b80d8
* Give NamedRegionTimer an Enabled flag, allowing all its clients toDan Gohman2010-06-181-4/+6
| | | | | | | | | | | | | | | | | | | | | switch from this: if (TimePassesIsEnabled) { NamedRegionTimer T(Name, GroupName); do_something(); } else { do_something(); // duplicate the code, this time without a timer! } to this: { NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled); do_something(); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106285 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment explaining why this code uses Append mode.Dan Gohman2010-05-191-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104095 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of namespace polution.Dan Gohman2010-04-151-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101376 91177308-0d34-0410-b5e6-96231b3b80d8
* stringref'ize Timer apisChris Lattner2010-03-301-16/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99877 91177308-0d34-0410-b5e6-96231b3b80d8
* finally, maintain a global list of timer groups, allowing us to Chris Lattner2010-03-301-0/+30
| | | | | | | | implement TimerGroup::printAll, which prints and resets all active timers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99876 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new TimerGroup::print method, and refactor away the bogusChris Lattner2010-03-301-31/+52
| | | | | | | TimerGroup copy ctor and assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99875 91177308-0d34-0410-b5e6-96231b3b80d8
* rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile andChris Lattner2010-03-301-12/+9
| | | | | | | 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-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99873 91177308-0d34-0410-b5e6-96231b3b80d8
* change TimerGroup to keep a linked list of active timers Chris Lattner2010-03-301-55/+67
| | | | | | | | | instead of just a count of them, and refactor the guts of report printing out of removeTimer into its own method. Refactor addTimerToPrint away. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99872 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply my timer rewrite with a change for PassManager to store Chris Lattner2010-03-301-139/+85
| | | | | | | timers by pointer instead of by-value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99871 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r99862 which is causing FNT failures.Chris Lattner2010-03-301-85/+139
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99870 91177308-0d34-0410-b5e6-96231b3b80d8
* fairly major rewrite of various timing related stuff.Chris Lattner2010-03-301-139/+85
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99862 91177308-0d34-0410-b5e6-96231b3b80d8
* move a function into a more logical place in the fileChris Lattner2010-03-291-22/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99842 91177308-0d34-0410-b5e6-96231b3b80d8
* remove support for per-time peak memory tracking, thisChris Lattner2010-03-291-29/+4
| | | | | | | | isn't used by anyone and is better exposed as a non-per-timer thing. Also, stop including System/Mutex.h in Timer.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99841 91177308-0d34-0410-b5e6-96231b3b80d8
* various timer fixes: move operator= out of line,Chris Lattner2010-03-291-13/+20
| | | | | | | | | | eliminate the per-timer lock (timers should be externally locked if needed), the info-output-stream can never be dbgs(), so drop the check. Make some stuff private. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99839 91177308-0d34-0410-b5e6-96231b3b80d8
* s/.../.Chris Lattner2010-03-291-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99834 91177308-0d34-0410-b5e6-96231b3b80d8
* move code around and improve indentation, no functionality change.Chris Lattner2010-03-291-126/+124
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99831 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@92645 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a race condition in the Timer class.Owen Anderson2009-11-171-38/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89056 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2009-11-071-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86347 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some uses of llvm/Support/Streams.hChris Lattner2009-08-231-50/+28
| | | | 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-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
* Make timers threadsafe again. This isn't quite as nice as I'd hoped (it ↵Owen Anderson2009-06-231-1/+53
| | | | | | | | | | | uses locking rather than atomic arithmetic), but should work on all the platforms we care about. I might revisit this if a totally awesome way to do it occurs to me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74002 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my last series of commits related to Timer and 64-bit atomics. Not ↵Owen Anderson2009-06-231-19/+19
| | | | | | | | | all the targets we care about are capable of supporting it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
* Switched size_t to int64_t to prevent type mismatch in call to max.Lang Hames2009-06-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73988 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually, these need to be signed integers, not unsigned.Owen Anderson2009-06-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73978 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 64-bit integer counters for tracking time, rather than doubles. This ↵Owen Anderson2009-06-231-17/+17
| | | | | | will be more atomic op friendly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73974 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the lazy initialization of DefaultTimerGroup threadsafe.Owen Anderson2009-06-231-8/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73963 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r73923, which broke clang.Owen Anderson2009-06-231-18/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73957 91177308-0d34-0410-b5e6-96231b3b80d8
* Add guards around timer groups, which can be shared.Owen Anderson2009-06-221-10/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73923 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 53476 and 53480, with a fix so that it properly updatesDan Gohman2008-07-141-2/+34
| | | | | | | | the BB member to the current basic block after emitting instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53567 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.Evan Cheng2008-07-121-34/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53502 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for putting NamedRegionTimers in TimerGroups, andDan Gohman2008-07-111-2/+34
| | | | | | | | | use a timer group for the timers in SelectionDAGISel. Also, Split scheduling out from emitting, to give each their own timer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53476 91177308-0d34-0410-b5e6-96231b3b80d8
* Use find instead of lower_bound.Dan Gohman2008-07-111-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53474 91177308-0d34-0410-b5e6-96231b3b80d8
* Append to the ActiveTimers std::vector before looking at the timer insteadDan Gohman2008-06-241-1/+1
| | | | | | | | | of after, so that any reallocation it does doesn't get counted for the pass being timed. This probably doesn't account for a timing discrepancy I was looking into, but I'm fixing it anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52693 91177308-0d34-0410-b5e6-96231b3b80d8
* Make these variables static.Dan Gohman2008-04-231-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50196 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
* Removed more <iostream> includesBill Wendling2006-12-071-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32321 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-1/+1
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more static dtor issuesChris Lattner2006-10-041-15/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30725 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* Timers SHOULD NOT record the time taken to count the bytes allocated in the ↵Chris Lattner2005-03-221-2/+2
| | | | | | heap! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20765 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print a 'Total Execution Time' line for the 'Miscellaneous UngroupedChris Lattner2005-02-091-6/+14
| | | | | | | | Timers' section. Since these are random timers in the program it doesn't make sense to sum them up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20090 91177308-0d34-0410-b5e6-96231b3b80d8
* Memory used is a delta between memuse at the start of the time and theChris Lattner2005-01-291-3/+2
| | | | | | | memuse at the end, thus it is signed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19904 91177308-0d34-0410-b5e6-96231b3b80d8
* Use size_t instead of long to represent memory usage. long is 32 bitsJeff Cohen2005-01-081-5/+5
| | | | | | | on 64-bit Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19393 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a VS warning.Chris Lattner2005-01-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19377 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that made the nightly tester *really* slow. During changes forReid Spencer2004-12-271-3/+9
| | | | | | | | | | | portability, the --track-space option was inadvertently ignored. This patch fixes that so that sys::Process::GetMallocUsage() is only invoked if the --track-spaces option is given. Apparently the mallinfo() call that GetMallocUsage() uses is *very* slow, especially when processing very large modules like projects/llvm-test/MultiSource/Applications/kimwitu++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19163 91177308-0d34-0410-b5e6-96231b3b80d8