-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use MMTk builder API #118
Conversation
There was a problem hiding this 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()); |
There was a problem hiding this comment.
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.
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
No description provided.