Commit f388f96f authored by Seth Brenith's avatar Seth Brenith Committed by V8 LUCI CQ

Enable background merging of deserialized scripts

This can save memory in cases where multiple frames in a process use the
same script, with sufficient time between loads that the script's
top-level SharedFunctionInfo is no longer present in the compilation
cache. Merging is relatively fast; it generally takes about one tenth as
long as deserialization.

Bug: v8:12808
Change-Id: I7366a51f1d2ca6a9f551cdf2bdbe0441450cf1bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868088
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82920}
parent ef998544
...@@ -475,8 +475,6 @@ DEFINE_WEAK_IMPLICATION(future, short_builtin_calls) ...@@ -475,8 +475,6 @@ DEFINE_WEAK_IMPLICATION(future, short_builtin_calls)
#endif #endif
DEFINE_WEAK_NEG_IMPLICATION(future, write_protect_code_memory) DEFINE_WEAK_NEG_IMPLICATION(future, write_protect_code_memory)
DEFINE_WEAK_NEG_IMPLICATION(future, use_map_space) DEFINE_WEAK_NEG_IMPLICATION(future, use_map_space)
DEFINE_WEAK_IMPLICATION(
future, merge_background_deserialized_script_with_compilation_cache)
DEFINE_BOOL_READONLY(dict_property_const_tracking, DEFINE_BOOL_READONLY(dict_property_const_tracking,
V8_DICT_PROPERTY_CONST_TRACKING_BOOL, V8_DICT_PROPERTY_CONST_TRACKING_BOOL,
...@@ -1532,7 +1530,7 @@ DEFINE_BOOL(stress_background_compile, false, ...@@ -1532,7 +1530,7 @@ DEFINE_BOOL(stress_background_compile, false,
DEFINE_BOOL(concurrent_cache_deserialization, true, DEFINE_BOOL(concurrent_cache_deserialization, true,
"enable deserializing code caches on background") "enable deserializing code caches on background")
DEFINE_BOOL( DEFINE_BOOL(
merge_background_deserialized_script_with_compilation_cache, false, merge_background_deserialized_script_with_compilation_cache, true,
"After deserializing code cache data on a background thread, merge it into " "After deserializing code cache data on a background thread, merge it into "
"an existing Script if one is found in the Isolate compilation cache") "an existing Script if one is found in the Isolate compilation cache")
DEFINE_BOOL(disable_old_api_accessors, false, DEFINE_BOOL(disable_old_api_accessors, false,
......
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