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

Unified Diff: src/incremental-marking.cc

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 | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index ef7dbe05ffa673841c76e4237338f8f2e81990a0..97332c5174323781bcce8ecf44c5933752f664bb 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -754,18 +754,24 @@ void IncrementalMarking::ProcessMarkingDeque() {
void IncrementalMarking::Hurry() {
if (state() == MARKING) {
double start = 0.0;
- if (FLAG_trace_incremental_marking) {
- PrintF("[IncrementalMarking] Hurry\n");
+ if (FLAG_trace_incremental_marking || FLAG_print_cumulative_gc_stat) {
start = OS::TimeCurrentMillis();
+ if (FLAG_trace_incremental_marking) {
+ PrintF("[IncrementalMarking] Hurry\n");
+ }
}
// TODO(gc) hurry can mark objects it encounters black as mutator
// was stopped.
ProcessMarkingDeque();
state_ = COMPLETE;
- if (FLAG_trace_incremental_marking) {
+ if (FLAG_trace_incremental_marking || FLAG_print_cumulative_gc_stat) {
double end = OS::TimeCurrentMillis();
- PrintF("[IncrementalMarking] Complete (hurry), spent %d ms.\n",
- static_cast<int>(end - start));
+ double delta = end - start;
+ heap_->AddMarkingTime(delta);
+ if (FLAG_trace_incremental_marking) {
+ PrintF("[IncrementalMarking] Complete (hurry), spent %d ms.\n",
+ static_cast<int>(delta));
+ }
}
}
@@ -889,7 +895,8 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
double start = 0;
- if (FLAG_trace_incremental_marking || FLAG_trace_gc) {
+ if (FLAG_trace_incremental_marking || FLAG_trace_gc ||
+ FLAG_print_cumulative_gc_stat) {
start = OS::TimeCurrentMillis();
}
@@ -969,12 +976,14 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,
}
}
- if (FLAG_trace_incremental_marking || FLAG_trace_gc) {
+ if (FLAG_trace_incremental_marking || FLAG_trace_gc ||
+ FLAG_print_cumulative_gc_stat) {
double end = OS::TimeCurrentMillis();
double delta = (end - start);
longest_step_ = Max(longest_step_, delta);
steps_took_ += delta;
steps_took_since_last_gc_ += delta;
+ heap_->AddMarkingTime(delta);
}
}
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698