Commit bdf953b5 authored by rmcilroy's avatar rmcilroy Committed by Commit bot

Revert of [Interpreter] Remove separate Ignition snapshot. (patchset #2...

Revert of [Interpreter] Remove separate Ignition snapshot. (patchset #2 id:20001 of https://codereview.chromium.org/1833643002/ )

Reason for revert:
Makes nosnap bots timeout due to having to rebuild bytecode handlers.

Original issue's description:
> [Interpreter] Remove separate Ignition snapshot.
>
> Removes the seperate Ignition snapshot and build the Ignition bytecode
> handlers in the default snapshot.
>
> BUG=v8:4280
> LOG=N
>
> Committed: https://crrev.com/1798f3fe84faff32ba44e09f6aed79245dd98d80
> Cr-Commit-Position: refs/heads/master@{#35058}

TBR=machenbach@google.com,yangguo@chromium.org,mstarzinger@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280

Review URL: https://codereview.chromium.org/1827143002

Cr-Commit-Position: refs/heads/master@{#35059}
parent 1798f3fe
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
'--config-variable', 'component=<(component)', '--config-variable', 'component=<(component)',
'--config-variable', 'target_arch=<(target_arch)', '--config-variable', 'target_arch=<(target_arch)',
'--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)', '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)',
'--config-variable', 'v8_separate_ignition_snapshot=<(v8_separate_ignition_snapshot)',
'--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)', '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)',
'--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)', '--config-variable', 'v8_use_snapshot=<(v8_use_snapshot)',
], ],
......
...@@ -194,6 +194,9 @@ ...@@ -194,6 +194,9 @@
# their own default value. # their own default value.
'v8_use_external_startup_data%': 1, 'v8_use_external_startup_data%': 1,
# Use a separate ignition snapshot file in standalone builds.
'v8_separate_ignition_snapshot': 1,
# Relative path to icu.gyp from this file. # Relative path to icu.gyp from this file.
'icu_gyp_path': '../third_party/icu/icu.gyp', 'icu_gyp_path': '../third_party/icu/icu.gyp',
......
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
# The setting is ignored if want_separate_host_toolset is 0. # The setting is ignored if want_separate_host_toolset is 0.
'v8_toolset_for_d8%': 'target', 'v8_toolset_for_d8%': 'target',
# Control usage of a separate ignition snapshot file.
'v8_separate_ignition_snapshot%': 0,
'host_os%': '<(OS)', 'host_os%': '<(OS)',
'werror%': '-Werror', 'werror%': '-Werror',
# For a shared library build, results in "libv8-<(soname_version).so". # For a shared library build, results in "libv8-<(soname_version).so".
......
...@@ -22,6 +22,13 @@ ...@@ -22,6 +22,13 @@
], ],
}, },
}], }],
['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and v8_separate_ignition_snapshot==1', {
'variables': {
'files': [
'<(PRODUCT_DIR)/snapshot_blob_ignition.bin',
],
},
}],
['OS=="linux" and component=="shared_library" and target_arch=="ia32"', { ['OS=="linux" and component=="shared_library" and target_arch=="ia32"', {
'variables': { 'variables': {
'files': [ 'files': [
......
...@@ -28,6 +28,7 @@ Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) { ...@@ -28,6 +28,7 @@ Interpreter::Interpreter(Isolate* isolate) : isolate_(isolate) {
} }
void Interpreter::Initialize() { void Interpreter::Initialize() {
DCHECK(FLAG_ignition);
if (IsDispatchTableInitialized()) return; if (IsDispatchTableInitialized()) return;
Zone zone; Zone zone;
HandleScope scope(isolate_); HandleScope scope(isolate_);
......
...@@ -2256,7 +2256,10 @@ bool Isolate::Init(Deserializer* des) { ...@@ -2256,7 +2256,10 @@ bool Isolate::Init(Deserializer* des) {
des->Deserialize(this); des->Deserialize(this);
} }
stub_cache_->Initialize(); stub_cache_->Initialize();
if (FLAG_ignition) {
interpreter_->Initialize(); interpreter_->Initialize();
}
// Finish initialization of ThreadLocal after deserialization is done. // Finish initialization of ThreadLocal after deserialization is done.
clear_pending_exception(); clear_pending_exception();
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "src/base/logging.h" #include "src/base/logging.h"
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/flags.h"
#include "src/utils.h" #include "src/utils.h"
...@@ -107,7 +108,9 @@ void InitializeExternalStartupData(const char* directory_path) { ...@@ -107,7 +108,9 @@ void InitializeExternalStartupData(const char* directory_path) {
char* natives; char* natives;
char* snapshot; char* snapshot;
LoadFromFiles(RelativePath(&natives, directory_path, "natives_blob.bin"), LoadFromFiles(RelativePath(&natives, directory_path, "natives_blob.bin"),
RelativePath(&snapshot, directory_path, "snapshot_blob.bin")); RelativePath(&snapshot, directory_path,
FLAG_ignition ? "snapshot_blob_ignition.bin"
: "snapshot_blob.bin"));
free(natives); free(natives);
free(snapshot); free(snapshot);
#endif // V8_USE_EXTERNAL_STARTUP_DATA #endif // V8_USE_EXTERNAL_STARTUP_DATA
......
...@@ -85,6 +85,8 @@ class BytecodeGraphTester { ...@@ -85,6 +85,8 @@ class BytecodeGraphTester {
SNPrintF(ignition_filter, "--ignition-filter=%s", filter); SNPrintF(ignition_filter, "--ignition-filter=%s", filter);
FlagList::SetFlagsFromString(ignition_filter.start(), FlagList::SetFlagsFromString(ignition_filter.start(),
ignition_filter.length()); ignition_filter.length());
// Ensure handler table is generated.
isolate->interpreter()->Initialize();
} }
virtual ~BytecodeGraphTester() {} virtual ~BytecodeGraphTester() {}
......
...@@ -29,6 +29,8 @@ InterpreterTester::InterpreterTester( ...@@ -29,6 +29,8 @@ InterpreterTester::InterpreterTester(
SNPrintF(ignition_filter, "--ignition-filter=%s", filter); SNPrintF(ignition_filter, "--ignition-filter=%s", filter);
FlagList::SetFlagsFromString(ignition_filter.start(), FlagList::SetFlagsFromString(ignition_filter.start(),
ignition_filter.length()); ignition_filter.length());
// Ensure handler table is generated.
isolate->interpreter()->Initialize();
} }
InterpreterTester::InterpreterTester( InterpreterTester::InterpreterTester(
......
...@@ -74,6 +74,7 @@ class InitializedIgnitionHandleScope : public InitializedHandleScope { ...@@ -74,6 +74,7 @@ class InitializedIgnitionHandleScope : public InitializedHandleScope {
i::FLAG_ignition = true; i::FLAG_ignition = true;
i::FLAG_always_opt = false; i::FLAG_always_opt = false;
i::FLAG_allow_natives_syntax = true; i::FLAG_allow_natives_syntax = true;
CcTest::i_isolate()->interpreter()->Initialize();
} }
}; };
......
...@@ -121,18 +121,30 @@ ...@@ -121,18 +121,30 @@
}], }],
['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', { ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==0', {
'dependencies': ['v8_base', 'v8_external_snapshot'], 'dependencies': ['v8_base', 'v8_external_snapshot'],
'inputs': [ '<(PRODUCT_DIR)/snapshot_blob.bin', ], 'inputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'],
'conditions': [
['v8_separate_ignition_snapshot==1', {
'inputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'],
}],
]
}], }],
['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', { ['v8_use_snapshot=="true" and v8_use_external_startup_data==1 and want_separate_host_toolset==1', {
'dependencies': ['v8_base', 'v8_external_snapshot'], 'dependencies': ['v8_base', 'v8_external_snapshot'],
'target_conditions': [ 'target_conditions': [
['_toolset=="host"', { ['_toolset=="host"', {
'inputs': [ 'inputs': ['<(PRODUCT_DIR)/snapshot_blob_host.bin'],
'<(PRODUCT_DIR)/snapshot_blob_host.bin', }, {
'inputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'],
}],
], ],
'conditions': [
['v8_separate_ignition_snapshot==1', {
'target_conditions': [
['_toolset=="host"', {
'inputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition_host.bin'],
}, { }, {
'inputs': [ 'inputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'],
'<(PRODUCT_DIR)/snapshot_blob.bin', }],
], ],
}], }],
], ],
...@@ -286,6 +298,68 @@ ...@@ -286,6 +298,68 @@
], ],
}, },
}], }],
# Extra snapshot blob for ignition.
['v8_separate_ignition_snapshot==1', {
# This is concatenated to the other actions list of
# v8_external_snapshot.
'actions': [
{
'action_name': 'run_mksnapshot (ignition)',
'inputs': ['<(mksnapshot_exec)'],
'variables': {
# TODO: Extract common mksnapshot_flags to a separate
# variable.
'mksnapshot_flags_ignition': [
'--ignition',
'--log-snapshot-positions',
'--logfile', '<(INTERMEDIATE_DIR)/snapshot_ignition.log',
],
'conditions': [
['v8_random_seed!=0', {
'mksnapshot_flags_ignition': ['--random-seed', '<(v8_random_seed)'],
}],
['v8_vector_stores!=0', {
'mksnapshot_flags_ignition': ['--vector-stores'],
}],
],
},
'conditions': [
['want_separate_host_toolset==1', {
'target_conditions': [
['_toolset=="host"', {
'outputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition_host.bin'],
'action': [
'<(mksnapshot_exec)',
'<@(mksnapshot_flags_ignition)',
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition_host.bin',
'<(embed_script)',
'<(warmup_script)',
],
}, {
'outputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'],
'action': [
'<(mksnapshot_exec)',
'<@(mksnapshot_flags_ignition)',
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition.bin',
'<(embed_script)',
'<(warmup_script)',
],
}],
],
}, {
'outputs': ['<(PRODUCT_DIR)/snapshot_blob_ignition.bin'],
'action': [
'<(mksnapshot_exec)',
'<@(mksnapshot_flags_ignition)',
'--startup_blob', '<(PRODUCT_DIR)/snapshot_blob_ignition.bin',
'<(embed_script)',
'<(warmup_script)',
],
}],
],
},
],
}],
], ],
'dependencies': [ 'dependencies': [
'v8_base', 'v8_base',
...@@ -300,9 +374,7 @@ ...@@ -300,9 +374,7 @@
'actions': [ 'actions': [
{ {
'action_name': 'run_mksnapshot (external)', 'action_name': 'run_mksnapshot (external)',
'inputs': [ 'inputs': ['<(mksnapshot_exec)'],
'<(mksnapshot_exec)',
],
'variables': { 'variables': {
'mksnapshot_flags': [ 'mksnapshot_flags': [
'--log-snapshot-positions', '--log-snapshot-positions',
...@@ -321,9 +393,7 @@ ...@@ -321,9 +393,7 @@
['want_separate_host_toolset==1', { ['want_separate_host_toolset==1', {
'target_conditions': [ 'target_conditions': [
['_toolset=="host"', { ['_toolset=="host"', {
'outputs': [ 'outputs': ['<(PRODUCT_DIR)/snapshot_blob_host.bin'],
'<(PRODUCT_DIR)/snapshot_blob_host.bin',
],
'action': [ 'action': [
'<(mksnapshot_exec)', '<(mksnapshot_exec)',
'<@(mksnapshot_flags)', '<@(mksnapshot_flags)',
...@@ -332,9 +402,7 @@ ...@@ -332,9 +402,7 @@
'<(warmup_script)', '<(warmup_script)',
], ],
}, { }, {
'outputs': [ 'outputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'],
'<(PRODUCT_DIR)/snapshot_blob.bin',
],
'action': [ 'action': [
'<(mksnapshot_exec)', '<(mksnapshot_exec)',
'<@(mksnapshot_flags)', '<@(mksnapshot_flags)',
...@@ -345,9 +413,7 @@ ...@@ -345,9 +413,7 @@
}], }],
], ],
}, { }, {
'outputs': [ 'outputs': ['<(PRODUCT_DIR)/snapshot_blob.bin'],
'<(PRODUCT_DIR)/snapshot_blob.bin',
],
'action': [ 'action': [
'<(mksnapshot_exec)', '<(mksnapshot_exec)',
'<@(mksnapshot_flags)', '<@(mksnapshot_flags)',
......
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