Skip to content

Commit

Permalink
Revert "Add override to virtual methods of TR_J9SharedCache and TR_J9…
Browse files Browse the repository at this point in the history
…VMBase"

Signed-off-by: Christian Despres <[email protected]>
  • Loading branch information
cjjdespres committed Dec 2, 2024
1 parent 7576b59 commit eab3f28
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 56 deletions.
54 changes: 27 additions & 27 deletions runtime/compiler/env/J9SharedCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class TR_J9SharedCache : public TR_SharedCache
virtual uint16_t getAllEnabledHints(J9Method *method);
virtual void addHint(J9Method *, TR_SharedCacheHint);
virtual void addHint(TR_ResolvedMethod *, TR_SharedCacheHint);
virtual bool isMostlyFull() override;
virtual bool isMostlyFull();

static void validateAOTHeader(J9JITConfig *jitConfig, J9VMThread *vmThread, TR::CompilationInfo *compInfo);

Expand Down Expand Up @@ -144,7 +144,7 @@ class TR_J9SharedCache : public TR_SharedCache
* \param[in] offset The offset to convert.
* \return A pointer. Raises a fatal assertion before returning NULL if the offset is invalid.
*/
virtual void *pointerFromOffsetInSharedCache(uintptr_t offset) override;
virtual void *pointerFromOffsetInSharedCache(uintptr_t offset);

/**
* \brief Converts a pointer into the metadata section of the SCC into an offset, calculated
Expand All @@ -153,69 +153,69 @@ class TR_J9SharedCache : public TR_SharedCache
* \param[in] ptr The pointer to convert.
* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.
*/
virtual uintptr_t offsetInSharedCacheFromPointer(void *ptr) override;
virtual uintptr_t offsetInSharedCacheFromPointer(void *ptr);

/**
* \brief Converts an offset into the ROMClass section into a J9ROMClass *.
*
* \param[in] offset The offset to convert.
* \return A J9ROMClass *. Raises a fatal assertion before returning NULL if the offset is invalid.
*/
virtual J9ROMClass *romClassFromOffsetInSharedCache(uintptr_t offset) override;
virtual J9ROMClass *romClassFromOffsetInSharedCache(uintptr_t offset);

/**
* \brief Converts a J9ROMClass * pointer into the SCC into an offset.
*
* \param[in] romClass The J9ROMClass * to convert
* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.
*/
virtual uintptr_t offsetInSharedCacheFromROMClass(J9ROMClass *romClass) override;
virtual uintptr_t offsetInSharedCacheFromROMClass(J9ROMClass *romClass);

/**
* \brief Converts an offset into the ROMClass section into a J9ROMMethod *.
*
* \param[in] offset The offset to convert
* \return A J9ROMMethod *. Raises a fatal assertion before returning NULL if the offset is invalid.
*/
virtual J9ROMMethod *romMethodFromOffsetInSharedCache(uintptr_t offset) override;
virtual J9ROMMethod *romMethodFromOffsetInSharedCache(uintptr_t offset);

/**
* \brief Converts a J9ROMMethod * pointer into the SCC into an offset.
*
* \param[in] romMethod The J9ROMMethod * to convert
* \return An offset. Raises a fatal assertion before returning INVALID_ROM_METHOD_OFFSET if the pointer is invalid.
*/
virtual uintptr_t offsetInSharedCacheFromROMMethod(J9ROMMethod *romMethod) override;
virtual uintptr_t offsetInSharedCacheFromROMMethod(J9ROMMethod *romMethod);

/**
* \brief Converts an offset into the ROMClass section into a pointer.
*
* \param[in] offset The offset to convert
* \return A pointer. Raises a fatal assertion before returning NULL if the offset is invalid.
*/
virtual void *ptrToROMClassesSectionFromOffsetInSharedCache(uintptr_t offset) override;
virtual void *ptrToROMClassesSectionFromOffsetInSharedCache(uintptr_t offset);

/**
* \brief Converts a pointer into the ROM Classes section of the SCC into an offset.
*
* \param[in] ptr The pointer to convert
* \return An offset. Raises a fatal assertion before returning 0 if the pointer is invalid.
*/
virtual uintptr_t offsetInSharedCacheFromPtrToROMClassesSection(void *ptr) override;
virtual uintptr_t offsetInSharedCacheFromPtrToROMClassesSection(void *ptr);


