Path: blob/master/runtime/compiler/env/J9ObjectModel.cpp
6000 views
/*******************************************************************************1* Copyright (c) 2000, 2022 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#if defined(J9ZOS390)23//On zOS XLC linker can't handle files with same name at link time24//This workaround with pragma is needed. What this does is essentially25//give a different name to the codesection (csect) for this file. So it26//doesn't conflict with another file with same name.27#pragma csect(CODE,"J9ObjectModel#C")28#pragma csect(STATIC,"J9ObjectModel#S")29#pragma csect(TEST,"J9ObjectModel#T")30#endif3132#include <algorithm>33#include <limits.h>34#include <stdint.h>35#include "j9.h"36#include "j9cfg.h"37#include "j9modron.h"38#include "codegen/CodeGenerator.hpp"39#include "env/CompilerEnv.hpp"40#include "env/ObjectModel.hpp"41#include "env/jittypes.h"42#include "env/VMAccessCriticalSection.hpp"43#include "il/DataTypes.hpp"44#include "il/Node.hpp"45#include "il/Node_inlines.hpp"46#include "env/VMJ9.h"47#if defined(J9VM_OPT_JITSERVER)48#include "control/CompilationThread.hpp"49#include "runtime/JITClientSession.hpp"50#endif /* defined(J9VM_OPT_JITSERVER) */5152#define DEFAULT_OBJECT_ALIGNMENT (8)535455void56J9::ObjectModel::initialize()57{58OMR::ObjectModelConnector::initialize();5960J9JavaVM *vm = TR::Compiler->javaVM;6162PORT_ACCESS_FROM_JAVAVM(vm);63J9MemoryManagerFunctions * mmf = vm->memoryManagerFunctions;6465uintptr_t value;6667// Compressed refs68uintptr_t result = mmf->j9gc_modron_getConfigurationValueForKey(vm,69j9gc_modron_configuration_compressObjectReferences,70&value);71if (result == 1 && value == 1)72_compressObjectReferences = true;73else74_compressObjectReferences = false;7576// Discontiguous arraylets77//78result = mmf->j9gc_modron_getConfigurationValueForKey(vm,79j9gc_modron_configuration_discontiguousArraylets,80&value);81if (result == 1 && value == 1)82{83_usesDiscontiguousArraylets = true;84_arrayLetLeafSize = (int32_t)(vm->memoryManagerFunctions->j9gc_arraylet_getLeafSize(vm));85_arrayLetLeafLogSize = (int32_t)(vm->memoryManagerFunctions->j9gc_arraylet_getLeafLogSize(vm));86}87else88{89_usesDiscontiguousArraylets = false;90_arrayLetLeafSize = 0;91_arrayLetLeafLogSize = 0;92}9394_readBarrierType = (MM_GCReadBarrierType) mmf->j9gc_modron_getReadBarrierType(vm);95_writeBarrierType = (MM_GCWriteBarrierType)mmf->j9gc_modron_getWriteBarrierType(vm);96if (_writeBarrierType == gc_modron_wrtbar_satb_and_oldcheck)97{98// JIT treats satb_and_oldcheck same as satb99_writeBarrierType = gc_modron_wrtbar_satb;100}101102_objectAlignmentInBytes = objectAlignmentInBytes();103}104105106bool107J9::ObjectModel::areValueTypesEnabled()108{109#if defined(J9VM_OPT_JITSERVER)110if (auto stream = TR::CompilationInfo::getStream())111{112#if defined(J9VM_OPT_VALHALLA_VALUE_TYPES)113return true;114#else /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */115return false;116#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */117}118#endif /* defined(J9VM_OPT_JITSERVER) */119120J9JavaVM * javaVM = TR::Compiler->javaVM;121return javaVM->internalVMFunctions->areValueTypesEnabled(javaVM);122}123124125bool126J9::ObjectModel::areValueBasedMonitorChecksEnabled()127{128#if defined(J9VM_OPT_JITSERVER)129if (auto stream = TR::CompilationInfo::getStream())130{131auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);132return J9_ARE_ANY_BITS_SET(vmInfo->_extendedRuntimeFlags2, J9_EXTENDED_RUNTIME2_VALUE_BASED_EXCEPTION | J9_EXTENDED_RUNTIME2_VALUE_BASED_WARNING);133}134#endif /* defined(J9VM_OPT_JITSERVER) */135136J9JavaVM * javaVM = TR::Compiler->javaVM;137return javaVM->internalVMFunctions->areValueBasedMonitorChecksEnabled(javaVM);138}139140141int32_t142J9::ObjectModel::sizeofReferenceField()143{144if (compressObjectReferences())145return sizeof(uint32_t);146return sizeof(uintptr_t);147}148149150bool151J9::ObjectModel::isHotReferenceFieldRequired()152{153#if defined(J9VM_OPT_JITSERVER)154if (auto stream = TR::CompilationInfo::getStream())155{156auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);157return vmInfo->_isHotReferenceFieldRequired;158}159#endif /* defined(J9VM_OPT_JITSERVER) */160return TR::Compiler->javaVM->memoryManagerFunctions->j9gc_hot_reference_field_required(TR::Compiler->javaVM);161}162163164UDATA165J9::ObjectModel::elementSizeOfBooleanArray()166{167return 1;168}169170171uint32_t172J9::ObjectModel::getSizeOfArrayElement(TR::Node * node)173{174TR_ASSERT(node->getOpCodeValue() == TR::newarray || node->getOpCodeValue() == TR::anewarray, "getSizeOfArrayElement expects either newarray or anewarray at [%p]", node);175176if (node->getOpCodeValue() == TR::anewarray)177{178if (compressObjectReferences())179return sizeofReferenceField();180return TR::Symbol::convertTypeToSize(TR::Address);181}182183TR_ASSERT(node->getSecondChild()->getOpCode().isLoadConst(), "Expecting const child \n");184switch (node->getSecondChild()->getInt())185{186case 4:187return (uint32_t) TR::Compiler->om.elementSizeOfBooleanArray();188case 8:189return 1;190case 5:191case 9:192return 2;193case 7:194case 11:195return 8;196}197return 4;198}199200int64_t201J9::ObjectModel::maxArraySizeInElementsForAllocation(202TR::Node *newArray,203TR::Compilation *comp)204{205int64_t result = TR::getMaxSigned<TR::Int64>();206207switch (newArray->getOpCodeValue())208{209case TR::newarray:210case TR::anewarray:211result = TR::Compiler->om.maxArraySizeInElements(TR::Compiler->om.getSizeOfArrayElement(newArray), comp);212break;213case TR::multianewarray:214result = TR::Compiler->om.maxArraySizeInElements(TR::Compiler->om.sizeofReferenceField(), comp);215break;216default:217TR_ASSERT(0, "Unexpected node %p in maxArraySizeInElementsForAllocation", newArray);218break;219}220221return result;222}223224225int64_t226J9::ObjectModel::maxArraySizeInElements(227int32_t knownMinElementSize,228TR::Compilation *comp)229{230int64_t result = INT_MAX; // On Java, indexes are signed 32-bit ints231232// An array can't be larger than the heap. Limit the index based on that.233//234int32_t minElementSize = std::max(1, knownMinElementSize);235int64_t maxHeapSizeInBytes;236237if (comp->compileRelocatableCode())238{239maxHeapSizeInBytes = -1;240}241else242{243maxHeapSizeInBytes = TR::Compiler->vm.maxHeapSizeInBytes();244}245246if (maxHeapSizeInBytes == -1)247{248// getMaximumHeapSize has an irritating habit of returning -1 sometimes,249// for some reason. Must compensate for this corner case here.250//251if (comp->target().is64Bit())252{253// Ok, in theory it could be TR::getMaxUnsigned<TR::Int64>(). This isn't worth the254// hassle of using uint64_t and worrying about signedness. When the255// day comes that a Java program needs an array larger than 8 billion256// gigabytes, our great-grandchildren can switch to int128_t, assuming257// Testarossa has not yet become self-aware and fixed this limitation258// by itself.259//260maxHeapSizeInBytes = TR::getMaxSigned<TR::Int64>();261}262else263{264maxHeapSizeInBytes = TR::getMaxUnsigned<TR::Int32>(); // Heap can't be larger than the address space265}266}267268result = std::min(result, maxHeapSizeInBytes / minElementSize);269270return result;271}272273274bool275J9::ObjectModel::nativeAddressesCanChangeSize()276{277#if defined(J9VM_OPT_SHARED_CLASSES) && defined(J9VM_INTERP_AOT_COMPILE_SUPPORT)278return true;279#else280return false;281#endif282}283284285bool286J9::ObjectModel::generateCompressedObjectHeaders()287{288return compressObjectReferences();289}290291292uintptr_t293J9::ObjectModel::contiguousArrayHeaderSizeInBytes()294{295return compressObjectReferences() ? sizeof(J9IndexableObjectContiguousCompressed) : sizeof(J9IndexableObjectContiguousFull);296}297298299uintptr_t300J9::ObjectModel::discontiguousArrayHeaderSizeInBytes()301{302return compressObjectReferences() ? sizeof(J9IndexableObjectDiscontiguousCompressed) : sizeof(J9IndexableObjectDiscontiguousFull);303}304305306// Returns the maximum contiguous arraylet size in bytes NOT including the header.307//308int32_t309J9::ObjectModel::maxContiguousArraySizeInBytes()310{311return TR::Compiler->om.arrayletLeafSize() - TR::Compiler->om.contiguousArrayHeaderSizeInBytes();312}313314315// 'sizeInBytes' should NOT include the header316//317bool318J9::ObjectModel::isDiscontiguousArray(int32_t sizeInBytes)319{320if (sizeInBytes > TR::Compiler->om.maxContiguousArraySizeInBytes())321return true;322else323{324if (TR::Compiler->om.useHybridArraylets() && sizeInBytes == 0)325return true;326else327return false;328}329}330331332// 'sizeInElements' should NOT include the header333//334bool335J9::ObjectModel::isDiscontiguousArray(int32_t sizeInElements, int32_t elementSize)336{337int32_t shift = trailingZeroes(elementSize);338int32_t maxContiguousArraySizeInElements = TR::Compiler->om.maxContiguousArraySizeInBytes() >> shift;339340if (sizeInElements > maxContiguousArraySizeInElements)341return true;342else343{344if (TR::Compiler->om.useHybridArraylets() && sizeInElements == 0)345return true;346else347return false;348}349}350351352int32_t353J9::ObjectModel::compressedReferenceShiftOffset()354{355// FIXME: currently returns 0, has to be modified to356// return the shift offset357//358return TR::Compiler->om.compressedReferenceShift();359}360361362int32_t363J9::ObjectModel::compressedReferenceShift()364{365#if defined(J9VM_OPT_JITSERVER)366if (auto stream = TR::CompilationInfo::getStream())367{368auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);369return vmInfo->_compressedReferenceShift;370}371#endif /* defined(J9VM_OPT_JITSERVER) */372373if (compressObjectReferences())374{375J9JavaVM *javaVM = TR::Compiler->javaVM;376if (!javaVM)377return 0;378379J9VMThread *vmThread = javaVM->internalVMFunctions->currentVMThread(javaVM);380J9MemoryManagerFunctions * mmf = javaVM->memoryManagerFunctions;381int32_t result = mmf->j9gc_objaccess_compressedPointersShift(vmThread);382return result;383}384return 0;385}386387388uintptr_t389J9::ObjectModel::offsetOfObjectVftField()390{391return TMP_OFFSETOF_J9OBJECT_CLAZZ;392}393394395uintptr_t396J9::ObjectModel::offsetOfHeaderFlags()397{398#if defined(J9VM_INTERP_FLAGS_IN_CLASS_SLOT)399return TR::Compiler->om.offsetOfObjectVftField();400#else401#if defined(TMP_OFFSETOF_J9OBJECT_FLAGS)402return TMP_OFFSETOF_J9OBJECT_FLAGS;403#else404return 0;405#endif406#endif407}408409410uintptr_t411J9::ObjectModel::maskOfObjectVftField()412{413if (TR::Compiler->om.offsetOfHeaderFlags() != TR::Compiler->om.offsetOfObjectVftField())414{415// Flags are not in the VFT field, so no need for a mask416//417if (TR::Options::getCmdLineOptions()->getOption(TR_DisableMaskVFTPointers))418return ~(uintptr_t)0;419}420421return (uintptr_t)(-J9_REQUIRED_CLASS_ALIGNMENT);422}423424425// Answers whether this compilation may need spine checks. The FE will answer yes426// if true discontiguous arrays could appear at all with this GC policy, but its a427// conservative answer. The corresponding compilation query may know better for428// this compilation unit.429//430bool431J9::ObjectModel::mayRequireSpineChecks()432{433return TR::Compiler->om.useHybridArraylets();434}435436437int32_t438J9::ObjectModel::arraySpineShift(int32_t width)439{440TR_ASSERT(TR::Compiler->om.canGenerateArraylets(), "not supposed to be generating arraylets!");441TR_ASSERT(width >= 0, "unexpected arraylet datatype width");442443// for elements larger than bytes, need to reduce the shift because fewer elements444// fit into each arraylet445446int32_t shift=-1;447int32_t maxShift = TR::Compiler->om.arrayletLeafLogSize();448449switch(width)450{451case 1 : shift = maxShift-0; break;452case 2 : shift = maxShift-1; break;453case 4 : shift = maxShift-2; break;454case 8 : shift = maxShift-3; break;455default: TR_ASSERT(0,"unexpected element width");456}457return shift;458}459460461int32_t462J9::ObjectModel::arrayletMask(int32_t width)463{464TR_ASSERT(TR::Compiler->om.canGenerateArraylets(), "not supposed to be generating arraylets!");465TR_ASSERT(width >= 0, "unexpected arraylet datatype width");466int32_t mask=(1 << TR::Compiler->om.arraySpineShift(width))-1;467return mask;468}469470471int32_t472J9::ObjectModel::arrayletLeafIndex(int32_t index, int32_t elementSize)473{474TR_ASSERT(TR::Compiler->om.canGenerateArraylets(), "not supposed to be generating arraylets!");475TR_ASSERT(elementSize >= 0, "unexpected arraylet datatype width");476477if (index<0)478return -1;479480int32_t arrayletIndex = (index >> TR::Compiler->om.arraySpineShift(elementSize));481return arrayletIndex;482}483484485int32_t486J9::ObjectModel::objectAlignmentInBytes()487{488J9JavaVM *javaVM = TR::Compiler->javaVM;489if (!javaVM)490return 0;491492#if defined(J9VM_OPT_JITSERVER)493if (auto stream = TR::CompilationInfo::getStream())494{495auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);496return vmInfo->_objectAlignmentInBytes;497}498#endif /* defined(J9VM_OPT_JITSERVER) */499500J9MemoryManagerFunctions * mmf = javaVM->memoryManagerFunctions;501uintptr_t result = 0;502result = mmf->j9gc_modron_getConfigurationValueForKey(javaVM, j9gc_modron_configuration_objectAlignment, &result) ? result : 0;503return (int32_t)result;504}505506uintptr_t507J9::ObjectModel::offsetOfContiguousArraySizeField()508{509return compressObjectReferences() ? offsetof(J9IndexableObjectContiguousCompressed, size) : offsetof(J9IndexableObjectContiguousFull, size);510}511512513uintptr_t514J9::ObjectModel::offsetOfDiscontiguousArraySizeField()515{516return compressObjectReferences() ? offsetof(J9IndexableObjectDiscontiguousCompressed, size) : offsetof(J9IndexableObjectDiscontiguousFull, size);517}518519#if defined(TR_TARGET_64BIT)520uintptr_t521J9::ObjectModel::offsetOfContiguousDataAddrField()522{523return compressObjectReferences()524? offsetof(J9IndexableObjectContiguousCompressed, dataAddr)525: offsetof(J9IndexableObjectContiguousFull, dataAddr);526}527528uintptr_t529J9::ObjectModel::offsetOfDiscontiguousDataAddrField()530{531return compressObjectReferences()532? offsetof(J9IndexableObjectDiscontiguousCompressed, dataAddr)533: offsetof(J9IndexableObjectDiscontiguousFull, dataAddr);534}535#endif /* TR_TARGET_64BIT */536537538uintptr_t539J9::ObjectModel::objectHeaderSizeInBytes()540{541return compressObjectReferences() ? sizeof(J9ObjectCompressed) : sizeof(J9ObjectFull);542}543544545uintptr_t546J9::ObjectModel::offsetOfIndexableSizeField()547{548return offsetof(J9ROMArrayClass, arrayShape);549}550551552bool553J9::ObjectModel::isDiscontiguousArray(TR::Compilation* comp, uintptr_t objectPointer)554{555TR_ASSERT(TR::Compiler->vm.hasAccess(comp), "isDicontiguousArray requires VM access");556TR_ASSERT(TR::Compiler->cls.isClassArray(comp, TR::Compiler->cls.objectClass(comp, (objectPointer))), "Object is not an array");557558int32_t length = *(int32_t*)(objectPointer + TR::Compiler->om.offsetOfContiguousArraySizeField());559560if (TR::Compiler->om.canGenerateArraylets()561&& length == 0)562return true;563564return false;565}566567/**568* \brief569* Get the address of an element given its offset into the array.570* \parm comp571* Current compilation.572*573* \parm objectPointer.574* Pointer to the array.575*576* \parm offset577* The offset of the element in bytes. It should contain the array header. If578* objectPointer is a discontiguous array, offset should be an integer that's579* calculated as if the array was a contiguous array.580*581* \return582* The address of the element.583*/584uintptr_t585J9::ObjectModel::getAddressOfElement(TR::Compilation* comp, uintptr_t objectPointer, int64_t offset)586{587TR_ASSERT(TR::Compiler->vm.hasAccess(comp), "getAddressOfElement requires VM access");588TR_ASSERT(TR::Compiler->cls.isClassArray(comp, TR::Compiler->cls.objectClass(comp, (objectPointer))), "Object is not an array");589TR_ASSERT(offset >= TR::Compiler->om.contiguousArrayHeaderSizeInBytes() &&590offset < TR::Compiler->om.getArrayLengthInBytes(comp, objectPointer) + TR::Compiler->om.contiguousArrayHeaderSizeInBytes(), "Array is out of bound");591592// If the array is contiguous, return the addition of objectPointer and offset593if (!TR::Compiler->om.isDiscontiguousArray(comp, objectPointer))594return objectPointer + offset;595596// The following code handles discontiguous array597//598// Treat the array as a byte array, so the element size is 1599uintptr_t elementSize = 1;600int64_t elementIndex = offset - TR::Compiler->om.contiguousArrayHeaderSizeInBytes();601602uintptr_t leafIndex = comp->fej9()->getArrayletLeafIndex(elementIndex, elementSize);603uintptr_t elementIndexInLeaf = comp->fej9()->getLeafElementIndex(elementIndex, elementSize);604uintptr_t dataStart = objectPointer + TR::Compiler->om.discontiguousArrayHeaderSizeInBytes();605606if (comp->useCompressedPointers())607{608uint32_t *spine = (uint32_t*)dataStart;609dataStart = spine[leafIndex];610dataStart = TR::Compiler->om.decompressReference(comp, dataStart);611}612else613{614uintptr_t *spine = (uintptr_t*)dataStart;615dataStart = spine[leafIndex];616}617618return dataStart + elementIndexInLeaf * elementSize;619}620621uintptr_t622J9::ObjectModel::getArrayElementWidthInBytes(TR::DataType type)623{624if (type == TR::Address)625return TR::Compiler->om.sizeofReferenceField();626else627return TR::Symbol::convertTypeToSize(type);628}629630uintptr_t631J9::ObjectModel::getArrayElementWidthInBytes(TR::Compilation* comp, uintptr_t objectPointer)632{633TR_ASSERT(TR::Compiler->vm.hasAccess(comp), "Must haveAccess in getArrayElementWidthInBytes");634return TR::Compiler->cls.getArrayElementWidthInBytes(comp, TR::Compiler->cls.objectClass(comp, (objectPointer)));635}636637uintptr_t638J9::ObjectModel::getArrayLengthInBytes(TR::Compilation* comp, uintptr_t objectPointer)639{640TR_ASSERT(TR::Compiler->vm.hasAccess(comp), "Must haveAccess in getArrayLengthInBytes");641return (uintptr_t)TR::Compiler->om.getArrayLengthInElements(comp, objectPointer) * TR::Compiler->om.getArrayElementWidthInBytes(comp, objectPointer);642}643644intptr_t645J9::ObjectModel::getArrayLengthInElements(TR::Compilation* comp, uintptr_t objectPointer)646{647return comp->fej9()->getArrayLengthInElements(objectPointer);648}649650uintptr_t651J9::ObjectModel::decompressReference(TR::Compilation* comp, uintptr_t compressedReference)652{653return (compressedReference << TR::Compiler->om.compressedReferenceShift());654}655656bool657J9::ObjectModel::usesDiscontiguousArraylets()658{659#if defined(J9VM_OPT_JITSERVER)660if (auto stream = TR::CompilationInfo::getStream())661{662auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);663return vmInfo->_usesDiscontiguousArraylets;664}665#endif /* defined(J9VM_OPT_JITSERVER) */666return _usesDiscontiguousArraylets;667}668669int32_t670J9::ObjectModel::arrayletLeafSize()671{672#if defined(J9VM_OPT_JITSERVER)673if (auto stream = TR::CompilationInfo::getStream())674{675auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);676return vmInfo->_arrayletLeafSize;677}678#endif /* defined(J9VM_OPT_JITSERVER) */679return _arrayLetLeafSize;680}681682int32_t683J9::ObjectModel::arrayletLeafLogSize()684{685#if defined(J9VM_OPT_JITSERVER)686if (auto stream = TR::CompilationInfo::getStream())687{688auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);689return vmInfo->_arrayletLeafLogSize;690}691#endif /* defined(J9VM_OPT_JITSERVER) */692return _arrayLetLeafLogSize;693}694695MM_GCReadBarrierType696J9::ObjectModel::readBarrierType()697{698#if defined(J9VM_OPT_JITSERVER)699if (auto stream = TR::CompilationInfo::getStream())700{701auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);702return vmInfo->_readBarrierType;703}704#endif /* defined(J9VM_OPT_JITSERVER) */705return _readBarrierType;706}707708MM_GCWriteBarrierType709J9::ObjectModel::writeBarrierType()710{711#if defined(J9VM_OPT_JITSERVER)712if (auto stream = TR::CompilationInfo::getStream())713{714auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);715return vmInfo->_writeBarrierType;716}717#endif /* defined(J9VM_OPT_JITSERVER) */718return _writeBarrierType;719}720721bool722J9::ObjectModel::compressObjectReferences()723{724#if defined(J9VM_OPT_JITSERVER)725if (auto stream = TR::CompilationInfo::getStream())726{727auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);728return vmInfo->_compressObjectReferences;729}730#endif /* defined(J9VM_OPT_JITSERVER) */731return _compressObjectReferences;732}733734int32_t735J9::ObjectModel::getObjectAlignmentInBytes()736{737#if defined(J9VM_OPT_JITSERVER)738if (auto stream = TR::CompilationInfo::getStream())739{740auto *vmInfo = TR::compInfoPT->getClientData()->getOrCacheVMInfo(stream);741return vmInfo->_objectAlignmentInBytes;742}743#endif /* defined(J9VM_OPT_JITSERVER) */744return _objectAlignmentInBytes;745}746747748