Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: enable V8's shared read-only heap #42809

Merged
merged 2 commits into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,7 @@ def configure_v8(o):
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression else 1
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
Expand Down
8 changes: 4 additions & 4 deletions test/parallel/test-worker-nearheaplimit-deadlock.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Flags: --no-node-snapshot
// With node snapshot the OOM can occur during the deserialization of the
// context, so disable it since we want the OOM to occur during the creation of
// the message port.
'use strict';
const common = require('../common');
const assert = require('assert');
Expand All @@ -11,10 +15,6 @@ if (!process.env.HAS_STARTED_WORKER) {
maxYoungGenerationSizeMb: 0,
maxOldGenerationSizeMb: 0
},
// With node snapshot the OOM can occur during the deserialization of
// the context, so disable it since we want the OOM to occur during
// the creation of the message port.
execArgv: [ ...process.execArgv, '--no-node-snapshot']
};

const worker = new Worker(__filename, opts);
Expand Down
7 changes: 7 additions & 0 deletions tools/v8_gypfiles/features.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@
# Controls the threshold for on-heap/off-heap Typed Arrays.
'v8_typed_array_max_size_in_heap%': 64,

# Enable sharing read-only space across isolates.
# Sets -DV8_SHARED_RO_HEAP.
'v8_enable_shared_ro_heap%': 0,

# Enable lazy source positions by default.
'v8_enable_lazy_source_positions%': 1,

Expand Down Expand Up @@ -396,6 +400,9 @@
['v8_use_siphash==1', {
'defines': ['V8_USE_SIPHASH',],
}],
['v8_enable_shared_ro_heap==1', {
'defines': ['V8_SHARED_RO_HEAP',],
}],
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
Expand Down
1 change: 1 addition & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,7 @@
'v8_enable_verify_csa=<(v8_enable_verify_csa)',
'v8_enable_lite_mode=<(v8_enable_lite_mode)',
'v8_enable_pointer_compression=<(v8_enable_pointer_compression)',
'v8_enable_shared_ro_heap=<(v8_enable_shared_ro_heap)',
'v8_enable_webassembly=<(v8_enable_webassembly)',
# Not available in gyp.
'v8_control_flow_integrity=0',
Expand Down