Skip to content

Conversation

@llxia
Copy link
Owner

@llxia llxia commented Aug 13, 2020

No description provided.

llxia pushed a commit that referenced this pull request May 31, 2023
Disable CLassLookahead because it is possible for static final field
value to be changes via reflection or the unsafe API.

1. Disable ClassLookahead. Similar to GVP, ClassLookahead is using
static analysis of static final field initialization code to provide
field information that is later used to make assumptions about the
field contents which might not be true if reflection or the unsafe
API is used to change static final field values. An environment
variable is introduced to allow ClassLookahead to be re-enable.

2. Apply a fix to ClassLookahead so that it does not not generate field
information for static final fields that can be initialized with
different values on different code paths. This fix is being applied in
case the ClassLookahead code is resurrected in the future since `#1`
above has disabled it globally.

3.Remove the code in IlGen what would replace array length checks with
hard coded obj array length values. This code would look for static
final fields that contain ClassLookahead fieldInfo and use the existence
of that information to permit the inspection of a heap object and
replace array length checks with a constant based on the current heap
object's array length. This fix is also applied as a safety measure
because the disabling of ClassLookahead (`eclipse-openj9#2` above) would effectively
disable this code path.

In general the only safe way to inspect at compile time heap objects
pointed to by static final fields is to us the "Static Final Field
Folding" optimization which uses OSR to invalidate any code which made
an assumptions based on the contents of a static final field when that
fields contents may have been modified by reflection.

Signed-off-by: Kevin Langman <[email protected]>
dmitripivkine and others added 27 commits June 3, 2025 18:25
…e_RB_copy_stats

Read Barrier bytes stats
Use add() (not addU64) with uintptr_t RB counters.

Signed-off-by: Aleksandar Micic <[email protected]>
…e_getReferenceField

Delete unused JITServer message `KnownObjectTable_getReferenceField`
…e_RB_copy_stats

Match operation with the type
JDK25 adds JVM_CreateThreadSnapshot, removes isCarrierThreadLocalPresent
This change fixes a type mismatch when compiled on 32-bit.

Signed-off-by: Adrian Popescu <[email protected]>
Tracepoints don't evaluate their arguments if UT_TRACE_OVERHEAD <= 0.

Signed-off-by: Keith W. Campbell <[email protected]>
Add "if defined(J9VM_GC_SPARSE_HEAP_ALLOCATION)"
guard to the recognized call transformer for
vectorizedMismatch's offheap-exclusive code.

Signed-off-by: Luke Li <[email protected]>
…orizedMismatchFix

Add Guards to the OffHeap-exclusive Code for vectorizedMismatch Transformer
If a monitor is already detached, do not detach it again.
The detached monitor is already in enteredMonitors list.Do not modify
its J9ObjectMonitor->next which will overwrite the extsing entry.

issue eclipse-openj9#21864

Signed-off-by: Hang Shao <[email protected]>
…ngClassFromFieldOrStatic

Use the actual declaring class for static final field folding
- Use J9_LOCK_IS_FLATLOCKED macro instead of count check
- Move reserved check before setting newLockWord

Signed-off-by: Jack Lu <[email protected]>
Separate side-effects from tracepoint use
Casting to arrays was considered unlikely and therefore not fast-pathed in JITed code.
However, checkcasts of non-primitive references to j/l/O arrays should always succeed
and can be easily checked for without calling a helper.  Modify inline checkcast to
do so.

Signed-off-by: Daryl Maier <[email protected]>
…etDeclaringClassFromFieldOrStatic

Suppress getDeclaringClassFromFieldOrStatic() in JITServer non-SVM AOT
Virtual memory amount for ZOS31 is limited to 2G, Any attempt to
allocate larger memory ends in abend S878 system failure.
Too large size for -Xmx can not be calculated by default, it only can be
provided in command line option -Xmx.
So, we need to check that virtual memory request is not larger than
2047m (leave 1m for extra protection) anf fail JVM startup if it is
requested too large. Please note that real amount of the virtual memory
for allocation is much smaller than 2047m (about 1700m). An attempt to
allocate more memory leads to normal JVM startup failure. The newly
introduced error message is exactly the same as that failure message.

