Commit 066ad187 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Disable concurrent marking for cctest that rely on manual GC.

BUG=chromium:694255

Change-Id: Ibfffc68a513511866dc4eebcf0728e51feb1a7fd
Reviewed-on: https://chromium-review.googlesource.com/530746Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45855}
parent 7b3a211e
......@@ -32,6 +32,7 @@
#include "include/libplatform/libplatform.h"
#include "src/debug/debug-interface.h"
#include "src/flags.h"
#include "src/utils.h"
#include "src/v8.h"
#include "src/zone/accounting-allocator.h"
......@@ -611,4 +612,26 @@ class StaticOneByteResource : public v8::String::ExternalOneByteStringResource {
const char* data_;
};
class ManualGCScope {
public:
ManualGCScope()
: flag_concurrent_marking_(i::FLAG_concurrent_marking),
flag_concurrent_sweeping_(i::FLAG_concurrent_sweeping),
flag_stress_incremental_marking_(i::FLAG_stress_incremental_marking) {
i::FLAG_concurrent_marking = false;
i::FLAG_concurrent_sweeping = false;
i::FLAG_stress_incremental_marking = false;
}
~ManualGCScope() {
i::FLAG_concurrent_marking = flag_concurrent_marking_;
i::FLAG_concurrent_sweeping = flag_concurrent_sweeping_;
i::FLAG_stress_incremental_marking = flag_stress_incremental_marking_;
}
private:
bool flag_concurrent_marking_;
bool flag_concurrent_sweeping_;
bool flag_stress_incremental_marking_;
};
#endif // ifndef CCTEST_H_
......@@ -114,6 +114,7 @@ TEST(ArrayBuffer_ScavengeAndMC) {
}
TEST(ArrayBuffer_Compaction) {
if (!FLAG_never_compact) return;
FLAG_concurrent_marking = false;
FLAG_stress_incremental_marking = false;
FLAG_manual_evacuation_candidates_selection = true;
......
......@@ -4648,6 +4648,7 @@ void CheckIC(Handle<JSFunction> function, Code::Kind kind, int slot_index,
TEST(MonomorphicStaysMonomorphicAfterGC) {
if (FLAG_always_opt) return;
ManualGCScope manual_gc_scope;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::HandleScope scope(CcTest::isolate());
......@@ -4680,6 +4681,7 @@ TEST(MonomorphicStaysMonomorphicAfterGC) {
TEST(PolymorphicStaysPolymorphicAfterGC) {
if (FLAG_always_opt) return;
ManualGCScope manual_gc_scope;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::HandleScope scope(CcTest::isolate());
......@@ -4714,6 +4716,7 @@ TEST(PolymorphicStaysPolymorphicAfterGC) {
TEST(WeakCell) {
ManualGCScope manual_gc_scope;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::internal::Factory* factory = isolate->factory();
......@@ -4748,6 +4751,7 @@ TEST(WeakCell) {
TEST(WeakCellsWithIncrementalMarking) {
if (!FLAG_incremental_marking) return;
ManualGCScope manual_gc_scope;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
......
......@@ -18425,6 +18425,7 @@ static void CreateGarbageInOldSpace() {
// Test that idle notification can be handled and eventually collects garbage.
TEST(TestIdleNotification) {
if (!i::FLAG_incremental_marking) return;
ManualGCScope manual_gc_scope;
const intptr_t MB = 1024 * 1024;
const double IdlePauseInSeconds = 1.0;
LocalContext env;
......
......@@ -124,6 +124,7 @@ static Handle<JSFunction> GetJSFunction(v8::Local<v8::Context> context,
TEST(DeoptimizeSimple) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -170,6 +171,7 @@ TEST(DeoptimizeSimple) {
TEST(DeoptimizeSimpleWithArguments) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -217,6 +219,7 @@ TEST(DeoptimizeSimpleWithArguments) {
TEST(DeoptimizeSimpleNested) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -250,6 +253,7 @@ TEST(DeoptimizeSimpleNested) {
TEST(DeoptimizeRecursive) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -287,6 +291,7 @@ TEST(DeoptimizeRecursive) {
TEST(DeoptimizeMultiple) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -323,6 +328,7 @@ TEST(DeoptimizeMultiple) {
TEST(DeoptimizeConstructor) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -376,6 +382,7 @@ TEST(DeoptimizeConstructor) {
TEST(DeoptimizeConstructorMultiple) {
ManualGCScope manual_gc_scope;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
......@@ -413,6 +420,7 @@ TEST(DeoptimizeConstructorMultiple) {
UNINITIALIZED_TEST(DeoptimizeBinaryOperationADDString) {
ManualGCScope manual_gc_scope;
i::FLAG_concurrent_recompilation = false;
AllowNativesSyntaxNoInlining options;
v8::Isolate::CreateParams create_params;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment