emscripten-core / emscripten-core/emscripten

[wasm-split] Inbuilt instrumentation support with threads enabled

Open
#22,420 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Currently, emscripten instruments wasm binaries without using `--in-memory` or `--in-secondary-memory` wasm-split options when threads are enabled [here](https://github.com/emscripten-core/emscripten/blob/main/tools/link.py#L466). Even [docs](https://emscripten.org/docs/optimizing/Module-Splitting.html#multithreaded-programs) mention using `--in-memory` for multithreaded programs. I have few questions regarding this:

1. Do we need to re-instrument the wasm binary ourselves for multithreaded programs? Or has emscripten planned to provide support for this?
2. Docs also suggest to use `-sGLOBAL_BASE` flag with `--in-memory` wasm-split option. What about `--in-secondary-memory` option? Do we still need to use that flag if we use the later option?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.