Skip to content

Commit

Permalink
whitespace removal
Browse files Browse the repository at this point in the history
  • Loading branch information
h3110n3rv3 committed Jan 20, 2025
1 parent dee0309 commit d2046c8
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions runtime/vm/createramclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2934,78 +2934,78 @@ internalCreateRAMClassFromROMClassImpl(J9VMThread *vmThread, J9ClassLoader *clas
}
allocationRequests[RAM_SUPERCLASSES_FRAGMENT].alignedSize = OMR_MAX(superclassSizeBytes, minimumSuperclassArraySizeBytes);
allocationRequests[RAM_SUPERCLASSES_FRAGMENT].address = NULL;
allocationRequests[RAM_SUPERCLASSES_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_SUPERCLASSES_FRAGMENT].segmentKind = FREQUENTLY_ACCESSED;

/* instance description fragment */
allocationRequests[RAM_INSTANCE_DESCRIPTION_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_INSTANCE_DESCRIPTION_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_INSTANCE_DESCRIPTION_FRAGMENT].alignedSize = instanceDescriptionSlotCount * sizeof(UDATA);
allocationRequests[RAM_INSTANCE_DESCRIPTION_FRAGMENT].address = NULL;
allocationRequests[RAM_INSTANCE_DESCRIPTION_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_INSTANCE_DESCRIPTION_FRAGMENT].segmentKind = FREQUENTLY_ACCESSED;

/* iTable fragment */
allocationRequests[RAM_ITABLE_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_ITABLE_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_ITABLE_FRAGMENT].alignedSize = iTableSlotCount * sizeof(UDATA);
allocationRequests[RAM_ITABLE_FRAGMENT].address = NULL;
allocationRequests[RAM_ITABLE_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_ITABLE_FRAGMENT].segmentKind = FREQUENTLY_ACCESSED;

/* 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 = SUB4G;
allocationRequests[RAM_STATICS_FRAGMENT].segmentKind = FREQUENTLY_ACCESSED;

/* constant pool fragment */
allocationRequests[RAM_CONSTANT_POOL_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_CONSTANT_POOL_FRAGMENT].alignment = REQUIRED_CONSTANT_POOL_ALIGNMENT;
allocationRequests[RAM_CONSTANT_POOL_FRAGMENT].alignedSize = romClass->ramConstantPoolCount * 2 * sizeof(UDATA);
allocationRequests[RAM_CONSTANT_POOL_FRAGMENT].address = NULL;
allocationRequests[RAM_CONSTANT_POOL_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_CONSTANT_POOL_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;

/* call sites fragment */
allocationRequests[RAM_CALL_SITES_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_CALL_SITES_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_CALL_SITES_FRAGMENT].alignedSize = romClass->callSiteCount * sizeof(UDATA);
allocationRequests[RAM_CALL_SITES_FRAGMENT].address = NULL;
allocationRequests[RAM_CALL_SITES_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_CALL_SITES_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;

#if defined(J9VM_OPT_OPENJDK_METHODHANDLE)
/* invoke cache fragment */
allocationRequests[RAM_INVOKE_CACHE_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_INVOKE_CACHE_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_INVOKE_CACHE_FRAGMENT].alignedSize = romClass->invokeCacheCount * sizeof(UDATA);
allocationRequests[RAM_INVOKE_CACHE_FRAGMENT].address = NULL;
allocationRequests[RAM_INVOKE_CACHE_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_INVOKE_CACHE_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;
#else /* defined(J9VM_OPT_OPENJDK_METHODHANDLE) */
/* method types fragment */
allocationRequests[RAM_METHOD_TYPES_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_METHOD_TYPES_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_METHOD_TYPES_FRAGMENT].alignedSize = romClass->methodTypeCount * sizeof(UDATA);
allocationRequests[RAM_METHOD_TYPES_FRAGMENT].address = NULL;
allocationRequests[RAM_METHOD_TYPES_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_METHOD_TYPES_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;
/* varhandle method types fragment */
allocationRequests[RAM_VARHANDLE_METHOD_TYPES_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_VARHANDLE_METHOD_TYPES_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_VARHANDLE_METHOD_TYPES_FRAGMENT].alignedSize = romClass->varHandleMethodTypeCount * sizeof(UDATA);
allocationRequests[RAM_VARHANDLE_METHOD_TYPES_FRAGMENT].address = NULL;
allocationRequests[RAM_VARHANDLE_METHOD_TYPES_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_VARHANDLE_METHOD_TYPES_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;
#endif /* defined(J9VM_OPT_OPENJDK_METHODHANDLE) */

/* static split table fragment */
allocationRequests[RAM_STATIC_SPLIT_TABLE_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_STATIC_SPLIT_TABLE_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_STATIC_SPLIT_TABLE_FRAGMENT].alignedSize = romClass->staticSplitMethodRefCount * sizeof(J9Method *);
allocationRequests[RAM_STATIC_SPLIT_TABLE_FRAGMENT].address = NULL;
allocationRequests[RAM_STATIC_SPLIT_TABLE_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_STATIC_SPLIT_TABLE_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;

/* special split table fragment */
allocationRequests[RAM_SPECIAL_SPLIT_TABLE_FRAGMENT].prefixSize = 0;
allocationRequests[RAM_SPECIAL_SPLIT_TABLE_FRAGMENT].alignment = sizeof(UDATA);
allocationRequests[RAM_SPECIAL_SPLIT_TABLE_FRAGMENT].alignedSize = romClass->specialSplitMethodRefCount * sizeof(J9Method *);
allocationRequests[RAM_SPECIAL_SPLIT_TABLE_FRAGMENT].address = NULL;
allocationRequests[RAM_SPECIAL_SPLIT_TABLE_FRAGMENT].segmentKind = SUB4G;
allocationRequests[RAM_SPECIAL_SPLIT_TABLE_FRAGMENT].segmentKind = INFREQUENTLY_ACCESSED;

/* flattened classes cache */
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
Expand Down Expand Up @@ -4122,21 +4122,18 @@ internalAllocateRAMClass(J9JavaVM *javaVM, J9ClassLoader *classLoader, RAMClassA
{
return NULL;
}

memoryAllocationSuccess = allocateRemainingFragments(requests, allocationRequestCount, javaVM, classLoader, allocationRequests, &classLoader->frequentlyAccessedBlock, classLoader->frequentlyAccessedBlock.ramClassUDATABlockFreeList, FREQUENTLY_ACCESSED);
if(!memoryAllocationSuccess)
{
return NULL;
}

memoryAllocationSuccess = allocateRemainingFragments(requests, allocationRequestCount, javaVM, classLoader, allocationRequests, &classLoader->inFrequentlyAccessedBlock, classLoader->inFrequentlyAccessedBlock.ramClassUDATABlockFreeList, INFREQUENTLY_ACCESSED);

if(!memoryAllocationSuccess)
{
return NULL;
}


/* Clear all allocated fragments */
for (i = 0; i < allocationRequestCount; i++) {
if (NULL != allocationRequests[i].address) {
Expand Down

0 comments on commit d2046c8

Please sign in to comment.