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

Unified Diff: test/cctest/test-mark-compact.cc

Issue 11953043: Implicit references are missing in heap profiles (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 11 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
« include/v8.h ('K') | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-mark-compact.cc
===================================================================
--- test/cctest/test-mark-compact.cc (revision 13465)
+++ test/cctest/test-mark-compact.cc (working copy)
@@ -273,13 +273,15 @@
static int gc_starts = 0;
static int gc_ends = 0;
-static void GCPrologueCallbackFunc() {
+static void GCPrologueCallbackFunc(v8::GCType type,
+ v8::GCCallbackFlags flags) {
CHECK(gc_starts == gc_ends);
gc_starts++;
}
-static void GCEpilogueCallbackFunc() {
+static void GCEpilogueCallbackFunc(v8::GCType type,
+ v8::GCCallbackFlags flags) {
CHECK(gc_starts == gc_ends + 1);
gc_ends++;
}
@@ -288,8 +290,10 @@
TEST(GCCallback) {
InitializeVM();
- HEAP->SetGlobalGCPrologueCallback(&GCPrologueCallbackFunc);
- HEAP->SetGlobalGCEpilogueCallback(&GCEpilogueCallbackFunc);
+ HEAP->AddGCPrologueCallback(&GCPrologueCallbackFunc,
+ v8::kGCTypeMarkSweepCompact);
+ HEAP->AddGCEpilogueCallback(&GCEpilogueCallbackFunc,
+ v8::kGCTypeMarkSweepCompact);
// Scavenge does not call GC callback functions.
HEAP->PerformScavenge();
« include/v8.h ('K') | « test/cctest/test-heap-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698