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

baseline: VM-level execution states #1005

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Conversation

chfast
Copy link
Member

@chfast chfast commented Sep 12, 2024

This adds an array of ExecutionState objects to the VM instance. They are used internally in the Baseline interpreter instead of passing one via API. This removes the need of maintaining object pool for execution states.

However, this also makes the VM non-thread safe, but it is fine for current users. We can improve on this in the future by spiting the the VM into two parts: non-thread safe opaque execution context and a thread-safe VM with user configuration.

@chfast chfast force-pushed the baseline/global_execution_states branch from d702cd1 to b864d6b Compare September 12, 2024 13:25
@chfast chfast changed the base branch from master to baseline/code_api September 12, 2024 13:27
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.98%. Comparing base (1358b17) to head (112ff3c).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
test/bench/helpers.hpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1005   +/-   ##
=======================================
  Coverage   93.97%   93.98%           
=======================================
  Files         147      147           
  Lines       15580    15586    +6     
=======================================
+ Hits        14642    14649    +7     
+ Misses        938      937    -1     
Flag Coverage Δ
eof_execution_spec_tests 17.54% <81.25%> (+0.12%) ⬆️
ethereum_tests 27.72% <81.25%> (+0.12%) ⬆️
ethereum_tests_silkpre 19.46% <86.66%> (+0.13%) ⬆️
execution_spec_tests 19.43% <81.25%> (+0.12%) ⬆️
unittests 88.96% <81.25%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
lib/evmone/baseline.hpp 100.00% <ø> (ø)
lib/evmone/baseline_execution.cpp 100.00% <100.00%> (ø)
lib/evmone/vm.cpp 100.00% <100.00%> (ø)
lib/evmone/vm.hpp 100.00% <ø> (ø)
test/bench/helpers.hpp 0.00% <0.00%> (ø)

Base automatically changed from baseline/code_api to master September 12, 2024 15:12
@chfast chfast force-pushed the baseline/global_execution_states branch from b864d6b to 8242be7 Compare September 12, 2024 15:17
@chfast chfast requested review from gumb0 and battlmonstr September 12, 2024 15:23
@chfast chfast force-pushed the baseline/global_execution_states branch from 8242be7 to 5d35254 Compare September 13, 2024 11:28
This adds an array of `ExecutionState` objects to the `VM` instance:
one lazily initialized object for all possible call depths.
This also makes the `VM` non-thread safe, but it is fine for current
users. We can improve on this in the future by spiting the the VM into
two parts: non-thread safe opaque execution context
and a thread-safe VM with user configuration.
Use the new array of `ExecutionState`s from the `VM`.
Remove the `ExecutionState` parameter from the Baseline execution API.
This removes the need of maintaining an external object pool
for execution states.
@chfast chfast force-pushed the baseline/global_execution_states branch from 5d35254 to 112ff3c Compare September 13, 2024 13:46
@chfast chfast enabled auto-merge September 13, 2024 13:57
@chfast chfast merged commit fd1d149 into master Sep 13, 2024
23 checks passed
@chfast chfast deleted the baseline/global_execution_states branch September 13, 2024 14:02
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.

2 participants