mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-06 14:57:41 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52693 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4a103e6d7e
commit
153d28a414
@ -132,13 +132,13 @@ static ManagedStatic<std::vector<Timer*> > ActiveTimers;
|
||||
|
||||
void Timer::startTimer() {
|
||||
Started = true;
|
||||
ActiveTimers->push_back(this);
|
||||
TimeRecord TR = getTimeRecord(true);
|
||||
Elapsed -= TR.Elapsed;
|
||||
UserTime -= TR.UserTime;
|
||||
SystemTime -= TR.SystemTime;
|
||||
MemUsed -= TR.MemUsed;
|
||||
PeakMemBase = TR.MemUsed;
|
||||
ActiveTimers->push_back(this);
|
||||
}
|
||||
|
||||
void Timer::stopTimer() {
|
||||
|
Loading…
Reference in New Issue
Block a user