summaryrefslogtreecommitdiff
path: root/test/lit/help/wasm-split.test
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-09-03 17:14:23 -0700
committerGitHub <noreply@github.com>2021-09-03 17:14:23 -0700
commit0ce4ebc853d89f19b22a8622304725a7bc423661 (patch)
tree6a6319849fad5e1ed4a84a5ed18af3a0185d6ca4 /test/lit/help/wasm-split.test
parent99ccc313b2c1d91bbfcee48fe99d70a2867befbc (diff)
downloadbinaryen-0ce4ebc853d89f19b22a8622304725a7bc423661.tar.gz
binaryen-0ce4ebc853d89f19b22a8622304725a7bc423661.tar.bz2
binaryen-0ce4ebc853d89f19b22a8622304725a7bc423661.zip
[wasm-split] Add an option for recording profile data in memory (#4120)
To avoid requiring a static memory allocation, wasm-split's instrumentation defaults to recording profile data in Wasm globals. This causes problems for multithreaded applications because the globals are thread-local, but it is not always feasible to arrange for a separate profile to be dumped on each thread. To simplify the profiling of such multithreaded applications, add a new instrumentation mode that stores the profiling data in shared memory instead of in globals. This allows a single profile to be written that correctly reflects the called functions on all threads. This new mode is not on by default because it requires users to ensure that the program will not trample the in-memory profiling data. The data is stored beginning at address zero and occupies one byte per declared function in the instrumented module. Emscripten can be told to leave this memory free using the GLOBAL_BASE option.
Diffstat (limited to 'test/lit/help/wasm-split.test')
-rw-r--r--test/lit/help/wasm-split.test13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/lit/help/wasm-split.test b/test/lit/help/wasm-split.test
index 362c20d84..dd2b5f7e1 100644
--- a/test/lit/help/wasm-split.test
+++ b/test/lit/help/wasm-split.test
@@ -39,7 +39,7 @@
;; CHECK-NEXT: of any profile. You can also pass a file
;; CHECK-NEXT: with a list of functions separated by new
;; CHECK-NEXT: lines. To do this, prepend @ before
-;; CHECK-NEXT: filename (--keep-funcs @myfile)
+;; CHECK-NEXT: filename (--keep-funcs @myfile)
;; CHECK-NEXT:
;; CHECK-NEXT: --split-funcs [split] Comma-separated list of functions
;; CHECK-NEXT: to split into the secondary module,
@@ -49,7 +49,7 @@
;; CHECK-NEXT: also pass a file with a list of functions
;; CHECK-NEXT: separated by new lines. To do this,
;; CHECK-NEXT: prepend @ before filename (--split-funcs
-;; CHECK-NEXT: @myfile)
+;; CHECK-NEXT: @myfile)
;; CHECK-NEXT:
;; CHECK-NEXT: --primary-output,-o1 [split] Output file for the primary
;; CHECK-NEXT: module.
@@ -80,6 +80,15 @@
;; CHECK-NEXT: profile into memory. Defaults to
;; CHECK-NEXT: `__write_profile`.
;; CHECK-NEXT:
+;; CHECK-NEXT: --in-memory [instrument] Store profile information in
+;; CHECK-NEXT: memory (starting at address 0 and taking
+;; CHECK-NEXT: one byte per function) rather than
+;; CHECK-NEXT: globals (the default) so that it can be
+;; CHECK-NEXT: shared between multiple threads. Users
+;; CHECK-NEXT: are responsible for ensuring that the
+;; CHECK-NEXT: module does not use the initial memory
+;; CHECK-NEXT: region for anything else.
+;; CHECK-NEXT:
;; CHECK-NEXT: --emit-module-names [split, instrument] Emit module names,
;; CHECK-NEXT: even if not emitting the rest of the
;; CHECK-NEXT: names section. Can help differentiate the