Skip to content

Commit

Permalink
Merge pull request #17413 from hangshao0/valueObject
Browse files Browse the repository at this point in the history
Add areFlattenableValueTypesEnabled() for JIT
tajila authored May 17, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 22b17b8 + a16e04a commit 3fbe09e
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/oti/j9nonbuilder.h
Original file line number Diff line number Diff line change
@@ -4956,6 +4956,7 @@ typedef struct J9InternalVMFunctions {
void ( *setNestmatesError)(struct J9VMThread *vmThread, struct J9Class *nestMember, struct J9Class *nestHost, IDATA errorCode);
#endif /* JAVA_SPEC_VERSION >= 11 */
BOOLEAN ( *areValueTypesEnabled)(struct J9JavaVM *vm);
BOOLEAN ( *areFlattenableValueTypesEnabled)(struct J9JavaVM *vm);
J9Class* ( *peekClassHashTable)(struct J9VMThread* currentThread, J9ClassLoader* classLoader, U_8* className, UDATA classNameLength);
#if defined(J9VM_OPT_JITSERVER)
BOOLEAN ( *isJITServerEnabled )(struct J9JavaVM *vm);
8 changes: 8 additions & 0 deletions runtime/oti/vm_api.h
Original file line number Diff line number Diff line change
@@ -1665,6 +1665,14 @@ printBytecodePairs(J9JavaVM *vm);
BOOLEAN
areValueTypesEnabled(J9JavaVM *vm);

/**
* @brief Queries whether flattenable valueTypes are enable on the JVM
* @param vm A handle to the J9JavaVM
* @return TRUE if flattenable valueTypes are enabled, FALSE otherwise
*/
BOOLEAN
areFlattenableValueTypesEnabled(J9JavaVM *vm);

/**
* Checks if args in specified args array have been consumed by the JVM, if not it outputs a warning message
* and returns FALSE. This function consults the -XXvm:ignoreUnrecognized, -XX:[+|-]IgnoreUnrecognizedVMOptions
10 changes: 10 additions & 0 deletions runtime/vm/ValueTypeHelpers.cpp
Original file line number Diff line number Diff line change
@@ -253,6 +253,16 @@ areValueTypesEnabled(J9JavaVM *vm)
#endif /* defined(J9VM_OPT_VALHALLA_VALUE_TYPES) */
}

BOOLEAN
areFlattenableValueTypesEnabled(J9JavaVM *vm)
{
#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES)
return TRUE;
#else /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
return FALSE;
#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */
}

j9object_t*
getDefaultValueSlotAddress(J9Class* clazz)
{
1 change: 1 addition & 0 deletions runtime/vm/intfunc.c
Original file line number Diff line number Diff line change
@@ -374,6 +374,7 @@ J9InternalVMFunctions J9InternalFunctions = {
setNestmatesError,
#endif /* JAVA_SPEC_VERSION >= 11 */
areValueTypesEnabled,
areFlattenableValueTypesEnabled,
peekClassHashTable,
#if defined(J9VM_OPT_JITSERVER)
isJITServerEnabled,

0 comments on commit 3fbe09e

Please sign in to comment.