Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: src/IceTimerTree.cpp

Issue 652633002: Subzero: Improve performance of liveness analysis and live range construction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove TODO Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTimerTree.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTimerTree.cpp
diff --git a/src/IceTimerTree.cpp b/src/IceTimerTree.cpp
index 618f37f931458fd72df4672bb3f12c79b78dae9e..cfe3ca5cbaf358a78bf0deea5496c55d72300610 100644
--- a/src/IceTimerTree.cpp
+++ b/src/IceTimerTree.cpp
@@ -81,7 +81,6 @@ void TimerStack::update() {
// elements and to the flat element for the top of the stack.
double Current = timestamp();
double Delta = Current - LastTimestamp;
- LastTimestamp = Current;
if (StackTop) {
TimerIdT Leaf = Nodes[StackTop].Interior;
if (Leaf >= LeafTimes.size())
@@ -95,6 +94,11 @@ void TimerStack::update() {
assert(Next < Prefix);
Prefix = Next;
}
+ // Capture the next timestamp *after* the updates are finished.
+ // This minimizes how much the timer can perturb the reported
+ // timing. The numbers may not sum to 100%, and the missing amount
+ // is indicative of the overhead of timing.
+ LastTimestamp = timestamp();
}
void TimerStack::reset() {
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | src/IceTimerTree.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698