From: Chris Lattner Date: Tue, 22 Mar 2005 03:20:38 +0000 (+0000) Subject: Timers SHOULD NOT record the time taken to count the bytes allocated in the heap! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fed1b27d323001682e7cb1bd66bb5d603cabb9f8;p=oota-llvm.git Timers SHOULD NOT record the time taken to count the bytes allocated in the heap! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20765 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index 382825a2a4e..be58238f8b0 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -112,11 +112,11 @@ static TimeRecord getTimeRecord(bool Start) { ssize_t MemUsed = 0; if (Start) { - sys::Process::GetTimeUsage(now,user,sys); MemUsed = getMemUsage(); + sys::Process::GetTimeUsage(now,user,sys); } else { - MemUsed = getMemUsage(); sys::Process::GetTimeUsage(now,user,sys); + MemUsed = getMemUsage(); } Result.Elapsed = now.seconds() + now.microseconds() / 1000000.0;