virtual void persistIprofileInfo(TR::ResolvedMethodSymbol *, TR::Compilation *comp) override;
virtual void persistIprofileInfo(TR::ResolvedMethodSymbol *, TR_ResolvedMethod*, TR::Compilation *comp) override;
virtual void persistIprofileInfo(TR::ResolvedMethodSymbol *, TR::Compilation *comp);
virtual void persistIprofileInfo(TR::ResolvedMethodSymbol *, TR_ResolvedMethod*, TR::Compilation *comp);

static const uint32_t maxClassChainLength = 32;

virtual bool canRememberClass(TR_OpaqueClassBlock *classPtr) override
virtual bool canRememberClass(TR_OpaqueClassBlock *classPtr)
{
return rememberClass((J9Class *)classPtr, NULL, false) != TR_SharedCache::INVALID_CLASS_CHAIN_OFFSET;
}

virtual uintptr_t rememberClass(TR_OpaqueClassBlock *classPtr,
const AOTCacheClassChainRecord **classChainRecord = NULL) override
const AOTCacheClassChainRecord **classChainRecord = NULL)
{
return rememberClass((J9Class *)classPtr, classChainRecord, true);
}
Expand All @@ -227,7 +227,7 @@ class TR_J9SharedCache : public TR_SharedCache
virtual const char *getDebugCounterName(UDATA offset);

virtual bool classMatchesCachedVersion(J9Class *clazz, UDATA *chainData=NULL);
virtual bool classMatchesCachedVersion(TR_OpaqueClassBlock *classPtr, UDATA *chainData=NULL) override
virtual bool classMatchesCachedVersion(TR_OpaqueClassBlock *classPtr, UDATA *chainData=NULL)
{
return classMatchesCachedVersion((J9Class *) classPtr, chainData);
}
Expand All @@ -239,9 +239,9 @@ class TR_J9SharedCache : public TR_SharedCache
* \param[in] chainData The pointer to convert, which should have come from pointerFromOffsetInSharedCache().
* \return A pointer. Raises a fatal assertion before returning NULL if the pointer is invalid.
*/
virtual void *lookupClassLoaderAssociatedWithClassChain(void *chainData) override;
virtual void *lookupClassLoaderAssociatedWithClassChain(void *chainData);
virtual TR_OpaqueClassBlock *lookupClassFromChainAndLoader(uintptr_t *chainData, void *classLoader,
TR::Compilation *comp) override;
TR::Compilation *comp);

/**
* \brief Checks whether the specified pointer points into the metadata section
Expand All @@ -255,7 +255,7 @@ class TR_J9SharedCache : public TR_SharedCache
* the SCC.
* \return True if the pointer points into the shared cache, false otherwise.
*/
virtual bool isPointerInSharedCache(void *ptr, uintptr_t *cacheOffset = NULL) override;
virtual bool isPointerInSharedCache(void *ptr, uintptr_t *cacheOffset = NULL);

/**
* \brief Checks whether the specified offset, calculated from the end of the SCC,
Expand All @@ -267,7 +267,7 @@ class TR_J9SharedCache : public TR_SharedCache
* here. If offset is not within the shared cache this parameter is ignored.
* \return True if the offset is within the shared cache, false otherwise.
*/
virtual bool isOffsetInSharedCache(uintptr_t encoded_offset, void *ptr = NULL) override;
virtual bool isOffsetInSharedCache(uintptr_t encoded_offset, void *ptr = NULL);

/**
* \brief Checks whether the J9ROMClass underlying the given class exists in the SCC
Expand All @@ -279,7 +279,7 @@ class TR_J9SharedCache : public TR_SharedCache
* parameter is ignored.
* \return True if romClass points into the SCC, false otherwise.
*/
virtual bool isClassInSharedCache(TR_OpaqueClassBlock *clazz, uintptr_t *cacheOffset = NULL) override;
virtual bool isClassInSharedCache(TR_OpaqueClassBlock *clazz, uintptr_t *cacheOffset = NULL);
virtual bool isClassInSharedCache(J9Class *clazz, uintptr_t *cacheOffset = NULL)
{ return isClassInSharedCache(reinterpret_cast<TR_OpaqueClassBlock *>(clazz), cacheOffset); }

