Skip to content

Cherry-pick DDR changes for 0.44.0 #19217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

keithc-ca
Copy link
Contributor

For negative values, the div(), mod(), and rightShift() methods
would sometimes return bad values.

For example, -10 is represented as 0xFFFFFFF6L in the data field
of an I32 object (or in a IDATA object for 32-bit dumps).
* div(5) would return 0x33333331(858993457) instead of -2
* mod(5) would return 1 instead of 0
* rightShift(0) would return -1 instead of -10

Signed-off-by: Keith W. Campbell <[email protected]>
This updates how J9BuildFlags is generated (both as Java source and
as dynamically produced bytecode) so the cname-style names can be used
consistently.

In UMA builds where omr_ddrgen is not used, superset.dat is generated
using the raw name of each build flags rather than using the "cname"
that appears in j9cfg.h which is derived from j9cfg.h.ftl. The result
is that the blob (which is included in system dumps) speaks of flags
like "env_data64" and "opt_jvmti", for example. With this change,
flags of those names are automatically recognized as providing values
for "J9VM_ENV_DATA64" and "J9VM_OPT_JVMTI", respectively.

References to J9BuildFlags in DDR code have been updated accordingly.

Aliases for J9BuildFlags have been removed: the more general mechanism
deals with those cases now.

The entry for J9BuildFlags in CompatibilityConstants29.dat has been
removed: it had never had any effect.

The entries for J9BuildFlags in overrides-vm have been removed: they
are no longer needed. System dumps containing those names are supported
using the same mechanism that handles raw names appearing in
superset.dat (no matter whether the dump was produced by an older
Semeru build where those overrides were in effect or produced by an
IBM build.

Signed-off-by: Keith W. Campbell <[email protected]>
The test of whether a field is present must be deferred until a
specific system dump is being accessed.

Structure stubs must include all fields optional or otherwise. The
structure class generated dynamically will only include those fields
actually present in the JVM that produced the system dump. Accesses
to missing fields will trigger a NoSuchFieldError which will be
replaced by NoSuchFieldException by the related pointer class.

Pointer classes must support the scenario where a field is not present
in the executing JVM, but is present in a system dump being analyzed.

Signed-off-by: Keith W. Campbell <[email protected]>
@keithc-ca keithc-ca requested a review from pshipton March 25, 2024 22:06
@pshipton pshipton merged commit 8294c69 into eclipse-openj9:v0.44.0-release Mar 25, 2024
@keithc-ca keithc-ca deleted the ddr44 branch March 26, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants