Skip to content

Commit 0524c7a

Browse files
Milad Farazmandcodebytere
Milad Farazmand
authored andcommitted
deps: V8: cherry-pick b5939c758924
Original commit message: Revert "s390: [arm] Add missing RELATIVE_CODE_TARGET iteration" This reverts commit 9d3cca1cd3ad7c6653cab1cdf111d356f33f77cd. Reason for revert: Only the test needs to be skipped on s390. Refer to this: https://crrev.com/c/1981505 Original change's description: > s390: [arm] Add missing RELATIVE_CODE_TARGET iteration > > Port b766299d2c382cc9817e73225bbebe29ce62b9d1 > Port 9592b043eed86db91a441d4bf78b7f0c8c2ce4dd > Port d915b8d668615a7d6d75cf7a61d3ca5a3d139799 > > Original Commit Message: > > Code object iteration was missing logic for RELATIVE_CODE_TARGET > reloc entries. Garbage collection could thus miss objects that were > referenced only as targets of pc-relative calls or jumps. > > RELATIVE_CODE_TARGETs are only used on arm, mips, and s390 and only > at mksnapshot-time. > > This exposed another issue in that the interpreter entry trampoline > copy we generate for profiling *did* contain relative calls in > runtime-accessible code. This is a problem, since code space on arm is, > by default, too large to be fully addressable through pc-relative > calls. This CL thus also disables the related > FLAG_interpreted_frames_native_stack feature on arm. > > objects. > > R=​[email protected], [email protected], [email protected], [email protected] > BUG= > LOG=N > > Change-Id: Ifbcaed98d90a2730f0d6a8a7d32c621dab1ff5b2 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2087693 > Reviewed-by: Jakob Gruber <[email protected]> > Reviewed-by: Junliang Yan <[email protected]> > Commit-Queue: Milad Farazmand <[email protected]> > Cr-Commit-Position: refs/heads/master@{#66644} [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Id645a9def23d278235ff77f25249d2187e8105ca Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2196521 Reviewed-by: Milad Farazmand <[email protected]> Reviewed-by: Jakob Gruber <[email protected]> Commit-Queue: Milad Farazmand <[email protected]> Cr-Commit-Position: refs/heads/master@{#67751} Refs: v8/v8@b5939c7 PR-URL: #33702 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 1f996b7 commit 0524c7a

File tree

6 files changed

+23
-23
lines changed

6 files changed

+23
-23
lines changed

deps/v8/src/execution/isolate.cc

+8-8
Original file line numberDiff line numberDiff line change
@@ -3431,15 +3431,15 @@ bool Isolate::Init(ReadOnlyDeserializer* read_only_deserializer,
34313431

34323432
setup_delegate_->SetupBuiltins(this);
34333433

3434-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
3434+
#ifndef V8_TARGET_ARCH_ARM
34353435
// Store the interpreter entry trampoline on the root list. It is used as a
34363436
// template for further copies that may later be created to help profile
34373437
// interpreted code.
3438-
// We currently cannot do this on above architectures due to
3439-
// RELATIVE_CODE_TARGETs assuming that all possible Code targets may be
3440-
// addressed with an int24 offset, effectively limiting code space size to
3441-
// 32MB. We can guarantee this at mksnapshot-time, but not at runtime. See
3442-
// also: https://crbug.com/v8/8713.
3438+
// We currently cannot do this on arm due to RELATIVE_CODE_TARGETs
3439+
// assuming that all possible Code targets may be addressed with an int24
3440+
// offset, effectively limiting code space size to 32MB. We can guarantee
3441+
// this at mksnapshot-time, but not at runtime.
3442+
// See also: https://crbug.com/v8/8713.
34433443
heap_.SetInterpreterEntryTrampolineForProfiling(
34443444
heap_.builtin(Builtins::kInterpreterEntryTrampoline));
34453445
#endif
@@ -3514,11 +3514,11 @@ bool Isolate::Init(ReadOnlyDeserializer* read_only_deserializer,
35143514
}
35153515
#endif // DEBUG
35163516

3517-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
3517+
#ifndef V8_TARGET_ARCH_ARM
35183518
// The IET for profiling should always be a full on-heap Code object.
35193519
DCHECK(!Code::cast(heap_.interpreter_entry_trampoline_for_profiling())
35203520
.is_off_heap_trampoline());
3521-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
3521+
#endif // V8_TARGET_ARCH_ARM
35223522

35233523
if (FLAG_print_builtin_code) builtins()->PrintBuiltinCode();
35243524
if (FLAG_print_builtin_size) builtins()->PrintBuiltinSize();

deps/v8/src/flags/flag-definitions.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,8 @@ DEFINE_BOOL(vtune_prof_annotate_wasm, false,
16251625

16261626
DEFINE_BOOL(win64_unwinding_info, true, "Enable unwinding info for Windows/x64")
16271627

1628-
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_S390X)
1629-
// Unsupported on above architectures. See https://crbug.com/v8/8713.
1628+
#ifdef V8_TARGET_ARCH_ARM
1629+
// Unsupported on arm. See https://crbug.com/v8/8713.
16301630
DEFINE_BOOL_READONLY(
16311631
interpreted_frames_native_stack, false,
16321632
"Show interpreted frames on the native stack (useful for external "

deps/v8/src/snapshot/code-serializer.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@ void CodeSerializer::SerializeObject(HeapObject obj) {
190190
// bytecode array stored within the InterpreterData, which is the important
191191
// information. On deserialization we'll create our code objects again, if
192192
// --interpreted-frames-native-stack is on. See v8:9122 for more context
193-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
193+
#ifndef V8_TARGET_ARCH_ARM
194194
if (V8_UNLIKELY(FLAG_interpreted_frames_native_stack) &&
195195
obj.IsInterpreterData()) {
196196
obj = InterpreterData::cast(obj).bytecode_array();
197197
}
198-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
198+
#endif // V8_TARGET_ARCH_ARM
199199

200200
// Past this point we should not see any (context-specific) maps anymore.
201201
CHECK(!obj.IsMap());
@@ -215,7 +215,7 @@ void CodeSerializer::SerializeGeneric(HeapObject heap_object) {
215215
serializer.Serialize();
216216
}
217217

218-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
218+
#ifndef V8_TARGET_ARCH_ARM
219219
// NOTE(mmarchini): when FLAG_interpreted_frames_native_stack is on, we want to
220220
// create duplicates of InterpreterEntryTrampoline for the deserialized
221221
// functions, otherwise we'll call the builtin IET for those functions (which
@@ -255,7 +255,7 @@ void CreateInterpreterDataForDeserializedCode(Isolate* isolate,
255255
column_num));
256256
}
257257
}
258-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
258+
#endif // V8_TARGET_ARCH_ARM
259259

260260
MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize(
261261
Isolate* isolate, ScriptData* cached_data, Handle<String> source,
@@ -301,11 +301,11 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize(
301301
isolate->is_profiling() ||
302302
isolate->code_event_dispatcher()->IsListeningToCodeEvents();
303303

304-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
304+
#ifndef V8_TARGET_ARCH_ARM
305305
if (V8_UNLIKELY(FLAG_interpreted_frames_native_stack))
306306
CreateInterpreterDataForDeserializedCode(isolate, result,
307307
log_code_creation);
308-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
308+
#endif // V8_TARGET_ARCH_ARM
309309

310310
bool needs_source_positions = isolate->NeedsSourcePositionsForProfiling();
311311

deps/v8/test/cctest/interpreter/test-interpreter.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -5029,7 +5029,7 @@ TEST(InterpreterGenerators) {
50295029
}
50305030
}
50315031

5032-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
5032+
#ifndef V8_TARGET_ARCH_ARM
50335033
TEST(InterpreterWithNativeStack) {
50345034
i::FLAG_interpreted_frames_native_stack = true;
50355035

@@ -5051,7 +5051,7 @@ TEST(InterpreterWithNativeStack) {
50515051
CHECK(code.is_interpreter_trampoline_builtin());
50525052
CHECK_NE(code.address(), interpreter_entry_trampoline->address());
50535053
}
5054-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
5054+
#endif // V8_TARGET_ARCH_ARM
50555055

50565056
TEST(InterpreterGetBytecodeHandler) {
50575057
HandleAndZoneScope handles;

deps/v8/test/cctest/test-log.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ UNINITIALIZED_TEST(LogAll) {
565565
isolate->Dispose();
566566
}
567567

568-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
568+
#ifndef V8_TARGET_ARCH_ARM
569569
UNINITIALIZED_TEST(LogInterpretedFramesNativeStack) {
570570
SETUP_FLAGS();
571571
i::FLAG_interpreted_frames_native_stack = true;
@@ -650,7 +650,7 @@ UNINITIALIZED_TEST(LogInterpretedFramesNativeStackWithSerialization) {
650650
} while (!has_cache);
651651
delete cache;
652652
}
653-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
653+
#endif // V8_TARGET_ARCH_ARM
654654

655655
UNINITIALIZED_TEST(ExternalCodeEventListener) {
656656
i::FLAG_log = false;
@@ -753,7 +753,7 @@ UNINITIALIZED_TEST(ExternalCodeEventListenerInnerFunctions) {
753753
isolate2->Dispose();
754754
}
755755

756-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
756+
#ifndef V8_TARGET_ARCH_ARM
757757
UNINITIALIZED_TEST(ExternalCodeEventListenerWithInterpretedFramesNativeStack) {
758758
i::FLAG_log = false;
759759
i::FLAG_prof = false;
@@ -803,7 +803,7 @@ UNINITIALIZED_TEST(ExternalCodeEventListenerWithInterpretedFramesNativeStack) {
803803
}
804804
isolate->Dispose();
805805
}
806-
#endif // !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_S390X
806+
#endif // V8_TARGET_ARCH_ARM
807807

808808
UNINITIALIZED_TEST(TraceMaps) {
809809
SETUP_FLAGS();

deps/v8/test/cctest/test-serialize.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ void TestCodeSerializerOnePlusOneImpl(bool verify_builtins_count = true) {
16721672
TEST(CodeSerializerOnePlusOne) { TestCodeSerializerOnePlusOneImpl(); }
16731673

16741674
// See bug v8:9122
1675-
#if !defined(V8_TARGET_ARCH_ARM) && !defined(V8_TARGET_ARCH_S390X)
1675+
#ifndef V8_TARGET_ARCH_ARM
16761676
TEST(CodeSerializerOnePlusOneWithInterpretedFramesNativeStack) {
16771677
FLAG_interpreted_frames_native_stack = true;
16781678
// We pass false because this test will create IET copies (which are

0 commit comments

Comments
 (0)