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

Unified Diff: src/global-handles.cc

Issue 11365146: Add GCTracer metrics for a scavenger GC for DOM wrappers (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Comments addressed Created 8 years 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/global-handles.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 085f1d4cc2d7c5e2809b03ec67d2c55948aee84e..392a1810bef62c46ec5a999682d89951e362c677 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -597,7 +597,7 @@ bool GlobalHandles::IterateObjectGroups(ObjectVisitor* v,
bool GlobalHandles::PostGarbageCollectionProcessing(
- GarbageCollector collector) {
+ GarbageCollector collector, GCTracer* tracer) {
// Process weak global handle callbacks. This must be done after the
// GC is completely done, because the callbacks may invoke arbitrary
// API functions.
@@ -647,10 +647,17 @@ bool GlobalHandles::PostGarbageCollectionProcessing(
for (int i = 0; i < new_space_nodes_.length(); ++i) {
Node* node = new_space_nodes_[i];
ASSERT(node->is_in_new_space_list());
- if (node->IsRetainer() && isolate_->heap()->InNewSpace(node->object())) {
- new_space_nodes_[last++] = node;
+ if (node->IsRetainer()) {
+ if (isolate_->heap()->InNewSpace(node->object())) {
+ new_space_nodes_[last++] = node;
+ tracer->increment_nodes_copied_in_new_space();
+ } else {
+ node->set_in_new_space_list(false);
+ tracer->increment_nodes_promoted();
+ }
} else {
node->set_in_new_space_list(false);
+ tracer->increment_nodes_died_in_new_space();
}
}
new_space_nodes_.Rewind(last);
« no previous file with comments | « src/global-handles.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698