1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

88 Commits

Author SHA1 Message Date
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Benjamin Kramer
a7febd985f Roll back my last two commits, valgrind complains.
llvm-svn: 110518
2010-08-07 13:27:41 +00:00
Benjamin Kramer
70df356537 Kill rarely used std::sort.
llvm-svn: 110516
2010-08-07 12:37:00 +00:00
Dan Gohman
6c6e9a45ff Give NamedRegionTimer an Enabled flag, allowing all its clients to
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();
  }

llvm-svn: 106285
2010-06-18 15:56:31 +00:00
Dan Gohman
434b54846d Add a comment explaining why this code uses Append mode.
llvm-svn: 104095
2010-05-19 01:21:34 +00:00
Dan Gohman
d48633d340 Fix a bunch of namespace polution.
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Chris Lattner
fda28ada89 stringref'ize Timer apis
llvm-svn: 99877
2010-03-30 05:34:02 +00:00
Chris Lattner
966ab1ec5e finally, maintain a global list of timer groups, allowing us to
implement TimerGroup::printAll, which prints and resets all active
timers.

llvm-svn: 99876
2010-03-30 05:27:58 +00:00
Chris Lattner
ea827a1632 add a new TimerGroup::print method, and refactor away the bogus
TimerGroup copy ctor and assignment operator.

llvm-svn: 99875
2010-03-30 05:20:02 +00:00
Chris Lattner
76a4736a55 rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile and
have it always return a new stream to simplify clients.

llvm-svn: 99874
2010-03-30 05:01:08 +00:00
Chris Lattner
3e11ba35b0 if a timergroup is destroyed before its timers, print times.
llvm-svn: 99873
2010-03-30 04:58:26 +00:00
Chris Lattner
2a254fd348 change TimerGroup to keep a linked list of active timers
instead of just a count of them, and refactor the guts of
report printing out of removeTimer into its own method.
Refactor addTimerToPrint away.

llvm-svn: 99872
2010-03-30 04:40:01 +00:00
Chris Lattner
4424043996 reapply my timer rewrite with a change for PassManager to store
timers by pointer instead of by-value.

llvm-svn: 99871
2010-03-30 04:03:22 +00:00
Chris Lattner
bbb637bacc revert r99862 which is causing FNT failures.
llvm-svn: 99870
2010-03-30 03:57:00 +00:00
Chris Lattner
65efe21d42 fairly major rewrite of various timing related stuff.
llvm-svn: 99862
2010-03-30 02:38:19 +00:00
Chris Lattner
92303f03c1 move a function into a more logical place in the file
llvm-svn: 99842
2010-03-29 21:34:06 +00:00
Chris Lattner
7e3957a646 remove support for per-time peak memory tracking, this
isn't used by anyone and is better exposed as a non-per-timer 
thing.  Also, stop including System/Mutex.h in Timer.h

llvm-svn: 99841
2010-03-29 21:28:41 +00:00
Chris Lattner
0c8d8cd921 various timer fixes: move operator= out of line,
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.

llvm-svn: 99839
2010-03-29 21:24:52 +00:00
Chris Lattner
8cb292db38 s/.../.
llvm-svn: 99834
2010-03-29 20:40:19 +00:00
Chris Lattner
54f827b072 move code around and improve indentation, no functionality change.
llvm-svn: 99831
2010-03-29 20:35:01 +00:00
David Greene
748f4ea3c4 Change errs() to dbgs().
llvm-svn: 92645
2010-01-05 01:28:58 +00:00
Owen Anderson
b319694f75 Fix a race condition in the Timer class.
llvm-svn: 89056
2009-11-17 07:06:10 +00:00
Mikhail Glushenkov
9c1ea77f8c Trailing whitespace.
llvm-svn: 86347
2009-11-07 06:33:12 +00:00
Chris Lattner
e22a1d941e remove some uses of llvm/Support/Streams.h
llvm-svn: 79842
2009-08-23 08:43:55 +00:00
Owen Anderson
75f0f1cc6c Have scoped mutexes take referenes instead of pointers.
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Owen Anderson
226e1d8bda Make timers threadsafe again. This isn't quite as nice as I'd hoped (it 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.

llvm-svn: 74002
2009-06-23 20:52:29 +00:00
Owen Anderson
c11dfb46c1 Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
we care about are capable of supporting it.

llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Lang Hames
7640e42869 Switched size_t to int64_t to prevent type mismatch in call to max.
llvm-svn: 73988
2009-06-23 19:49:23 +00:00
Owen Anderson
27a85303fe Actually, these need to be signed integers, not unsigned.
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Owen Anderson
7b3570b242 Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
llvm-svn: 73974
2009-06-23 18:12:30 +00:00
Owen Anderson
24a1453189 Make the lazy initialization of DefaultTimerGroup threadsafe.
llvm-svn: 73963
2009-06-23 17:33:37 +00:00
Owen Anderson
0cab9cae36 Revert r73923, which broke clang.
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Owen Anderson
f00516f54d Add guards around timer groups, which can be shared.
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Dan Gohman
e76fd33ee5 Reapply 53476 and 53480, with a fix so that it properly updates
the BB member to the current basic block after emitting
instructions.

llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Evan Cheng
ebf7ff4531 Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
6ee2195ab1 Add support for putting NamedRegionTimers in TimerGroups, and
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.

llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Dan Gohman
d1342570f2 Use find instead of lower_bound.
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Dan Gohman
a08868acb3 Append to the ActiveTimers std::vector before looking at the timer instead
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.

llvm-svn: 52693
2008-06-24 22:07:07 +00:00
Dan Gohman
6054efc488 Make these variables static.
llvm-svn: 50196
2008-04-23 23:15:23 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Bill Wendling
4d1444725b Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Chris Lattner
a531ce882e Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Chris Lattner
d55928d5f6 Fix more static dtor issues
llvm-svn: 30725
2006-10-04 21:52:35 +00:00
Misha Brukman
933cdaf254 Remove trailing whitespace
llvm-svn: 21422
2005-04-21 22:55:34 +00:00
Chris Lattner
b847572d0e Timers SHOULD NOT record the time taken to count the bytes allocated in the heap!
llvm-svn: 20765
2005-03-22 03:20:38 +00:00
Chris Lattner
f1a9655358 Don't print a 'Total Execution Time' line for the 'Miscellaneous Ungrouped
Timers' section.  Since these are random timers in the program it doesn't
make sense to sum them up.

llvm-svn: 20090
2005-02-09 18:41:32 +00:00
Chris Lattner
3b3e7f7cc2 Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed.

llvm-svn: 19904
2005-01-29 05:21:16 +00:00
Jeff Cohen
aef3f70921 Use size_t instead of long to represent memory usage. long is 32 bits
on 64-bit Windows.

llvm-svn: 19393
2005-01-08 20:15:57 +00:00
Chris Lattner
e4d415db9d Silence a VS warning.
llvm-svn: 19377
2005-01-08 19:31:31 +00:00
Reid Spencer
298690bde2 Fix a bug that made the nightly tester *really* slow. During changes for
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++.

llvm-svn: 19163
2004-12-27 08:03:04 +00:00