Skip to content
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

Enable OMR's DDR support for OpenJ9 #378

Closed
DanHeidinga opened this issue Oct 18, 2017 · 20 comments
Closed

Enable OMR's DDR support for OpenJ9 #378

DanHeidinga opened this issue Oct 18, 2017 · 20 comments

Comments

@DanHeidinga
Copy link
Member

DanHeidinga commented Oct 18, 2017

The OMR project has been implementing Direct Dump Reader (DDR) support on top of libdwarf.

OpenJ9 needs to enable DDR support and ensure that the functionality in the OMR project is sufficient to provide the rich debug & introspection capabilities J9 has historically supported.

OpenJ9 issues are difficult to debug without this support.

OMR links

https://github.com/eclipse/omr/blob/f4394252018f04074cb375cbbd7f1f00f41a106c/doc/ddr.md

https://github.com/eclipse/omr/blob/f4394252018f04074cb375cbbd7f1f00f41a106c/doc/ddr/DDR.md

eclipse-omr/omr#1222

@DanHeidinga
Copy link
Member Author

This task is to drive the enablement of DDR across the OpenJ9 platforms.

@hangshao0
Copy link
Contributor

I have an impression DDR is short for "Direct Dump Reader" :-)

@deesebas
Copy link

Yeah I think it's Direct Dump Reader too. And this page title calls it "DDR: The Data Dump Reader"! :)

@keithc-ca
Copy link
Contributor

@DanHeidinga
Copy link
Member Author

Updated the description to use the correct term.

@keithc-ca
Copy link
Contributor

#432 allows blob stubs to compile cleanly if DDR is enabled (but generated blob tables are not available).

@keithc-ca
Copy link
Contributor

#461 updates the docker image descriptions in anticipation of the requirement for libdwarf-dev.

@keithc-ca
Copy link
Contributor

Generated DDR code is incomplete.

The hand-written code to support DDR should be able to make references to historical constants and features so that debugging core files produced by older JVMs is possible: the fact that #495 was needed is a sign that this is broken.

The set of types, etc. should include everything mentioned in DDR_Artifacts/supersets/29/superset.ibuild.dat.

The change for #495 should be reverted, catching NoSuchFieldError when that constant is not available at runtime.

keithc-ca added a commit to keithc-ca/openj9 that referenced this issue Jan 18, 2018
Some of the imported classes are generated - these changes
avoid needless problems that would occur in situations where
those classes are not generated by the new DDR flow (on any
given platform).

In support of issue eclipse-openj9#378.

Signed-off-by: Keith W. Campbell <[email protected]>
keithc-ca added a commit to keithc-ca/omr that referenced this issue Feb 16, 2018
* correct offsets of synthetic fields
* remove unused Field._sizeOf

Issue: eclipse-openj9/openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
keithc-ca added a commit to keithc-ca/omr that referenced this issue Feb 16, 2018
* rely on DWARF offsets which consider alignment requirements
* correct offsets of synthetic fields
* remove unused Field._sizeOf

Issue: eclipse-openj9/openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
keithc-ca added a commit to keithc-ca/openj9 that referenced this issue Feb 20, 2018
* to simplify exclusion from main builds
* adjust related eclipse launch configurations

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
@keithc-ca
Copy link
Contributor

OpenJ9 connective changes are in #1399.

@keithc-ca
Copy link
Contributor

OpenJ9 jdk8 enablement is in ibmruntimes/openj9-openjdk-jdk8#59.

@keithc-ca
Copy link
Contributor

OpenJ9 jdk9 enablement is in ibmruntimes/openj9-openjdk-jdk9#137.

@JasonFengJ9
Copy link
Member

Not sure if it is still relevant, i.e., if OpenJ9 still replies on https://github.com/eclipse/openj9/blob/master/debugtools/DDR_Artifacts/supersets/29/superset.base.dat and its superset friends?

If so, these superset files haven't been updated since switching to GIT repo. Previously, they are updated during each ibuild to capture latest changes.

@JasonFengJ9
Copy link
Member

@keithc-ca explained that OpenJ9 DDR doesn't reply on these superset files.

yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
* not all Entry objects have an associated File and so,
  can't all contribute to the classpath

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
The existing code which reflectively exports access to DDR was
written prior to the refactoring which moved java.lang.reflect.Module
to java.lang.Module.

This code doesn't have the advantage of being preprocessed and so
can't make distinctions at that time. Instead, this version attempts
to locate Module in the new package first and then falls back to
looking in the old package.

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
* declarations in stackwalk.h grouped to reduce number
  of annotations required
* also in generated constant pool
* added VMCPTool option '-verbose' (default off)

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
* to simplify exclusion from main builds
* adjust related eclipse launch configurations

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
To support use of ddrgen from OMR.

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
* adapt to lack of 'united' view of VM code
  (e.g. MM_HeapLinkedFreeHeader which has a single 64-bit _next field
  or two 32-bit fields (_next and _nextHighBits). OMR's ddrgen sees
  only one of these situations and never generates anything related
  to '_next_v1'.
* remove references to obsolete concepts that will not be output by
  new code generation flow (e.g. J9VariableInfo)
* use Long.bitCount()

Issue: eclipse-openj9#378
Signed-off-by: Keith W. Campbell <[email protected]>
@SueChaplain
Copy link
Contributor

@keithc-ca - I am preparing the release notes for 0.9.0. Looks like there is still some work to do, so please can you confirm which platforms do have / don't have DDR support enabled? Thx

@pshipton
Copy link
Member

DDR is enabled for all platforms except AIX at this time.

@keithc-ca
Copy link
Contributor

DDR is currently enabled (by default) for Linux (p,x,z) and Windows (64-bit variants).
Not AIX nor z/OS.

@pshipton
Copy link
Member

pshipton commented Sep 4, 2018

I don't think AIX support is going to be ready for the 0.10.0 release, deferring.

@pshipton
Copy link
Member

This was completed some time ago, for all platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants