summaryrefslogtreecommitdiff
path: root/src/tools/wasm-split/split-options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/wasm-split/split-options.cpp')
-rw-r--r--src/tools/wasm-split/split-options.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/tools/wasm-split/split-options.cpp b/src/tools/wasm-split/split-options.cpp
index b8ccde83e..d077c70bc 100644
--- a/src/tools/wasm-split/split-options.cpp
+++ b/src/tools/wasm-split/split-options.cpp
@@ -185,10 +185,12 @@ WasmSplitOptions::WasmSplitOptions()
[&](Options* o, const std::string& argument) { placeholderMap = true; })
.add("--import-namespace",
"",
- "The namespace from which to import objects from the primary "
- "module into the secondary module.",
+ "When provided as an option for module splitting, the namespace from "
+ "which to import objects from the primary "
+ "module into the secondary module. In instrument mode, refers to the "
+ "namespace from which to import the secondary memory, if any.",
WasmSplitOption,
- {Mode::Split},
+ {Mode::Split, Mode::Instrument},
Options::Arguments::One,
[&](Options* o, const std::string& argument) {
importNamespace = argument;
@@ -246,6 +248,29 @@ WasmSplitOptions::WasmSplitOptions()
storageKind = StorageKind::InMemory;
})
.add(
+ "--in-secondary-memory",
+ "",
+ "Store profile information in a separate memory, rather than in module "
+ "main memory or globals (the default). With this option, users do not "
+ "need to reserve the initial memory region for profile data and the "
+ "data can be shared between multiple threads.",
+ WasmSplitOption,
+ {Mode::Instrument},
+ Options::Arguments::Zero,
+ [&](Options* o, const std::string& argument) {
+ storageKind = StorageKind::InSecondaryMemory;
+ })
+ .add("--secondary-memory-name",
+ "",
+ "The name of the secondary memory created to store profile "
+ "information.",
+ WasmSplitOption,
+ {Mode::Instrument},
+ Options::Arguments::One,
+ [&](Options* o, const std::string& argument) {
+ secondaryMemoryName = argument;
+ })
+ .add(
"--emit-module-names",
"",
"Emit module names, even if not emitting the rest of the names section. "