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

cannon: Clean up program patching #11944

Merged
merged 4 commits into from
Sep 19, 2024

Conversation

mbaxter
Copy link
Contributor

@mbaxter mbaxter commented Sep 17, 2024

Description

This PR does a little bit of clean-up around Cannon patching:

  • Remove some TODOs that we no longer need
  • Rename patchGo to patchGoGC for clarity, add some comments
  • Only allow go gc patching for single-threaded Cannon in the load-elf command

Tests

Manually tested the load-elf changes.

Metadata

Relates to: #11654

@mbaxter mbaxter requested a review from Inphi September 17, 2024 17:35
@mbaxter mbaxter marked this pull request as ready for review September 17, 2024 17:35
@mbaxter mbaxter requested review from a team as code owners September 17, 2024 17:35
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.20%. Comparing base (57f9fbf) to head (273bf9e).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #11944   +/-   ##
========================================
  Coverage    79.20%   79.20%           
========================================
  Files           41       41           
  Lines         3414     3414           
========================================
  Hits          2704     2704           
  Misses         541      541           
  Partials       169      169           
Flag Coverage Δ
cannon-go-tests 79.20% <100.00%> (ø)

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

Files with missing lines Coverage Δ
cannon/mipsevm/exec/mips_syscalls.go 93.75% <ø> (ø)
cannon/mipsevm/program/patch.go 83.92% <100.00%> (ø)
cannon/mipsevm/testutil/elf.go 100.00% <100.00%> (ø)

Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also be worth removing the --patch option altogether and hardcoding stack and go for st-cannon. Unless there's a usecase for loading singlethreaded Go programs via the cannon cli.

@mbaxter
Copy link
Contributor Author

mbaxter commented Sep 19, 2024

Might also be worth removing the --patch option altogether

Yeah, good call. Went ahead and cut this out.

@mbaxter mbaxter added this pull request to the merge queue Sep 19, 2024
Merged via the queue into ethereum-optimism:develop with commit 08a4369 Sep 19, 2024
60 checks passed
@mbaxter mbaxter deleted the issue-11654/cleanup branch September 19, 2024 18: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.

2 participants