Skip to content

Commit

Permalink
Update to mmtk-core PR #1028 (#155)
Browse files Browse the repository at this point in the history
* Update to mmtk/mmtk-core#1028
* Move `num_specialized_scans` to the binding.

---------

Co-authored-by: mmtkgc-bot <mmtkgc.bot@gmail.com>
  • Loading branch information
qinsoon and mmtkgc-bot authored Nov 23, 2023
1 parent c08d421 commit fec74f0
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 45 deletions.
72 changes: 36 additions & 36 deletions mmtk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"]
# - change branch/rev
# - change repo name
# But other changes including adding/removing whitespaces in commented lines may break the CI.
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "39d237189fdfa22873eeb529f3e97b7578d9b246" }
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "a87636c6c4ad263c1c72c9cfe24bdc524a8bc924" }
# Uncomment the following to build locally - if you change the path locally, do not commit the change in a PR
# mmtk = { path = "../repos/mmtk-core" }

Expand Down
14 changes: 9 additions & 5 deletions mmtk/src/memory_manager_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ use crate::SELECTED_CONSTRAINTS;

/** {@code true} if the selected plan needs support for linearly scanning the heap */
pub const NEEDS_LINEAR_SCAN: bool = SELECTED_CONSTRAINTS.needs_linear_scan;
/** Number of bits in the GC header required by the selected plan */
pub const GC_HEADER_BITS: usize = SELECTED_CONSTRAINTS.gc_header_bits;
/** Number of additional bytes required in the header by the selected plan */
pub const GC_HEADER_BYTES: usize = SELECTED_CONSTRAINTS.gc_header_words << LOG_BYTES_IN_WORD;
/** {@code true} if the selected plan requires concurrent worker threads */
pub const NEEDS_CONCURRENT_WORKERS: bool = SELECTED_CONSTRAINTS.needs_concurrent_workers;
/** {@code true} if the selected plan needs support for generating a GC trace */
pub const GENERATE_GC_TRACE: bool = SELECTED_CONSTRAINTS.generate_gc_trace;
pub const GENERATE_GC_TRACE: bool = false;
/** {@code true} if the selected plan may move objects */
pub const MOVES_OBJECTS: bool = SELECTED_CONSTRAINTS.moves_objects;
/** {@code true} if the selected plan moves TIB objects */
pub const MOVES_TIBS: bool = false;
/** {@code true} if the selected plan moves code */
pub const MOVES_CODE: bool = false;

#[cfg(feature = "nogc")]
pub const NUM_SPECIALIZED_SCANS: usize = 0;
#[cfg(any(feature = "semispace", feature = "marksweep"))]
pub const NUM_SPECIALIZED_SCANS: usize = 1;

pub const GC_HEADER_BITS: usize = 2;
pub const GC_HEADER_BYTES: usize = 0 << LOG_BYTES_IN_WORD;
4 changes: 1 addition & 3 deletions mmtk/src/tib_layout_constants.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use crate::SELECTED_CONSTRAINTS;

/** Number of slots reserved for interface method pointers. */
pub const IMT_METHOD_SLOTS: usize = 0; //VM.BuildForIMTInterfaceInvocation ? 29 : 0;

Expand Down Expand Up @@ -34,7 +32,7 @@ pub const TIB_FIRST_SPECIALIZED_METHOD_INDEX: usize = TIB_INTERFACE_DISPATCH_TAB
* Next group of slots point to virtual method code blocks (slots V1..VN in above diagram).
*/
pub const TIB_FIRST_VIRTUAL_METHOD_INDEX: usize =
TIB_FIRST_SPECIALIZED_METHOD_INDEX + SELECTED_CONSTRAINTS.num_specialized_scans; // + SpecializedMethodManager.numSpecializedMethods();
TIB_FIRST_SPECIALIZED_METHOD_INDEX + crate::memory_manager_constants::NUM_SPECIALIZED_SCANS; // + SpecializedMethodManager.numSpecializedMethods();

/**
* Special value returned by RVMClassLoader.getFieldOffset() or
Expand Down

0 comments on commit fec74f0

Please sign in to comment.