Signed-off-by: Dmitri Pivkine <[email protected]>
- maintain a cache of all classes that are needed for boxing and unboxing
- classes are passed to intrinsics, record location of class parameters in the table
- make sure result type of an intrinsic is stored in the table and used for boxing/unboxing
- record result type of 'compare' in the methodTable instead of the source type
…pes_pr

Box and unbox all types in VectorAPIExpansion
Do not re-detach a monitor that is already detached
setCallCount() and getCallCount() is a pair of
interpreter profiler routines used by the optimizer
indirectly to derive block frequencies.
However, block frequencies can/should be inferred solely
based on branch information provided by IProfiler.
Moreover, setcallCount() generates "artificial"
IProfiler entries based on normalized basic block
frequencies which may not be directly comparable to
raw frequencies coming from the IProfiler.

Signed-off-by: Marius <[email protected]>
This file is removed in OMR.

Signed-off-by: Spencer Comin <[email protected]>
If the operation that's being profiled is instanceof or checkcast, the
code in the quickTest block and the helper call block should test the
result of the load of the vft-symbol for profiling.  The previous change
only added the indirect load of the vft-symbol in the IL generated for
the helper call.  This change adds the missing load of the vft-symbol to
the quickTest block as well.

Signed-off-by:  Henry Zongaro <[email protected]>
0xdaryl and others added 27 commits July 9, 2025 18:49
…xOfStr

AArch64: Inline StringLatin1.indexOf([BI[BII)I
…ffHeap

AArch64: Add support for off-heap arrays in some intrinsics
The OpenXL replacement for `-fno-eliminate-unused-debug-types`
is `-qdbxextra`, but only for version 17.1 or newer.

Signed-off-by: Keith W. Campbell <[email protected]>
Update DDR compile options for OpenXL
Enable bigCallee size adjustment during ECS for JDK8 and 11
This commit reverts the inlineIntrinsicIndexOf() part of PR eclipse-openj9#22192,
due to the failure with JDK 24.

Fixes: eclipse-openj9#22205
The initialization of classObject of J9Class is done by
loadWarmClassFromSnapshot() and make initializeSnapshotClassObject()
redundant. Other modification includes if the call is failed, go to
exit or error processing.

Fixes: eclipse-openj9#22201
- Improve assert about the type of intrinsic operand
- Correct return type of Convert intrinsic since it can it be Vector or Mask
RAM Class Persistence: Remove redundant call to initializeSnapshotClassObject
Only set VirtualThread.blockPermit for a virtual thread
in the BLOCKING state when the lock is available. This
prevents virtual threads from being unblocked prematurely.

Signed-off-by: Theresa Mammarella <[email protected]>
…test

Set blockPermit for BLOCKING thread when lock is free
Check the lastITable and iTable before using interface lookup helper.
First check the lastITable if it fails, check iTable entries.
If any entry matches, calculate the entry point and jumps to the entry.
If no entry matches, calls the helper method.

Signed-off-by: Ehsan Kiani Far <[email protected]>
Previously when performing Class.isAssignableFrom, only the trivial case
of class equality was done inline and any other case relied on a callout
to a C Helper.

With this change, an inlined superclass test is added along with a
castClassCache test, avoiding the C Helper in the most common cases.

Additionally, this change checks for class depth at compile time when
possible to fast-fail when fromClassDepth <=  toClassDepth.

Signed-off-by: Matthew Hall <[email protected]>
To faciltate a non-compilation thread invoking the deserializer, which
can happen outside the context of a compilation, the APIs in the
Deserializer need to be updated to no longer require a TR::Compilation
object directly.

Signed-off-by: Irwin D'Souza <[email protected]>
…rom_genSuperclassTest

Generate inline superclass test for Class.isAssignableFrom on Z
Build 118 has been rotated out. Update to 123.

Signed-off-by: Adam Brousseau <[email protected]>
…k15_update

Bump to newer jdk24 aix build for bootjdk
Refactor the Deserializer to use a helper struct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.