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

Override load_elf and load_binary for DefaultCoreMachine and DefaultMachine. #437

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

mohanson
Copy link
Collaborator

  • Override DefaultCoreMachine's load_binary so when pprof is enabled, the original code can be saved.
  • Override DefaultMachine's load_binary and load_elf. It now calls inner's related methods by default.

The purpose of these changes is to get the original code from the machine created by the spawn scheduler.

Copy link
Collaborator

@xxuejie xxuejie left a comment

Choose a reason for hiding this comment

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

I have no objections to this so I will just approve it. Though I wonder if we can split pprof related code out of the core crate into its own thing.

@mohanson
Copy link
Collaborator Author

I will try to remove the pprof feature from ckb-vm. But for now, this is the easiest way to help ckb-debugger get the original code.

@mohanson mohanson merged commit b32522c into nervosnetwork:develop Jun 18, 2024
11 checks passed
@mohanson mohanson deleted the update branch June 18, 2024 01:31
mohanson added a commit to libraries/ckb-vm that referenced this pull request Jun 18, 2024
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