diff options
author | sps-gold <79571312+sps-gold@users.noreply.github.com> | 2022-08-19 05:57:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 14:57:19 -0700 |
commit | 6b3f3af606f2cbe8da29996e5600d174c5653d05 (patch) | |
tree | 7eaf07a6e163a1ad9e49d7778933014553c91b95 | |
parent | fe188d28dad8a71bc905939306d64eaba6567a40 (diff) | |
download | binaryen-6b3f3af606f2cbe8da29996e5600d174c5653d05.tar.gz binaryen-6b3f3af606f2cbe8da29996e5600d174c5653d05.tar.bz2 binaryen-6b3f3af606f2cbe8da29996e5600d174c5653d05.zip |
[wasm-split] Test print-profile and unescape flags (#4837)
Follow up to #4771 to test new --print-profile options for wasm-split.
-rw-r--r-- | test/lit/wasm-split/print-profile.wast | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/lit/wasm-split/print-profile.wast b/test/lit/wasm-split/print-profile.wast new file mode 100644 index 000000000..19f1111b6 --- /dev/null +++ b/test/lit/wasm-split/print-profile.wast @@ -0,0 +1,27 @@ +;; Instrument the module +;; RUN: wasm-split --instrument %s -o %t.instrumented.wasm -g + +;; Generate profile +;; RUN: node %S/call_exports.mjs %t.instrumented.wasm %t.foo.prof foo + +;; Print profile +;; RUN: wasm-split %s --print-profile=%t.foo.prof | filecheck %s --check-prefix=ESCAPED + +;; Print profile + unescape function names +;; RUN: wasm-split %s --print-profile=%t.foo.prof --unescape | filecheck %s --check-prefix=UNESCAPED + +;; ESCAPED: - bar\28double\5b3\5d\29 + +;; UNESCAPED: - bar(double[3]) + +(module + (export "memory" (memory 0 0)) + (export "foo" (func $foo)) + (export "bar" (func $bar\28double\5b3\5d\29)) + (func $foo + (nop) + ) + (func $bar\28double\5b3\5d\29 + (nop) + ) +) |