Commit Graph

29 Commits

Author SHA1 Message Date
Wenyong Huang
5a7fbda7ac
Enable to collect code coverage of samples/simple (#2003) 2023-03-07 08:45:03 +08:00
Enrico Loparco
1c44411a97
Add timeout to CI WASI tests and update WASI testsuite commit (#1997)
- Add timeout to CI WASI tests to avoid keeping CI node busy in case of
  deadlock in thread tests
- Update wasi-testsuite commit used, after fix in wasi-threads proposal
  https://github.com/WebAssembly/wasi-threads/pull/40
2023-03-03 16:30:59 +08:00
Wenyong Huang
9b9ae0cfac
Update cmake files and wamr-test-suites to support collect code coverage (#1992)
Support collecting code coverage with wamr-test-suites script by using
lcov and genhtml tools, eg.:
  cd tests/wamr-test-suites
  ./test_wamr.sh -s spec -b -P -C

The default code coverage and html files are generated at:
  tests/wamr-test-suites/workspace/wamr.lcov
  tests/wamr-test-suites/workspace/wamr-lcov.zip

And update wamr-test-suites scripts to support testing GC spec cases to
avoid frequent synchronization conflicts between branch main and dev/gc.
2023-02-28 17:38:18 +08:00
Enrico Loparco
4ca57a0228
Update WASI thread proposal tests in CI (#1985)
Update CI to run extended WASI threads tests included in the proposal
https://github.com/WebAssembly/wasi-testsuite/tree/prod/testsuite-all/tests/proposals/wasi-threads
2023-02-27 20:28:37 +08:00
Huang Qi
2c8375ee67
wamr-test-suites: Save .wasm/.aot file to the report dir if test failed (#1937) 2023-02-06 11:04:28 +08:00
Wenyong Huang
27e7e160af
Upgrade toolkits (#1878)
Upgrade the version of related toolkits:
- upgrade llvm to 15.0
- upgrade wasi-sdk to 19.0
- upgrade emsdk to 3.1.28
- upgrade wabt to 1.0.31
- upgrade binaryen to 111

And upgrade the CI scripts, sample workload build scripts, Dockerfiles, and documents.
2023-02-02 09:42:25 +08:00
Enrico Loparco
c5b7b9d8df
feat: Integrate wasi test suite to wamr-test-suites and CI (#1832)
Add [wasi-testsuite](https://github.com/WebAssembly/wasi-testsuite) to set of tests executed from `test_wamr.sh`. 
Additional description here: #1761
2023-01-05 17:16:44 +08:00
Wenyong Huang
14288f59b0
Implement Multi-tier JIT (#1774)
Implement 2-level Multi-tier JIT engine: tier-up from Fast JIT to LLVM JIT to
get quick cold startup by Fast JIT and better performance by gradually
switching to LLVM JIT when the LLVM JIT functions are compiled by the
backend threads.

Refer to:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/1302
2022-12-19 11:24:46 +08:00
Huang Qi
9c5e1cb600
wamr-test-suites: Add support for ARM/RISCV by QEMU (#1704)
Enhance wamr-test-suites to add QEMU and Firmware options:
`./test_wamr.sh -Q <qemu> -F <firmware>`
2022-11-28 10:45:32 +08:00
Wenyong Huang
87c3195d47
Revert "Implement call Fast JIT function from LLVM JIT jitted code" (#1737)
Reverts bytecodealliance/wasm-micro-runtime#1714, which was merged mistakenly.
2022-11-22 14:04:48 +08:00
Wenyong Huang
cf7b01ad82
Implement call Fast JIT function from LLVM JIT jitted code (#1714)
Basically implement the Multi-tier JIT engine.
And update document and wamr-test-suites script.
2022-11-21 10:42:18 +08:00
liang.he
c718e76dea
Use wabt binary instead of building from source in spec test (#1700)
Directly download wabt binary and use it in spec test instead of
building it from source to fasten the spec test.
2022-11-14 15:16:22 +08:00
Wenyong Huang
e87a554616
Refactor LLVM JIT (#1613)
Refactor LLVM JIT for some purposes:
- To simplify the source code of JIT compilation
- To simplify the JIT modes
- To align with LLVM latest changes
- To prepare for the Multi-tier JIT compilation, refer to #1302

The changes mainly include:
- Remove the MCJIT mode, replace it with ORC JIT eager mode
- Remove the LLVM legacy pass manager (only keep the LLVM new pass manager)
- Change the lazy mode's LLVM module/function binding:
  change each function in an individual LLVM module into all functions in a single LLVM module
- Upgraded ORC JIT to ORCv2 JIT to enable lazy compilation

Refer to #1468
2022-10-18 20:17:34 +08:00
Xu Jun
826cf4f8e1
Fix threads spec test issues (#1586) 2022-10-13 13:53:09 +08:00
Wenyong Huang
3220ff6941
Clear Windows compile warnings (#1530) 2022-09-29 14:02:58 +08:00
Wenyong Huang
bf28030993
Import WAMR Fast JIT (#1343)
Import WAMR Fast JIT which is a lightweight JIT with quick startup, small footprint,
relatively good performance (~40% to ~50% of LLVM JIT) and good portability.

Platforms supported: Linux, MacOS and Linux SGX.
Arch supported: x86-64.
2022-08-02 16:03:50 +08:00
Wenyong Huang
625d59191d
Update spec cases to latest version (#1253)
Update spec cases of mvp/threads to latest version, update wabt
to 1.0.29. And enhance the wasm loader.
2022-06-28 16:05:16 +08:00
liang.he
e70867c64f
Update spec test cases to latest version (#889)
Update spec test cases to commit 2460ad02b51fb5ed5824f44de287a8638b19a5f8,
and modify wamr test suite script as the SIMD cases have been added into spec
main repo by default, no need to clone SIMD repo again when testing SIMD.
2021-12-15 14:39:54 +08:00
Wenyong Huang
b490a229f6
Enhance XIP and add XIP document (#863)
Auto detect whether file is XIP file before loading module in posix like and
linux-sgx platforms, and if yes, mmap executable memory automatically to
run the XIP file.
Add document about XIP feature.
Enable test spec cases with XIP feature.
2021-12-06 17:25:10 +08:00
liang.he
1dccf39d16
Enable ref types and bulk memory by default for wamrc (#838)
Enable ref types feature and bulk memory feature by default for wamrc
and provide "--disable-ref-types", "--disable-bulk-memory"  to disable
them.
And remove the ref_type_flag option in wasm_loader.c which is used to
control whether to enable ref types or not when ENABLE_REF_TYPES
macro is enabled in wamrc. As the wasm binary format with ref types
is compatible with the binary format before, we can remove the option.
Also update the spec test scripts.
2021-11-18 17:42:49 +08:00
liang.he
5b62fdd061
[skip ci] reorder options of test_wamr.sh (#824) 2021-11-10 09:41:42 +08:00
liang.he
487072a78e
Speed up the spec case test by parallelism (#819)
Port spec-test-script/all.sh to spec-test-script/all.py and enable to run
spec cases with multiple threads parallelly:
- It reduces spec_test.yml from ~14min to ~9min and reduces
  compilation_on_sgx.yml from ~18min to ~12min
- run `./test_wamr.sh` will keep the same experience likes before by default
- run `./test_wamr.sh -P` will enable parallelism mode
- in parallelism mode, all.py will be in a less-output mode. It only outputs
  the last words of failed cases and will not output logs for those passed
2021-11-08 12:39:02 +08:00
Wenyong Huang
4d14e41ce9
Build projects in wamr-test-suites with multiple cores (#811)
Build several projects in wamr-test-suites with multiple cores to reduce
the compilation time.
2021-10-30 21:03:46 +08:00
liang.he
b46b663c16
Enhance spec test workflow to support x86_32 target (#787)
Enable test spec cases on x86_32 target when PR is created.
And Format shell script with [shellfmt](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format).
2021-10-15 17:05:07 +08:00
liang.he
250aba6874
Sync up with wabt latest modification (#296) (#786)
- Remove "--enable-reference-types" and "--enable-bulk-memory" for wat2wasm
to support finished proposals.

- Ignore invalid module in the thread spec repo:
``` wast
;; my_elem.wast
(module
  (table $t 10 funcref)
  (func $f)
  (elem $t (i32.const 0) 0)
  (elem $t (i32.const 0) $f $f)
  (elem $t (offset (i32.const 0)) $f $f)
)
```

run with reference interpreter under spec/interpreter:
``` shell
$ ./wasm ../../../my_elem.wast
../../../my_elem.wast:5.9-5.11: syntax error: duplicate elem segment $t
```

- use a specific commit instead of the latest commit on the thread spec repo
2021-10-14 15:48:45 +08:00
Wenyong Huang
03494f9487
Refactor CI rules: merge ubuntu/macos/android, enable spec test (#777)
Refactor CI rules:
- merge ubuntu/macos/android into one job file
- add job file to test spec cases
- add compilation for lazy jit, debug interpreter and debug aot
- add compilation for performance profile, dump call stack and mini-loader
- re-org llvm build script to build lldb

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-11 20:32:29 +08:00
Wenyong Huang
52b6c73d9c
Apply clang-format for more src files and update spec test script (#775)
Apply clang-format for core/iwasm/include, core/iwasm/common and
core/iwasm/aot files.

Update spec cases test script:
- Checkout latest commit of https://github.com/WebAssembly/spec
- Checkout main branch but not master of https://github.com/WebAssembly/threads
- Update wabt to latest version

And update source debugging document.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-08 17:47:11 +08:00
YAMAMOTO Takashi
ea835db54c
Enable wamr-test-suites on MacOS (#740) 2021-09-10 10:11:46 +08:00
Wenyong Huang
00663f0cd5
Import test suites to test spec cases (#736) 2021-09-09 12:49:46 +08:00