Path: blob/master/runtime/compiler/env/J9SharedCache.hpp
6000 views
/*******************************************************************************1* Copyright (c) 2000, 2021 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#ifndef J9SHARED_CACHE_HPP23#define J9SHARED_CACHE_HPP2425#include "compiler/env/SharedCache.hpp"2627#include <stdint.h>28#include <map>29#include "env/TRMemory.hpp"30#include "env/jittypes.h"31#include "il/DataTypes.hpp"32#include "runtime/J9Runtime.hpp"33#include "runtime/RuntimeAssumptions.hpp"3435class TR_J9VMBase;36class TR_ResolvedMethod;37namespace TR { class CompilationInfo; }38#if defined(J9VM_OPT_JITSERVER)39namespace JITServer { class ServerStream; }40#endif4142struct J9SharedClassConfig;43struct J9SharedClassCacheDescriptor;44struct J9SharedDataDescriptor;4546/**47* \brief An interface to the VM's shared class cache.48*49* This class provides an interface to the VM's shared class cache as represented50* by the descriptors in J9SharedClassConfig::cacheDescriptorList.The cache51* descriptor list is a circular linked list. It is doubly linked when52* J9VM_OPT_MULTI_LAYER_SHARED_CLASS_CACHE is defined or singly linked otherwise.53*54* If J9VM_OPT_MULTI_LAYER_SHARED_CLASS_CACHE is not defined, the list consists of55* a single element who's next pointer refers back to itself. Offsets into the56* shared cache represent the distance from the start of the rom classes section or57* or start of the metadata section; the offset is then left shifted 1 bit in order58* to use the low bit to determine whether the offset is relative to the start of59* the rom classes section or the start of the metadata section. Converting between60* pointers and offsets can be done with simple pointer arithmetic.61*62* If J9VM_OPT_MULTI_LAYER_SHARED_CLASS_CACHE is defined, the head of the list63* represents the top-most (and therefore writable) layer of the shared class cache,64* the next element represents the (N-1)th layer, and so on. The element previous to65* the head represents the base layer. The list of cache layers can be thought of as66* a single logical cache starting at layer 0 and ending at layer N. Offsets into the67* shared cache represent the distance from the start of the cache. Converting68* between pointers and offsets requires traversing the list starting at the base69* layer.70*71* The layout of section of the SCC relevant for this class is:72*73* Increasing Address ----->74* *-------------*------------------*----------*75* | ROM CLASSES |---> FREE <---| METADATA |76* *-------------*------------------*----------*77* ^ ^ ^ ^78* | | | |79* | | | cacheDesc->metadataStartAddress80* | | |81* | | UPDATEPTR(cacheDesc->cacheStartAddress)82* | |83* | SEGUPDATEPTR(cacheDesc->cacheStartAddress)84* |85* cacheDesc->romclassStartAddress86*87* See CompositeCache.cpp for more details.88*/89class TR_J9SharedCache : public TR_SharedCache90{91public:92TR_ALLOC_SPECIALIZED(TR_Memory::SharedCache)9394TR_J9SharedCache(TR_J9VMBase *fe);9596virtual bool isHint(TR_ResolvedMethod *, TR_SharedCacheHint, uint16_t *dataField = NULL);97virtual bool isHint(J9Method *, TR_SharedCacheHint, uint16_t *dataField = NULL);98virtual uint16_t getAllEnabledHints(J9Method *method);99virtual void addHint(J9Method *, TR_SharedCacheHint);100virtual void addHint(TR_ResolvedMethod *, TR_SharedCacheHint);101virtual bool isMostlyFull();102103/**104* \brief Converts a shared cache offset, calculated from the end of the SCC, into the105* metadata section of the SCC into a pointer.106*107* \param[in] offset The offset to convert.108* \return A pointer. Raises a fatal assertion before returning NULL if the offset is invalid.109*/110virtual void *pointerFromOffsetInSharedCache(uintptr_t offset);111112/**113* \brief Converts a pointer into the metadata section of the SCC into an offset, calculated114* from the end of the SCC.115*116* \param[in] ptr The pointer to convert.117* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.118*/119virtual uintptr_t offsetInSharedCacheFromPointer(void *ptr);120121/**122* \brief Converts an offset into the ROMClass section into a J9ROMClass *.123*124* \param[in] offset The offset to convert.125* \return A J9ROMClass *. Raises a fatal assertion before returning NULL if the offset is invalid.126*/127virtual J9ROMClass *romClassFromOffsetInSharedCache(uintptr_t offset);128129/**130* \brief Converts a J9ROMClass * pointer into the SCC into an offset.131*132* \param[in] romClass The J9ROMClass * to convert133* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.134*/135virtual uintptr_t offsetInSharedCacheFromROMClass(J9ROMClass *romClass);136137/**138* \brief Converts an offset into the ROMClass section into a J9ROMMethod *.139*140* \param[in] offset The offset to convert141* \return A J9ROMMethod *. Raises a fatal assertion before returning NULL if the offset is invalid.142*/143virtual J9ROMMethod *romMethodFromOffsetInSharedCache(uintptr_t offset);144145/**146* \brief Converts a J9ROMMethod * pointer into the SCC into an offset.147*148* \param[in] romMethod The J9ROMMethod * to convert149* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.150*/151virtual uintptr_t offsetInSharedCacheFromROMMethod(J9ROMMethod *romMethod);152153/**154* \brief Converts an offset into the ROMClass section into a pointer.155*156* \param[in] offset The offset to convert157* \return A pointer. Raises a fatal assertion before returning NULL if the offset is invalid.158*/159virtual void *ptrToROMClassesSectionFromOffsetInSharedCache(uintptr_t offset);160161/**162* \brief Converts a pointer into the ROM Classes section of the SCC into an offset.163*164* \param[in] ptr The pointer to convert165* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.166*/167virtual uintptr_t offsetInSharedCacheFromPtrToROMClassesSection(void *ptr);168169170virtual void persistIprofileInfo(TR::ResolvedMethodSymbol *, TR::Compilation *comp);171virtual void persistIprofileInfo(TR::ResolvedMethodSymbol *, TR_ResolvedMethod*, TR::Compilation *comp);172173static const uint32_t maxClassChainLength = 32;174175virtual bool canRememberClass(TR_OpaqueClassBlock *classPtr)176{177return rememberClass((J9Class *)classPtr, NULL, false) != NULL;178}179180virtual uintptr_t *rememberClass(TR_OpaqueClassBlock *classPtr,181const AOTCacheClassChainRecord **classChainRecord = NULL)182{183return (uintptr_t *)rememberClass((J9Class *)classPtr, classChainRecord, true);184}185186virtual uintptr_t *rememberClass(J9Class *clazz, const AOTCacheClassChainRecord **classChainRecord = NULL,187bool create = true);188189virtual UDATA rememberDebugCounterName(const char *name);190virtual const char *getDebugCounterName(UDATA offset);191192virtual bool classMatchesCachedVersion(J9Class *clazz, UDATA *chainData=NULL);193virtual bool classMatchesCachedVersion(TR_OpaqueClassBlock *classPtr, UDATA *chainData=NULL)194{195return classMatchesCachedVersion((J9Class *) classPtr, chainData);196}197198virtual TR_OpaqueClassBlock *lookupClassFromChainAndLoader(uintptr_t *chainData, void *classLoader);199200/**201* \brief Checks whether the specified pointer points into the metadata section202* of the shared cache.203*204* \param[in] ptr The pointer to check.205* \param[out] cacheOffset If ptr points into the shared cache and this parameter206* is not NULL the result of converting ptr into an offset will be207* returned here. If ptr does not point into the shared cache this208* parameter is ignored. The offset is calculated from the end of209* the SCC.210* \return True if the pointer points into the shared cache, false otherwise.211*/212virtual bool isPointerInSharedCache(void *ptr, uintptr_t *cacheOffset = NULL);213214/**215* \brief Checks whether the specified offset, calculated from the end of the SCC,216* is within the metadata section of the shared cache.217*218* \param[in] offset The offset to check.219* \param[out] ptr If offset is within the shared cache and this parameter is not220* NULL the result of converting offset into a pointer will be returned221* here. If offset is not within the shared cache this parameter is ignored.222* \return True if the offset is within the shared cache, false otherwise.223*/224virtual bool isOffsetInSharedCache(uintptr_t encoded_offset, void *ptr = NULL);225226/**227* \brief Checks whether the specified J9ROMClass exists in the SCC228*229* \param[in] romClass The J9ROMClass * to check230* \param[out] cacheOffset If the J9ROMClass is in the SCC and this parameter231* is not NULL the result of converting romClass into an offset will232* be returned here. If romClass does not point into the SCC, this233* parameter is ignored.234* \return True if romClass points into the SCC, false otherwise.235*/236virtual bool isROMClassInSharedCache(J9ROMClass *romClass, uintptr_t *cacheOffset = NULL);237238/**239* \brief Checks whether the specified offset is within the ROMClass section240* of the shared cache.241*242* \param[in] offset The offset to check243* \param[out] romClass If offset is within the shared cache and this parameter is not244* NULL the result of converting offset into a J9ROMClass * will be returned245* here. If offset is not within the shared cache this parameter is ignored.246* \return True if the offset is within the shared cache, false otherwise.247*/248virtual bool isROMClassOffsetInSharedCache(uintptr_t offset, J9ROMClass **romClassPtr = NULL);249250/**251* \brief Checks whether the specified J9ROMMethod exists in the SCC252*253* \param[in] romMethod The J9ROMMethod * to check254* \param[out] cacheOffset If the J9ROMMethod is in the SCC and this parameter255* is not NULL the result of converting romMethod into an offset will256* be returned here. If romMethod does not point into the SCC, this257* parameter is ignored.258* \return True if romMethod points into the SCC, false otherwise.259*/260virtual bool isROMMethodInSharedCache(J9ROMMethod *romMethod, uintptr_t *cacheOffset = NULL);261262/**263* \brief Checks whether the specified offset is within the ROMClass section264* of the shared cache.265* \param[in] offset The offset to check266* \param[out] romMethodPtr If offset is within the shared cache and this parameter is not267* NULL the result of converting offset into a J9ROMMethod * will be returned268* here. If offset is not within the shared cache this parameter is ignored.269* \return True if the offset is within the shared cache, false otherwise.270*/271virtual bool isROMMethodOffsetInSharedCache(uintptr_t offset, J9ROMMethod **romMethodPtr = NULL);272273/**274* \brief Checks whether the specified pointer points into the ROMClass section275* of the shared cache.276*277* \param[in] ptr The pointer to check278* \param[out] cacheOffset If ptr points into the shared cache and this parameter279* is not NULL the result of converting ptr into an offset will be280* returned here. If ptr does not point into the shared cache this281* parameter is ignored.282* \return True if the pointer points into the shared cache, false otherwise.283*/284virtual bool isPtrToROMClassesSectionInSharedCache(void *ptr, uintptr_t *cacheOffset = NULL);285286/**287* \brief Checks whether the specified offset is within the ROMClass section288* of the shared cache.289*290* \param[in] offset The offset to check.291* \param[out] ptr If offset is within the shared cache and this parameter is not292* NULL the result of converting offset into a pointer will be returned293* here. If offset is not within the shared cache this parameter is ignored.294* \return True if the offset is within the shared cache, false otherwise.295*/296virtual bool isOffsetOfPtrToROMClassesSectionInSharedCache(uintptr_t offset, void **ptr = NULL);297298J9ROMClass *startingROMClassOfClassChain(UDATA *classChain);299300virtual uintptr_t getClassChainOffsetIdentifyingLoader(TR_OpaqueClassBlock *clazz, uintptr_t **classChain = NULL);301302#if defined(J9VM_OPT_JITSERVER)303/**304* \brief Finds the offset in SCC of the class chain identifying the class loader of the given class.305* This is very similar to getClassChainOffsetIdentifyingLoader306* except that it will not fail the compilation if the offset is not valid.307* \return Returns the offset of the class chain that identifies given class or 0 is such offset is not valid.308*/309uintptr_t getClassChainOffsetIdentifyingLoaderNoFail(TR_OpaqueClassBlock *clazz, uintptr_t **classChain = NULL);310#endif /* defined(J9VM_OPT_JITSERVER) */311312virtual const void *storeSharedData(J9VMThread *vmThread, char *key, J9SharedDataDescriptor *descriptor);313314enum TR_J9SharedCacheDisabledReason315{316UNINITIALIZED,317NOT_DISABLED,318AOT_DISABLED,319AOT_HEADER_INVALID,320AOT_HEADER_FAILED_TO_ALLOCATE,321J9_SHARED_CACHE_FAILED_TO_ALLOCATE,322SHARED_CACHE_STORE_ERROR,323SHARED_CACHE_FULL,324// The following are probably equivalent to SHARED_CACHE_FULL -325// they could have failed because of no space but no error code is returned.326SHARED_CACHE_CLASS_CHAIN_STORE_FAILED,327AOT_HEADER_STORE_FAILED328};329330static void setSharedCacheDisabledReason(TR_J9SharedCacheDisabledReason state) { _sharedCacheState = state; }331static TR_J9SharedCacheDisabledReason getSharedCacheDisabledReason() { return _sharedCacheState; }332static TR_YesNoMaybe isSharedCacheDisabledBecauseFull(TR::CompilationInfo *compInfo);333static void setStoreSharedDataFailedLength(UDATA length) {_storeSharedDataFailedLength = length; }334335virtual J9SharedClassCacheDescriptor *getCacheDescriptorList();336337protected:338/**339* \brief Helper method; used to check if a pointer is within the SCC340*341* \param[in] cacheDesc the J9SharedClassCacheDescriptor for the cache342* \param[in] ptr The pointer to check343* \return True if ptr is within the SCC, false otherwise344*/345static bool isPointerInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr);346347/**348* \brief Helper method; used to check if an offset is within the SCC349*350* \param[in] cacheDesc the J9SharedClassCacheDescriptor for the cache351* \param[in] offset the offset to check352* \return True if offset is within the SCC, false otherwise353*/354static bool isOffsetInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset);355356static inline bool isOffsetFromStart(uintptr_t offset) { return ((offset & OFFSET_FROM_END) != OFFSET_FROM_END); }357static inline bool isOffsetFromEnd(uintptr_t offset) { return ((offset & OFFSET_FROM_END) == OFFSET_FROM_END); }358static inline uintptr_t encodeOffsetFromStart(uintptr_t offset) { return (offset << 1); }359static inline uintptr_t decodeOffsetFromStart(uintptr_t offset) { return (offset >> 1); }360static inline uintptr_t encodeOffsetFromEnd(uintptr_t offset) { return ((offset << 1) | OFFSET_FROM_END); }361static inline uintptr_t decodeOffsetFromEnd(uintptr_t offset) { return (offset >> 1); }362363private:364// This class is intended to be a POD; keep it simple.365struct SCCHint366{367SCCHint() : flags(0), data(0) {}368void clear() { flags = 0; data = 0; }369uint16_t flags;370uint16_t data;371};372373static const uintptr_t OFFSET_FROM_END = 0x1;374375J9JITConfig *jitConfig() { return _jitConfig; }376J9JavaVM *javaVM() { return _javaVM; }377TR_J9VMBase *fe() { return _fe; }378J9SharedClassConfig *sharedCacheConfig() { return _sharedCacheConfig; }379380TR_AOTStats *aotStats() { return _aotStats; }381382void log(char *format, ...);383384SCCHint getHint(J9VMThread * vmThread, J9Method *method);385386void convertUnsignedOffsetToASCII(UDATA offset, char *myBuffer);387void createClassKey(UDATA classOffsetInCache, char *key, uint32_t & keyLength);388389uint32_t numInterfacesImplemented(J9Class *clazz);390391bool writeClassToChain(J9ROMClass *romClass, UDATA * & chainPtr);392bool writeClassesToChain(J9Class *clazz, int32_t numSuperclasses, UDATA * & chainPtr);393bool writeInterfacesToChain(J9Class *clazz, UDATA * & chainPtr);394bool fillInClassChain(J9Class *clazz, UDATA *chainData, uint32_t chainLength,395uint32_t numSuperclasses, uint32_t numInterfaces);396397bool romclassMatchesCachedVersion(J9ROMClass *romClass, UDATA * & chainPtr, UDATA *chainEnd);398UDATA *findChainForClass(J9Class *clazz, const char *key, uint32_t keyLength);399400/**401* \brief Helper Method; Converts an offset into the ROMClass section into a pointer.402*403* \param offset The offset to convert404* \return A pointer. Raises a fatal assertion before returning NULL if the offset is invalid.405*/406void *romStructureFromOffsetInSharedCache(uintptr_t offset);407408/**409* \brief Converts a pointer into the ROMClass section of the SCC into an offset.410*411* \param[in] romStructure The pointer to convert.412* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.413*/414uintptr_t offsetInSharedcacheFromROMStructure(void *romStructure);415416/**417* \brief Checks whether the specified pointer points into the ROMClass section418* of the shared cache.419*420* \param[in] romStructure The pointer to check421* \param[out] cacheOffset If romStructure points into the shared cache and this parameter422* is not NULL the result of converting romStructure into an offset will be423* returned here. If romStructure does not point into the shared cache this424* parameter is ignored.425* \return True if the pointer points into the shared cache, false otherwise.426*/427bool isROMStructureInSharedCache(void *romStructure, uintptr_t *cacheOffset = NULL);428429/**430* \brief Checks whether the specified offset is within the ROMClass section431* of the shared cache.432*433* \param[in] offset The offset to check.434* \param[out] romStructurePtr If offset is within the shared cache and this parameter is not435* NULL the result of converting offset into a pointer will be returned436* here. If offset is not within the shared cache this parameter is ignored.437* \return True if the offset is within the shared cache, false otherwise.438*/439bool isROMStructureOffsetInSharedCache(uintptr_t encoded_offset, void **romStructurePtr = NULL);440441/**442* \brief Validates the provided class chain. This method modifies the chainPtr arg.443*444* \param[in] romClass The J9ROMClass of the class whose chain is to be validated445* \param[in] clazz The TR_OpaqueClassBlock of the class whose chain is to be validated446* \param[in,out] chainPtr Pointer to the start of the class chain passed by reference447* \param[in] chainEnd Pointer to the end of the class chain448* \return true if validation succeeded, false otherwise.449*/450bool validateClassChain(J9ROMClass *romClass, TR_OpaqueClassBlock *clazz, UDATA * & chainPtr, UDATA *chainEnd);451452/**453* \brief Validates the super classes portion of the class chain. This method modifies the chainPtr arg.454*455* \param[in] clazz The TR_OpaqueClassBlock of the class whose chain is to be validated456* \param[in,out] chainPtr Pointer to the start of super classes portion of the class chain passed by reference457* \param[in] chainEnd Pointer to the end of the class chain458* \return true if validation succeeded, false otherwise.459*/460bool validateSuperClassesInClassChain(TR_OpaqueClassBlock *clazz, UDATA * & chainPtr, UDATA *chainEnd);461462/**463* \brief Validates the interfaces portion of the class chain. This method modifies the chainPtr arg.464*465* \param[in] clazz The TR_OpaqueClassBlock of the class whose chain is to be validated466* \param[in,out] chainPtr Pointer to the start of interfaces portion of the class chain passed by reference467* \param[in] chainEnd Pointer to the end of the class chain468* \return true if validation succeeded, false otherwise.469*/470bool validateInterfacesInClassChain(TR_OpaqueClassBlock *clazz, UDATA * & chainPtr, UDATA *chainEnd);471472/**473* \brief Helper method; used to check if a pointer is within the metadata section of the SCC474* \param[in] cacheDesc the J9SharedClassCacheDescriptor for the cache475* \param[in] ptr The pointer to check476* \return True if ptr is within the metadata section of the SCC, false otherwise477*/478virtual bool isPointerInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr);479480/**481* \brief Helper method; used to check if an offset is within the metadata section of the SCC482*483* \param[in] cacheDesc the J9SharedClassCacheDescriptor for the cache484* \param[in] offset the offset to check485* \return True if offset is within the metadata section of the SCC, false otherwise486*/487virtual bool isOffsetInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset);488489/**490* \brief Helper method; used to check if a pointer is within the ROMClass section of the SCC491* \param[in] cacheDesc the J9SharedClassCacheDescriptor for the cache492* \param[in] ptr The pointer to check493* \return True if ptr is within the ROMClass section of the SCC, false otherwise494*/495virtual bool isPointerInROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr);496497/**498* \brief Helper method; used to check if an offset is within the ROMClass section of the SCC499*500* \param[in] cacheDesc the J9SharedClassCacheDescriptor for the cache501* \param[in] offset the offset to check502* \return True if offset is within the ROMClass section of the SCC, false otherwise503*/504virtual bool isOffsetinROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset);505506/**507* \brief Gets the cached result of a prior class chain validation508*509* \param[in] clazz The class to be validated510*511* \return The cached CCVResult; CCVResult::notYetValidated if result does not exist.512*/513const CCVResult getCachedCCVResult(TR_OpaqueClassBlock *clazz);514515/**516* \brief Caches the result of a class chain validation517*518* \param[in] clazz The class to be validated519* \param[in] result The result represented as a CCVResult520*521* \return The result of the insertion522*/523bool cacheCCVResult(TR_OpaqueClassBlock *clazz, CCVResult result);524525uint16_t _initialHintSCount;526uint16_t _hintsEnabledMask;527528J9JavaVM *_javaVM;529J9JITConfig *_jitConfig;530TR_J9VMBase *_fe;531TR::CompilationInfo *_compInfo;532533TR_AOTStats *_aotStats;534J9SharedClassConfig *_sharedCacheConfig;535UDATA _numDigitsForCacheOffsets;536537uint32_t _logLevel;538bool _verboseHints;539540static TR_J9SharedCacheDisabledReason _sharedCacheState;541static TR_YesNoMaybe _sharedCacheDisabledBecauseFull;542static UDATA _storeSharedDataFailedLength;543};544545546#if defined(J9VM_OPT_JITSERVER)547/**548* \class TR_J9JITServerSharedCache549* \brief Class used by JITServer for querying client-side SharedCache information550*551* This class is an extension of the TR_J9SharedCache class which overrides a number552* of TR_J9SharedCache's APIs. TR_J9JITServerSharedCache is used by JITServer and553* the overridden APIs mostly send remote messages to JITClient to query information from554* the TR_J9SharedCache on the client. The information is needed for JITServer to555* compile code that is compatible with the client-side VM. To minimize the556* number of remote messages as a way to optimize JITServer performance, a557* lot of client-side TR_J9SharedCache information are cached on JITServer.558*/559560class TR_J9JITServerSharedCache : public TR_J9SharedCache561{562public:563TR_ALLOC(TR_Memory::SharedCache)564565TR_J9JITServerSharedCache(TR_J9VMBase *fe);566567virtual bool isHint(TR_ResolvedMethod *, TR_SharedCacheHint, uint16_t *dataField = NULL) override { TR_ASSERT_FATAL(false, "called"); return false;}568virtual bool isHint(J9Method *, TR_SharedCacheHint, uint16_t *dataField = NULL) override { TR_ASSERT_FATAL(false, "called"); return false;}569virtual uint16_t getAllEnabledHints(J9Method *method) override { TR_ASSERT_FATAL(false, "called"); return 0;}570virtual void addHint(J9Method *, TR_SharedCacheHint) override;571virtual bool isMostlyFull() override { TR_ASSERT_FATAL(false, "called"); return false;}572573virtual uintptr_t *rememberClass(J9Class *clazz, const AOTCacheClassChainRecord **classChainRecord = NULL,574bool create = true) override;575576virtual UDATA rememberDebugCounterName(const char *name) override { TR_ASSERT_FATAL(false, "called"); return 0;}577virtual const char *getDebugCounterName(UDATA offset) override { TR_ASSERT_FATAL(false, "called"); return NULL;}578579virtual bool classMatchesCachedVersion(J9Class *clazz, UDATA *chainData=NULL) override { TR_ASSERT_FATAL(false, "called"); return false;}580581virtual TR_OpaqueClassBlock *lookupClassFromChainAndLoader(uintptr_t *chainData, void *classLoader) override { TR_ASSERT_FATAL(false, "called"); return NULL;}582583static void setSharedCacheDisabledReason(TR_J9SharedCacheDisabledReason state) { TR_ASSERT_FATAL(false, "called"); }584static TR_J9SharedCacheDisabledReason getSharedCacheDisabledReason() { TR_ASSERT_FATAL(false, "called"); return TR_J9SharedCache::TR_J9SharedCacheDisabledReason::UNINITIALIZED;}585static TR_YesNoMaybe isSharedCacheDisabledBecauseFull(TR::CompilationInfo *compInfo) { TR_ASSERT_FATAL(false, "called"); return TR_no;}586static void setStoreSharedDataFailedLength(UDATA length) { TR_ASSERT_FATAL(false, "called"); }587588virtual uintptr_t getClassChainOffsetIdentifyingLoader(TR_OpaqueClassBlock *clazz, uintptr_t **classChain = NULL) override;589590virtual J9SharedClassCacheDescriptor *getCacheDescriptorList();591592void setStream(JITServer::ServerStream *stream) { _stream = stream; }593virtual const void *storeSharedData(J9VMThread *vmThread, char *key, J9SharedDataDescriptor *descriptor);594595private:596597virtual bool isPointerInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr)598{599return isPointerInCache(cacheDesc, ptr);600}601virtual bool isOffsetInMetadataSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset)602{603return (isOffsetFromEnd(offset) && isOffsetInCache(cacheDesc, offset));604}605virtual bool isPointerInROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, void *ptr)606{607return isPointerInCache(cacheDesc, ptr);608}609virtual bool isOffsetinROMClassesSectionInCache(const J9SharedClassCacheDescriptor *cacheDesc, uintptr_t offset)610{611return (isOffsetFromStart(offset) && isOffsetInCache(cacheDesc, offset));612}613614JITServer::ServerStream *_stream;615};616#endif /* defined(J9VM_OPT_JITSERVER) */617618#endif619620621