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

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

Issue 1186903005: Add option to compute average scavenge speed w.r.t survived objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: bump limit Created 5 years, 6 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/gc-tracer.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index 13f35a935161ac3b17d88f8c6c37127be5049ebc..033c0bbc6774f2e780ee942ed0524627b04507fd 100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -184,6 +184,7 @@ void GCTracer::Stop(GarbageCollector collector) {
current_.end_object_size = heap_->SizeOfObjects();
current_.end_memory_size = heap_->isolate()->memory_allocator()->Size();
current_.end_holes_size = CountTotalHolesSize(heap_);
+ current_.survived_new_space_object_size = heap_->SurvivedNewSpaceObjectSize();
AddAllocation(current_.end_time);
@@ -566,12 +567,14 @@ intptr_t GCTracer::IncrementalMarkingSpeedInBytesPerMillisecond() const {
}
-intptr_t GCTracer::ScavengeSpeedInBytesPerMillisecond() const {
+intptr_t GCTracer::ScavengeSpeedInBytesPerMillisecond(
+ ScavengeSpeedMode mode) const {
intptr_t bytes = 0;
double durations = 0.0;
EventBuffer::const_iterator iter = scavenger_events_.begin();
while (iter != scavenger_events_.end()) {
- bytes += iter->new_space_object_size;
+ bytes += mode == kForAllObjects ? iter->new_space_object_size
+ : iter->survived_new_space_object_size;
durations += iter->end_time - iter->start_time;
++iter;
}
« no previous file with comments | « src/heap/gc-tracer.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698