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

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: Created 8 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/global-handles.h ('k') | src/heap.h » ('j') | src/heap.h » ('J')
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 f5850da04d5b940e46cba8e171bff52e3afeefd3..68eb5785d9f248ee0b94e99410d3d108384d61af 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -552,7 +552,7 @@ void GlobalHandles::IterateNewSpaceWeakIndependentRoots(ObjectVisitor* v) {
bool GlobalHandles::PostGarbageCollectionProcessing(
- GarbageCollector collector) {
+ GarbageCollector collector, GCTracer* tracer) {
Michael Starzinger 2012/11/16 13:45:51 I am kind of hesitant to let the GCTracer "escape"
haraken 2012/11/19 07:45:43 I think yes. What I am interested in is how many g
// Process weak global handle callbacks. This must be done after the
// GC is completely done, because the callbacks may invoke arbitrary
// API functions.
@@ -602,10 +602,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_copied_nodes_in_new_space();
+ } else {
+ node->set_in_new_space_list(false);
+ tracer->increment_promoted_nodes();
+ }
} else {
node->set_in_new_space_list(false);
+ tracer->increment_died_nodes_in_new_space();
}
}
new_space_nodes_.Rewind(last);
« no previous file with comments | « src/global-handles.h ('k') | src/heap.h » ('j') | src/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698