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

Unified Diff: src/heap/gc-tracer.h

Issue 765743002: Re-land: Distinguish beween final incremental mark-compact and full mark-compact event in IdleNotif… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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/gc-idle-time-handler.cc ('k') | src/heap/gc-tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/gc-tracer.h
diff --git a/src/heap/gc-tracer.h b/src/heap/gc-tracer.h
index 3ea1d72bf2c29a3f063cb76ac506f9e4f2ca29e4..fb229f47e6b22190d9778549274e9d0bae99e2d7 100644
--- a/src/heap/gc-tracer.h
+++ b/src/heap/gc-tracer.h
@@ -160,7 +160,12 @@ class GCTracer {
class Event {
public:
- enum Type { SCAVENGER = 0, MARK_COMPACTOR = 1, START = 2 };
+ enum Type {
+ SCAVENGER = 0,
+ MARK_COMPACTOR = 1,
+ INCREMENTAL_MARK_COMPACTOR = 2,
+ START = 3
+ };
// Default constructor leaves the event uninitialized.
Event() {}
@@ -211,7 +216,8 @@ class GCTracer {
// Incremental marking steps since
// - last event for SCAVENGER events
- // - last MARK_COMPACTOR event for MARK_COMPACTOR events
+ // - last INCREMENTAL_MARK_COMPACTOR event for INCREMENTAL_MARK_COMPACTOR
+ // events
int incremental_marking_steps;
// Bytes marked since creation of tracer (value at start of event).
@@ -219,7 +225,8 @@ class GCTracer {
// Bytes marked since
// - last event for SCAVENGER events
- // - last MARK_COMPACTOR event for MARK_COMPACTOR events
+ // - last INCREMENTAL_MARK_COMPACTOR event for INCREMENTAL_MARK_COMPACTOR
+ // events
intptr_t incremental_marking_bytes;
// Cumulative duration of incremental marking steps since creation of
@@ -228,7 +235,8 @@ class GCTracer {
// Duration of incremental marking steps since
// - last event for SCAVENGER events
- // - last MARK_COMPACTOR event for MARK_COMPACTOR events
+ // - last INCREMENTAL_MARK_COMPACTOR event for INCREMENTAL_MARK_COMPACTOR
+ // events
double incremental_marking_duration;
// Cumulative pure duration of incremental marking steps since creation of
@@ -237,7 +245,8 @@ class GCTracer {
// Duration of pure incremental marking steps since
// - last event for SCAVENGER events
- // - last MARK_COMPACTOR event for MARK_COMPACTOR events
+ // - last INCREMENTAL_MARK_COMPACTOR event for INCREMENTAL_MARK_COMPACTOR
+ // events
double pure_incremental_marking_duration;
// Longest incremental marking step since start of marking.
@@ -316,6 +325,12 @@ class GCTracer {
return MaxDuration(mark_compactor_events_);
}
+ // Compute the mean duration of the last incremental mark compactor
+ // events. Returns 0 if no events have been recorded.
+ double MeanIncrementalMarkCompactorDuration() const {
+ return MeanDuration(incremental_mark_compactor_events_);
+ }
+
// Compute the mean step duration of the last incremental marking round.
// Returns 0 if no incremental marking round has been completed.
double MeanIncrementalMarkingDuration() const;
@@ -332,10 +347,15 @@ class GCTracer {
// Returns 0 if no events have been recorded.
intptr_t ScavengeSpeedInBytesPerMillisecond() const;
- // Compute the max mark-sweep speed in bytes/millisecond.
+ // Compute the average mark-sweep speed in bytes/millisecond.
// Returns 0 if no events have been recorded.
intptr_t MarkCompactSpeedInBytesPerMillisecond() const;
+ // Compute the average incremental mark-sweep finalize speed in
+ // bytes/millisecond.
+ // Returns 0 if no events have been recorded.
+ intptr_t FinalIncrementalMarkCompactSpeedInBytesPerMillisecond() const;
+
// Allocation throughput in the new space in bytes/millisecond.
// Returns 0 if no events have been recorded.
intptr_t NewSpaceAllocationThroughputInBytesPerMillisecond() const;
@@ -361,6 +381,16 @@ class GCTracer {
// Compute the max duration of the events in the given ring buffer.
double MaxDuration(const EventBuffer& events) const;
+ void ClearMarkCompactStatistics() {
+ cumulative_incremental_marking_steps_ = 0;
+ cumulative_incremental_marking_bytes_ = 0;
+ cumulative_incremental_marking_duration_ = 0;
+ cumulative_pure_incremental_marking_duration_ = 0;
+ longest_incremental_marking_step_ = 0;
+ cumulative_marking_duration_ = 0;
+ cumulative_sweeping_duration_ = 0;
+ }
+
// Pointer to the heap that owns this tracer.
Heap* heap_;
@@ -371,8 +401,8 @@ class GCTracer {
// Previous tracer event.
Event previous_;
- // Previous MARK_COMPACTOR event.
- Event previous_mark_compactor_event_;
+ // Previous INCREMENTAL_MARK_COMPACTOR event.
+ Event previous_incremental_mark_compactor_event_;
// RingBuffers for SCAVENGER events.
EventBuffer scavenger_events_;
@@ -380,6 +410,9 @@ class GCTracer {
// RingBuffers for MARK_COMPACTOR events.
EventBuffer mark_compactor_events_;
+ // RingBuffers for INCREMENTAL_MARK_COMPACTOR events.
+ EventBuffer incremental_mark_compactor_events_;
+
// RingBuffer for allocation events.
AllocationEventBuffer allocation_events_;
« no previous file with comments | « src/heap/gc-idle-time-handler.cc ('k') | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698