Skip to content

Conversation

@wenyuzhao
Copy link
Member

@wenyuzhao wenyuzhao commented Jan 9, 2023

This PR convert Map and Mmapper instances into trait objects, which builds an abstraction layer over the different VM allocation and mapping policy. This is useful for compressed pointers or 39-bit virtual space support, as they will need to use a different Map or Mmapper other than the default 64-bit implementation.

@wenyuzhao wenyuzhao marked this pull request as ready for review March 21, 2023 01:07
@wenyuzhao wenyuzhao requested review from caizixian and qinsoon March 21, 2023 04:58
@qinsoon qinsoon force-pushed the dyn-vmmap-mmapper branch from 167536c to 94c5063 Compare March 21, 2023 05:25
Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

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

Generally good. But I think we should use conditional compilation, and avoid including 64bits mmapper and vmmap in 32 bits if they don't work on 32 bits.

Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyuzhao wenyuzhao merged commit 5cff944 into mmtk:master Mar 21, 2023
@wenyuzhao wenyuzhao deleted the dyn-vmmap-mmapper branch March 21, 2023 22:16
wenyuzhao added a commit to wenyuzhao/mmtk-core that referenced this pull request Mar 22, 2023
This PR converts `Map` and `Mmapper` instances into trait objects, which
builds an abstraction layer over the different VM allocation and mapping
policy. This is useful for compressed pointers or 39-bit virtual space
support, as they will need to use a different `Map` or `Mmapper` other
than the default 64-bit implementation.

---------

Co-authored-by: Yi Lin <qinsoon@gmail.com>
(cherry picked from commit 5cff944)
qinsoon pushed a commit that referenced this pull request Aug 24, 2023
This CL refactors the `vm_layout_constants` related code and changes all
the related compile-time constants to run-time constants, so that VM
bindings can configure them during boot time based on dynamic user
inputs.

This is a necessary refactoring to support compressed pointers. For most
of the VMs (e.g. OpenJDK), compressed pointers are enabled at run-time
based on command line arguments, and VM bindings should be able to
enable compressed pointer heap dynamically during the VM boot process.
Such a process usually involves dynamically configuring heap ranges,
space memory layout, and choosing a different `VMMap` implementation
[1]. Thus all `vm_layout_constants`, including heap constants, should be
made as boot-time configurable, instead of compile-time constants.

This CL also makes risc-v's 39-bit heap support easier, as it now should
only involve adding a new set of `vm_layout_constants`.

[1] This is already done by #732
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