diff options
author | sps-gold <79571312+sps-gold@users.noreply.github.com> | 2022-07-26 03:56:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 12:56:41 -0700 |
commit | 3a8d28f421a9452aff8f7ed2b140e12e2f314322 (patch) | |
tree | 8c67e20249568785d89796a24780c50640091463 /src/binaryen-c.cpp | |
parent | 68e2ed11e86e72cc4e12a1b4026ef19d5149fda9 (diff) | |
download | binaryen-3a8d28f421a9452aff8f7ed2b140e12e2f314322.tar.gz binaryen-3a8d28f421a9452aff8f7ed2b140e12e2f314322.tar.bz2 binaryen-3a8d28f421a9452aff8f7ed2b140e12e2f314322.zip |
[wasm-split] Add --print-profile option (#4771)
There are several reasons why a function may not be trained in deterministically.
So to perform quick validation we need to inspect profile.data (another ways requires split to be performed). However as profile.data is a binary file and is not self sufficient, so we cannot currently use it to perform such validation.
Therefore to allow quick check on whether a particular function has been trained in, we need to dump profile.data in a more readable format.
This PR, allows us to output, the list of functions to be kept (in main wasm) and those split functions (to be moved to deferred.wasm) in a readable format, to console.
Added a new option `--print-profile`
- input path to orig.wasm (its the original wasm file that will be used later during split)
- input path to profile.data that we need to output
optionally pass `--unescape`
to unescape the function names
Usage:
```
binaryen\build>bin\wasm-split.exe test\profile_data\MY.orig.wasm --print-profile=test\profile_data\profile.data > test\profile_data\out.log
```
note: meaning of prefixes
`+` => fn to be kept in main wasm
`-` => fn to be split and moved to deferred wasm
Diffstat (limited to 'src/binaryen-c.cpp')
0 files changed, 0 insertions, 0 deletions