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

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 2189643004: Fix performance regression of heap snapshot generator that was (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 4 years, 5 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/profiler/heap-snapshot-generator.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-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index a085e9e79e2fdcfae6915dec9fd96aeef589bcd0..fc8640829f48cc27f713524fbd1e6a3ab2bff7cf 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -493,6 +493,16 @@ void CheckSimdSnapshot(const char* program, const char* var_name) {
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
CompileRun(program);
+ // The TakeHeapSnapshot function does not do enough GCs to ensure
+ // that all garbage is collected. We perform addition GC here
+ // to reclaim a floating AllocationSite and to fix the following failure:
+ // # Check failed: ValidateSnapshot(snapshot).
+ // Stdout:
+ // 28 @ 13523 entry with no retainer: /hidden/ system / AllocationSite
+ // 44 @ 767 $map: /hidden/ system / Map
+ // 44 @ 59 $map: /hidden/ system / Map
+ CcTest::heap()->CollectAllGarbage();
+
const v8::HeapSnapshot* snapshot = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698