Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse WASM code only once for JIT #18

Merged
merged 4 commits into from
Aug 7, 2023
Merged

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Jul 27, 2023

Currently, to prevent the number of memory mappings from growing, WASM code is parsed twice.

This PR parses WASM code only once for JIT. The solution is that after the first parsing, data required by JIT execution is saved in regular C++ vectors for later use, and the memory (acquired by mmap) used by the first parsing is released. This is made possible by #16, which moves globals out from the mmapped memory.

Resolve #17

Change Description

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

include/eosio/vm/allocator.hpp Outdated Show resolved Hide resolved
include/eosio/vm/allocator.hpp Show resolved Hide resolved
include/eosio/vm/backend.hpp Outdated Show resolved Hide resolved
include/eosio/vm/execution_context.hpp Outdated Show resolved Hide resolved
include/eosio/vm/types.hpp Outdated Show resolved Hide resolved
include/eosio/vm/types.hpp Outdated Show resolved Hide resolved
include/eosio/vm/types.hpp Outdated Show resolved Hide resolved
include/eosio/vm/types.hpp Show resolved Hide resolved
include/eosio/vm/types.hpp Show resolved Hide resolved
include/eosio/vm/types.hpp Outdated Show resolved Hide resolved
include/eosio/vm/types.hpp Show resolved Hide resolved
@linh2931 linh2931 merged commit 169835e into main Aug 7, 2023
10 checks passed
@linh2931 linh2931 deleted the parsing_wasm_once_for_jit branch August 7, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse wasms once for JIT
3 participants