Commit f3033607 authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

[heap] Fix tests for single generation

Bug: v8:13322
Change-Id: I0826175aeb47c07a7b53792d4c271a095b44e322
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3915225Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83413}
parent c676a09c
...@@ -942,6 +942,10 @@ UNINITIALIZED_TEST(PromotionMarkCompactOldToShared) { ...@@ -942,6 +942,10 @@ UNINITIALIZED_TEST(PromotionMarkCompactOldToShared) {
if (!V8_CAN_CREATE_SHARED_HEAP_BOOL) return; if (!V8_CAN_CREATE_SHARED_HEAP_BOOL) return;
if (v8_flags.stress_concurrent_allocation) return; if (v8_flags.stress_concurrent_allocation) return;
if (!v8_flags.page_promotion) return; if (!v8_flags.page_promotion) return;
if (v8_flags.single_generation) {
// String allocated in old space may be "pretenured" to the shared heap.
return;
}
v8_flags.shared_string_table = true; v8_flags.shared_string_table = true;
v8_flags.manual_evacuation_candidates_selection = true; v8_flags.manual_evacuation_candidates_selection = true;
......
...@@ -553,4 +553,9 @@ ...@@ -553,4 +553,9 @@
'debugger/value-unavailable-scopes': [SKIP], 'debugger/value-unavailable-scopes': [SKIP],
}], # lite_mode or variant in (nooptimization, jitless, assert_types) }], # lite_mode or variant in (nooptimization, jitless, assert_types)
##############################################################################
['single_generation', {
'heap-profiler/sampling-heap-profiler-flags': [SKIP],
}], # single_generation
] ]
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "include/v8-function.h" #include "include/v8-function.h"
#include "src/api/api-inl.h" #include "src/api/api-inl.h"
#include "src/execution/isolate.h" #include "src/execution/isolate.h"
#include "src/flags/flags.h"
#include "src/heap/factory.h" #include "src/heap/factory.h"
#include "src/heap/heap-inl.h" #include "src/heap/heap-inl.h"
#include "src/objects/objects-inl.h" #include "src/objects/objects-inl.h"
...@@ -496,7 +497,8 @@ TEST_F(GlobalHandlesTest, GCFromWeakCallbacks) { ...@@ -496,7 +497,8 @@ TEST_F(GlobalHandlesTest, GCFromWeakCallbacks) {
if (v8_flags.single_generation) { if (v8_flags.single_generation) {
FlagAndGlobal fp; FlagAndGlobal fp;
ConstructJSApiObject(isolate, context, &fp); ConstructJSApiObject(isolate, context, &fp);
CHECK(!InYoungGeneration(isolate, fp.handle)); CHECK_IMPLIES(!v8_flags.single_generation,
!InYoungGeneration(isolate, fp.handle));
fp.flag = false; fp.flag = false;
fp.handle.SetWeak(&fp, &ForceMarkSweep1, v8::WeakCallbackType::kParameter); fp.handle.SetWeak(&fp, &ForceMarkSweep1, v8::WeakCallbackType::kParameter);
CollectAllGarbage(); CollectAllGarbage();
......
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