Expand All @@ -293,7 +293,7 @@ class TR_J9SharedCache : public TR_SharedCache
* parameter is ignored.
* \return True if romClass points into the SCC, false otherwise.
*/
virtual bool isROMClassInSharedCache(J9ROMClass *romClass, uintptr_t *cacheOffset = NULL) override;
virtual bool isROMClassInSharedCache(J9ROMClass *romClass, uintptr_t *cacheOffset = NULL);

/**
* \brief Checks whether the specified offset is within the ROMClass section
Expand All @@ -305,7 +305,7 @@ class TR_J9SharedCache : public TR_SharedCache
* here. If offset is not within the shared cache this parameter is ignored.
* \return True if the offset is within the shared cache, false otherwise.
*/
virtual bool isROMClassOffsetInSharedCache(uintptr_t offset, J9ROMClass **romClassPtr = NULL) override;
virtual bool isROMClassOffsetInSharedCache(uintptr_t offset, J9ROMClass **romClassPtr = NULL);

/**
* \brief Checks whether the persisent representation of a J9Method exists in the SCC
Expand All @@ -317,7 +317,7 @@ class TR_J9SharedCache : public TR_SharedCache
* be returned here. If it is not in the SCC, this parameter is ignored.
* \return True if the J9Method's romMethod exists in the SCC, false otherwise.
*/
virtual bool isMethodInSharedCache(TR_OpaqueMethodBlock *method, TR_OpaqueClassBlock *definingClass, uintptr_t *cacheOffset = NULL) override;
virtual bool isMethodInSharedCache(TR_OpaqueMethodBlock *method, TR_OpaqueClassBlock *definingClass, uintptr_t *cacheOffset = NULL);

/**
* \brief Checks whether the specified J9ROMMethod exists in the SCC
Expand All @@ -329,7 +329,7 @@ class TR_J9SharedCache : public TR_SharedCache
* parameter is ignored.
* \return True if romMethod points into the SCC, false otherwise.
*/
virtual bool isROMMethodInSharedCache(J9ROMMethod *romMethod, uintptr_t *cacheOffset = NULL) override;
virtual bool isROMMethodInSharedCache(J9ROMMethod *romMethod, uintptr_t *cacheOffset = NULL);

/**
* \brief Checks whether the specified offset is within the ROMClass section
Expand All @@ -340,7 +340,7 @@ class TR_J9SharedCache : public TR_SharedCache
* here. If offset is not within the shared cache this parameter is ignored.
* \return True if the offset is within the shared cache, false otherwise.
*/
virtual bool isROMMethodOffsetInSharedCache(uintptr_t offset, J9ROMMethod **romMethodPtr = NULL) override;
virtual bool isROMMethodOffsetInSharedCache(uintptr_t offset, J9ROMMethod **romMethodPtr = NULL);

/**
* \brief Checks whether the specified pointer points into the ROMClass section
Expand All @@ -353,7 +353,7 @@ class TR_J9SharedCache : public TR_SharedCache
* parameter is ignored.
* \return True if the pointer points into the shared cache, false otherwise.
*/
virtual bool isPtrToROMClassesSectionInSharedCache(void *ptr, uintptr_t *cacheOffset = NULL) override;
virtual bool isPtrToROMClassesSectionInSharedCache(void *ptr, uintptr_t *cacheOffset = NULL);

/**
* \brief Checks whether the specified offset is within the ROMClass section
Expand All @@ -365,12 +365,12 @@ class TR_J9SharedCache : public TR_SharedCache
* here. If offset is not within the shared cache this parameter is ignored.
* \return True if the offset is within the shared cache, false otherwise.
*/
virtual bool isOffsetOfPtrToROMClassesSectionInSharedCache(uintptr_t offset, void **ptr = NULL) override;
virtual bool isOffsetOfPtrToROMClassesSectionInSharedCache(uintptr_t offset, void **ptr = NULL);

J9ROMClass *startingROMClassOfClassChain(UDATA *classChain);
uintptr_t startingROMClassOffsetOfClassChain(void *chain);

virtual uintptr_t getClassChainOffsetIdentifyingLoader(TR_OpaqueClassBlock *clazz, uintptr_t **classChain = NULL) override;
virtual uintptr_t getClassChainOffsetIdentifyingLoader(TR_OpaqueClassBlock *clazz, uintptr_t **classChain = NULL);

#if defined(J9VM_OPT_JITSERVER)
/**
Expand Down
Loading

0 comments on commit eab3f28

Please sign in to comment.