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

Use MMTk builder API #118

Merged
merged 6 commits into from
Jul 21, 2022
Merged

Use MMTk builder API #118

merged 6 commits into from
Jul 21, 2022

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Jul 19, 2022

No description provided.

@qinsoon qinsoon marked this pull request as ready for review July 19, 2022 06:49
@qinsoon qinsoon requested a review from wks July 19, 2022 06:49
Copy link
Collaborator

@wks wks left a comment

Choose a reason for hiding this comment

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

LGTM, but if we make the appropriate change in mmtk-core, we can improve the handling of heap_size here.

mmtk/src/api.rs Outdated
debug_assert!(731 == JikesRVM::mm_entrypoint_test(21, 34, 9, 8));

// set heap size
memory_manager::process(&BUILDER, "heap_size", heap_size.to_string().as_str());
Copy link
Collaborator

Choose a reason for hiding this comment

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

If mmtk-core can expose &mut Options directly, we won't need to convert heap_size into a string.

qinsoon added a commit to mmtk/mmtk-core that referenced this pull request Jul 20, 2022
This PR adds `MMTKBuilder`, and changes APIs around initializing MMTk. The change allows all the options to be set from command line, including heap size, plan, GC threads, etc.

This PR closes #623. This PR is also an initial step for #541. For #541, we may need further changes.

* Add `MMTKBuilder`
* `gc_init()` now takes a reference to `MMTKBuilder` as its argument, and returns a boxed pointer to the new MMTk instance created.
* `gc_init()` is renamed to `mmtk_init()`.
* `gc_init()` no longer requires a `heap_size` argument. `heap_size` now is an option.
* allow options for `plan`, `threads`, `vm_space_size` to be set by command line
* move `examples/mmtk.h` to `docs/header/mmtk.h`. Building C code in `examples` no longer uses this header file.

Related PRs:
* mmtk/mmtk-openjdk#166
* mmtk/openjdk#12
* mmtk/mmtk-jikesrvm#118
* mmtk/mmtk-v8#64
@qinsoon qinsoon merged commit a03bdf2 into mmtk:master Jul 21, 2022
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