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

Unified Diff: src/gc-tracer.h

Issue 432743002: Clean-up and repair cumulative marking and sweeping time stats. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/gc-tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gc-tracer.h
diff --git a/src/gc-tracer.h b/src/gc-tracer.h
index 0f4f135256ecc6ebd0ca0ea68ba1b68bf299108a..2f4c626cd1cbe06e418e64af03a13d1298a12a1c 100644
--- a/src/gc-tracer.h
+++ b/src/gc-tracer.h
@@ -220,6 +220,26 @@ class GCTracer BASE_EMBEDDED {
// Log an incremental marking step.
void AddIncrementalMarkingStep(double duration, intptr_t bytes);
+ // Log time spent in marking.
+ void AddMarkingTime(double duration) {
+ cumulative_marking_duration_ += duration;
+ }
+
+ // Time spent in marking.
+ double cumulative_marking_duration() const {
+ return cumulative_marking_duration_;
+ }
+
+ // Log time spent in sweeping on main thread.
+ void AddSweepingTime(double duration) {
+ cumulative_sweeping_duration_ += duration;
+ }
+
+ // Time spent in sweeping on main thread.
+ double cumulative_sweeping_duration() const {
+ return cumulative_sweeping_duration_;
+ }
+
// Compute the mean duration of the last scavenger events. Returns 0 if no
// events have been recorded.
double MeanScavengerDuration() const {
@@ -301,6 +321,19 @@ class GCTracer BASE_EMBEDDED {
// Longest incremental marking step since start of marking.
double longest_incremental_marking_step_;
+ // Total marking time.
+ // This timer is precise when run with --print-cumulative-gc-stat
+ double cumulative_marking_duration_;
+
+ // Total sweeping time on the main thread.
+ // This timer is precise when run with --print-cumulative-gc-stat
+ // TODO(hpayer): Account for sweeping time on sweeper threads. Add a
+ // different field for that.
+ // TODO(hpayer): This timer right now just holds the sweeping time
+ // of the initial atomic sweeping pause. Make sure that it accumulates
+ // all sweeping operations performed on the main thread.
+ double cumulative_sweeping_duration_;
+
DISALLOW_COPY_AND_ASSIGN(GCTracer);
};
}
« no previous file with comments | « no previous file | src/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698