-
Notifications
You must be signed in to change notification settings - Fork 768
RAM Class: Per-kind segment allocation and sizing #22530
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
base: master
Are you sure you want to change the base?
Conversation
fyi @tajila |
runtime/vm/createramclass.cpp
Outdated
|
||
/* static slots fragment */ | ||
allocationRequests[RAM_STATICS_FRAGMENT].prefixSize = 0; | ||
allocationRequests[RAM_STATICS_FRAGMENT].alignment = sizeof(U_64); | ||
allocationRequests[RAM_STATICS_FRAGMENT].alignedSize = totalStaticSlots * sizeof(UDATA); | ||
allocationRequests[RAM_STATICS_FRAGMENT].address = NULL; | ||
allocationRequests[RAM_STATICS_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED; |
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.
this is frequently accessed
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.
the rest is not
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.
Updated. Now, only RAM_STATICS_FRAGMENT
is tagged as FREQUENTLY_ACCESSED
, and the rest are tagged as INFREQUENTLY_ACCESSED
.
const UDATA headersPerSegment = 32; | ||
classAllocationIncrement = sizeof(J9Class) * headersPerSegment; |
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.
Should alignment be considered here?
const UDATA headersPerSegment = 32; | |
classAllocationIncrement = sizeof(J9Class) * headersPerSegment; | |
UDATA mask = J9_REQUIRED_CLASS_ALIGNMENT - 1; | |
UDATA unitSegment = (sizeof(J9Class) + mask) & ~mask; | |
const UDATA headersPerSegment = 32; | |
classAllocationIncrement = unitSegment * headersPerSegment; |
Introduce distinct segment categories (SUB4G, FREQUENTLY_ACCESSED, INFREQUENTLY_ACCESSED). Separates hot vs. cold J9Class data for better memory efficiency. SUB4G segments are sized in multiples of aligned J9Class headers and tagged with MEMORY_TYPE_RAM_CLASS_SUB4G. Related: eclipse-openj9#20644 Co-authored-by: Nick Kamal <nick.kamal@ibm.com> Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
Introduce distinct segment categories (
SUB4G
,FREQUENTLY_ACCESSED
,INFREQUENTLY_ACCESSED
).Separates hot vs. cold
J9Class
data for better memory efficiency.SUB4G
segments are sized in multiples of alignedJ9Class
headersand tagged with
MEMORY_TYPE_RAM_CLASS_SUB4G
.Related: #20644
Depends on eclipse-omr/omr#7916