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

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

Issue 1410633005: [heap] Base number of compaction tasks on live memory and compaction speed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « no previous file | src/heap/gc-tracer.cc » ('j') | src/heap/mark-compact.cc » ('J')
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 1fad040d91e1cc686bcecd37ee0b2fbe8ebb4db2..d9671d49a80d207d7944cbfd324c4193ea554557 100644
--- a/src/heap/gc-tracer.h
+++ b/src/heap/gc-tracer.h
@@ -178,6 +178,18 @@ class GCTracer {
};
+ class CompactionEvent {
+ public:
+ CompactionEvent() : duration(0), live_bytes_compacted(0) {}
+
+ CompactionEvent(double duration, intptr_t live_bytes_compacted)
+ : duration(duration), live_bytes_compacted(live_bytes_compacted) {}
+
+ double duration;
+ intptr_t live_bytes_compacted;
+ };
+
+
class ContextDisposalEvent {
public:
// Default constructor leaves the event uninitialized.
@@ -314,6 +326,8 @@ class GCTracer {
typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize>
ContextDisposalEventBuffer;
+ typedef RingBuffer<CompactionEvent, kRingBufferMaxSize> CompactionEventBuffer;
+
typedef RingBuffer<SurvivalEvent, kRingBufferMaxSize> SurvivalEventBuffer;
static const int kThroughputTimeFrameMs = 5000;
@@ -336,6 +350,8 @@ class GCTracer {
void AddContextDisposalTime(double time);
+ void AddCompactionEvent(double duration, intptr_t live_bytes_compacted);
+
void AddSurvivalRatio(double survival_ratio);
// Log an incremental marking step.
@@ -406,6 +422,8 @@ class GCTracer {
intptr_t ScavengeSpeedInBytesPerMillisecond(
ScavengeSpeedMode mode = kForAllObjects) const;
+ intptr_t CompactionSpeedInBytesPerMillisecond() const;
Hannes Payer (out of office) 2015/11/03 04:08:17 Add comment, like others.
Michael Lippautz 2015/11/03 20:57:42 Done.
+
// Compute the average mark-sweep speed in bytes/millisecond.
// Returns 0 if no events have been recorded.
intptr_t MarkCompactSpeedInBytesPerMillisecond() const;
@@ -520,6 +538,8 @@ class GCTracer {
// RingBuffer for context disposal events.
ContextDisposalEventBuffer context_disposal_events_;
+ CompactionEventBuffer compaction_events_;
Hannes Payer (out of office) 2015/11/03 04:08:17 Comment.
Michael Lippautz 2015/11/03 20:57:42 Done.
+
// RingBuffer for survival events.
SurvivalEventBuffer survival_events_;
« no previous file with comments | « no previous file | src/heap/gc-tracer.cc » ('j') | src/heap/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698