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

Building DDR for AArch64 #8331

Merged
merged 1 commit into from
Mar 6, 2020
Merged

Conversation

knn-k
Copy link
Contributor

@knn-k knn-k commented Jan 17, 2020

This commit adds build configuration for DDR for AArch64.

Signed-off-by: KONNO Kazuhiro konno@jp.ibm.com

@pshipton
Copy link
Member

@keithc-ca

@keithc-ca
Copy link
Contributor

@knn-k Do you have a plan to fix OMR's ddrgen for cross-compile use-cases such as this?

@knn-k
Copy link
Contributor Author

knn-k commented Jan 21, 2020

Yes, I am trying to enable DDR in the cross compilation environment.

@keithc-ca
Copy link
Contributor

@knn-k Can you share a link to your work (a branch or a pull request) so we can follow along (and perhaps help)?

@knn-k
Copy link
Contributor Author

knn-k commented Jan 22, 2020

I have not opened PRs other than this PR and #8171 so far. I have also edited closed/autoconf/custom-hook.m4 in openj9-openjdk-jdk11 locally, adding xr64 to the list of targets for DDR.
I am seeing a problem to solve: HAVE_LIBDWARF_DWARF_H and HAVE_LIBDWARF_LIBDWARF_H are undefined in the generated omr/include_core/omrcfg.h, while libdwarf-dev is available in the cross-compile environment (See buildenv/docker/jdk11/aarch64_CC/arm-linux-aarch64/Dockerfile).

I will try building DDR in the native AArch64 environment to see what happens.

@knn-k
Copy link
Contributor Author

knn-k commented Jan 29, 2020

HAVE_LIBDWARF_DWARF_H and HAVE_LIBDWARF_LIBDWARF_H are defined in omrcfg.h as expected when I try building in the native AArch64 environment. Full build is not successful yet.

@knn-k
Copy link
Contributor Author

knn-k commented Jan 30, 2020

I see the following error during the build in the native AArch64 environment:

Generating DDR pointer class source files
superset directory name : /home/nano/openj9/openj9-openjdk-jdk11/build/linux-aarch64-normal-server-release/vm/
superset file name : superset.dat
Writing generated classes to /home/nano/openj9/openj9-openjdk-jdk11/build/linux-aarch64-normal-server-release/support/ddr/gensrc/com/ibm/j9ddr/vm29/pointer/generated
Unhandled structure type: _IO_FILEPointer->_lock _IO_lock_t*
java.lang.IllegalArgumentException: Type is not a recognized array: __int128 unsigned[]
        at com.ibm.j9ddr.tools.PointerGenerator.getArrayType(PointerGenerator.java:960)
        at com.ibm.j9ddr.tools.PointerGenerator.writeArrayMethod(PointerGenerator.java:873)
        at com.ibm.j9ddr.tools.PointerGenerator.generateImplementationMethods(PointerGenerator.java:564)
        at com.ibm.j9ddr.tools.PointerGenerator.generateClass(PointerGenerator.java:329)
        at com.ibm.j9ddr.tools.PointerGenerator.generateClasses(PointerGenerator.java:157)
        at com.ibm.j9ddr.tools.PointerGenerator.main(PointerGenerator.java:117)
Processing failed

@knn-k knn-k mentioned this pull request Jan 31, 2020
@keithc-ca
Copy link
Contributor

java.lang.IllegalArgumentException: Type is not a recognized array: __int128 unsigned[]
at com.ibm.j9ddr.tools.PointerGenerator.getArrayType(PointerGenerator.java:960)

It may make sense to add support for 128-bit scalar types, but until then, you will need to blacklist the type __int128 unsigned or apply some typeoverride to the fields using that array type.

@knn-k
Copy link
Contributor Author

knn-k commented Feb 19, 2020

@keithc-ca Thank you for your comment. What do other platforms do for adding support for new types or blacklisting types?

@keithc-ca
Copy link
Contributor

Blacklisted types are listed in [1]; you may need to blacklist the type(s) that have fields which are arrays of __int128 unsigned.

[1] https://github.com/eclipse/openj9/blob/master/runtime/ddr/blacklist

This commit adds build configuration for DDR for AArch64.

Signed-off-by: KONNO Kazuhiro <konno@jp.ibm.com>
@knn-k knn-k changed the title WIP: Building DDR for AArch64 Building DDR for AArch64 Mar 5, 2020
@knn-k
Copy link
Contributor Author

knn-k commented Mar 5, 2020

I added a line in the blacklist, and now the build in AArch64 native environment finishes successfully.
The HAVE_LIBDWARF_DWARF_H problem with cross build is not fixed yet.

Build depends on ibmruntimes/openj9-openjdk-jdk11#259 .

@0xdaryl
Copy link
Contributor

0xdaryl commented Mar 5, 2020

@keithc-ca : would you mind reviewing this please?

@keithc-ca
Copy link
Contributor

Build depends on ibmruntimes/openj9-openjdk-jdk11#259 .

I think the dependency is the reverse: enabling DDR for aarch64 by default depends on this change.

@knn-k
Copy link
Contributor Author

knn-k commented Mar 6, 2020

I wanted to say "ibmruntimes/openj9-openjdk-jdk11#259 needs to be applied for the changes in this PR to work."

@knn-k
Copy link
Contributor Author

knn-k commented Mar 6, 2020

You can use the --disable-ddr option for configure in the cross build environment, when this PR and openj9-openjdk-jdk11#259 are merged.

@keithc-ca
Copy link
Contributor

I wanted to say "ibmruntimes/openj9-openjdk-jdk11#259 needs to be applied for the changes in this PR to work."

Technically, no, this can be tested via configure --enabled-ddr ... without ibmruntimes/openj9-openjdk-jdk11#259.

@keithc-ca
Copy link
Contributor

The travis build is sufficient testing for this. Further testing can occur in ibmruntimes/openj9-openjdk-jdk11#259.

@keithc-ca keithc-ca merged commit 6c15de6 into eclipse-openj9:master Mar 6, 2020
@knn-k knn-k deleted the aarch64ddrbuild branch March 11, 2020 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants