Commit 5f9f09f4 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[sparkplug] Enable shorter builtin calls behind --short-builtin-calls

... on desktop x64 and arm64 if pointer compression is enabled.

Bug: v8:11527
Change-Id: Ie23b59312c6db34a5f40e23347b3c4f11173612d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767222
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73498}
parent 28cd97b8
...@@ -345,10 +345,13 @@ if (v8_enable_heap_sandbox == "") { ...@@ -345,10 +345,13 @@ if (v8_enable_heap_sandbox == "") {
v8_enable_heap_sandbox = false v8_enable_heap_sandbox = false
} }
if (v8_enable_short_builtin_calls == "") { if (v8_enable_short_builtin_calls == "") {
v8_enable_short_builtin_calls =
v8_current_cpu == "x64" || (!is_android && v8_current_cpu == "arm64")
}
if (v8_enable_short_builtin_calls && !v8_enable_pointer_compression) {
# Disable short calls when pointer compression is not enabled.
v8_enable_short_builtin_calls = false v8_enable_short_builtin_calls = false
} }
assert(!v8_enable_short_builtin_calls || v8_enable_pointer_compression,
"Short builtin calls feature requires pointer compression")
if (v8_enable_single_generation == "") { if (v8_enable_single_generation == "") {
v8_enable_single_generation = v8_disable_write_barriers v8_enable_single_generation = v8_disable_write_barriers
} }
......
...@@ -106,9 +106,6 @@ STATIC_ASSERT(V8_DEFAULT_STACK_SIZE_KB* KB + ...@@ -106,9 +106,6 @@ STATIC_ASSERT(V8_DEFAULT_STACK_SIZE_KB* KB +
// and friends. // and friends.
#error Short builtin calls feature requires pointer compression #error Short builtin calls feature requires pointer compression
#endif #endif
#define V8_SHORT_BUILTIN_CALLS_BOOL true
#else
#define V8_SHORT_BUILTIN_CALLS_BOOL false
#endif #endif
// Determine whether dict mode prototypes feature is enabled. // Determine whether dict mode prototypes feature is enabled.
......
...@@ -1535,10 +1535,21 @@ DEFINE_BOOL(adjust_os_scheduling_parameters, true, ...@@ -1535,10 +1535,21 @@ DEFINE_BOOL(adjust_os_scheduling_parameters, true,
"adjust OS specific scheduling params for the isolate") "adjust OS specific scheduling params for the isolate")
DEFINE_BOOL(experimental_flush_embedded_blob_icache, false, DEFINE_BOOL(experimental_flush_embedded_blob_icache, false,
"Used in an experiment to evaluate icache flushing on certain CPUs") "Used in an experiment to evaluate icache flushing on certain CPUs")
DEFINE_BOOL_READONLY(
short_builtin_calls, V8_SHORT_BUILTIN_CALLS_BOOL, // Flags for short builtin calls feature
"Put embedded builtins code into the code range for shorter " #undef FLAG
"builtin calls/jumps") #if V8_SHORT_BUILTIN_CALLS
#define FLAG FLAG_FULL
#else
#define FLAG FLAG_READONLY
#endif
DEFINE_BOOL(short_builtin_calls, false,
"Put embedded builtins code into the code range for shorter "
"builtin calls/jumps")
#undef FLAG
#define FLAG FLAG_FULL
// runtime.cc // runtime.cc
DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times") DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times")
......
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