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

Unified Diff: src/heap.h

Issue 11595006: Precisely measure duration of mark and sweep phases. Changed print_cumulative_gc_stat flag to only … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 068c44e713f5569515606e2b582caee994ea17f1..eb17c78651a9ee0f6fb66b27fa9ccf38185c288f 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1578,6 +1578,24 @@ class Heap {
// Returns minimal interval between two subsequent collections.
int get_min_in_mutator() { return min_in_mutator_; }
+ // TODO(hpayer): remove, should be handled by GCTracer
+ void AddMarkingTime(double marking_time) {
+ marking_time_ += marking_time;
+ }
+
+ double marking_time() const {
+ return marking_time_;
+ }
+
+ // TODO(hpayer): remove, should be handled by GCTracer
+ void AddSweepingTime(double sweeping_time) {
+ sweeping_time_ += sweeping_time;
+ }
+
+ double sweeping_time() const {
+ return sweeping_time_;
+ }
+
MarkCompactCollector* mark_compact_collector() {
return &mark_compact_collector_;
}
@@ -2022,7 +2040,6 @@ class Heap {
GCTracer* tracer_;
-
// Allocates a small number to string cache.
MUST_USE_RESULT MaybeObject* AllocateInitialNumberStringCache();
// Creates and installs the full-sized number string cache.
@@ -2160,6 +2177,12 @@ class Heap {
double last_gc_end_timestamp_;
+ // Cumulative GC time spent in marking
+ double marking_time_;
+
+ // Cumulative GC time spent in sweeping
+ double sweeping_time_;
+
MarkCompactCollector mark_compact_collector_;
StoreBuffer store_buffer_;
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698