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

Generate separate debug info for JIT prod builds on Linux #8686

Merged

Conversation

ymanton
Copy link
Member

@ymanton ymanton commented Feb 28, 2020

We strip prod builds by default and there's no way to disable it without editing makefiles. This allows one to set SOLIB_STRIP in their env or pass it to make to disable this.

@ymanton ymanton force-pushed the jit-symbol-stripping-allow-override branch 2 times, most recently from 50eac39 to 7805839 Compare February 28, 2020 17:55
@ymanton
Copy link
Member Author

ymanton commented Feb 28, 2020

Jenkins test sanity xlinux,plinux,zlinux,alinux64 jdk8

@pshipton
Copy link
Member

@keithc-ca fyi

@keithc-ca
Copy link
Contributor

I'm not fond of environment variables affecting builds in ways like this. I think the jit artifacts should be built like the rest of the VM:

ld -o $@ ...
objcopy --only-keep-debug $@ $@.dbg
objcopy --strip-debug $@
objcopy --add-gnu-debuglink=$@.dbg $@

(with appropriate adjustments for the toolchain or platform)

@keithc-ca
Copy link
Contributor

Following the pattern used throughout the rest of the VM also means JIT symbols would be included in a 'debug-image' which is available from jenkins builds.

See:

@ymanton ymanton force-pushed the jit-symbol-stripping-allow-override branch 3 times, most recently from 7a0e2df to 3e2b535 Compare February 28, 2020 22:29
@ymanton
Copy link
Member Author

ymanton commented Feb 28, 2020

That's a better idea indeed. Thanks.

@ymanton ymanton force-pushed the jit-symbol-stripping-allow-override branch from 3e2b535 to 33fc85a Compare February 28, 2020 22:35
@ymanton
Copy link
Member Author

ymanton commented Feb 28, 2020

Jenkins test sanity all jdk8

@ymanton ymanton changed the title Allow user to override JIT prod build stripping Generate separate debug info for JIT prod builds on Linux Feb 28, 2020
@keithc-ca
Copy link
Contributor

Once #8693 is merged, the filename should be libj9jit29.debuginfo instead
of libj9jit29.so.dbg else it will be ignored by the make rules in the extension repos.

Also note that on OSX, you want to use the command

dsymutil -o $@.dSYM $@

to yield the folder libj9jit29.dylib.dSYM/.

JITServer defines SOLINK_SLINK_STATIC elsewhere as a list of statically
linked libs, but it is otherwise blank, so there's no harm in adding it
to the linker command line.

Signed-off-by: Younes Manton <ymanton@ca.ibm.com>
On Linux and OSX, rather than stripping debug info at link time for
JIT prod builds, generate a separate artifact like other VM modules
do.

Signed-off-by: Younes Manton <ymanton@ca.ibm.com>
@ymanton ymanton force-pushed the jit-symbol-stripping-allow-override branch from 33fc85a to 6b453e3 Compare March 2, 2020 03:19
@ymanton
Copy link
Member Author

ymanton commented Mar 2, 2020

Suggestions implemented. Generates libj9jit29.debuginfo on Linux, libj9jit29.dylib.dSYM/ on OSX. Unneeded lines removed.

@keithc-ca
Copy link
Contributor

Jenkins test sanity all jdk8

@ymanton
Copy link
Member Author

ymanton commented Mar 3, 2020

The only test failure is #6361.

not ok 63 - cmdLineTester_loopReduction_0
  ---
    output:
      |
        ===============================================
        Running test cmdLineTester_loopReduction_0 ...
        ===============================================
        cmdLineTester_loopReduction_0 Start Time: Mon Mar  2 13:04:18 2020 Epoch Time (ms): 1583172258435
        variation: -Xjit -Xdump:java
        JVM_OPTIONS: -Xcompressedrefs -Xjit -Xdump:java
        *** Starting test suite: loopReduction ***
        Testing: default -verify
        Test start time: 2020/03/02 13:04:18 Eastern Standard Time
        Running command: "/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_Personal/openjdkbinary/j2sdk-image/bin/java" -Xcompressedrefs -Xjit -Xdump:java  -cp "/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_Personal/openjdk-tests/TKG/../../jvmtest/TestConfig/resources:/Users/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_mac_Personal/openjdk-tests/TKG/../../jvmtest/functional/JIT_Test/jitt.jar" jit.test.loopReduction.Main -verify
        Time spent starting: 40 milliseconds
        Time spent executing: 39733 milliseconds
        Test result: PASSED


        ---TEST RESULTS---
        Number of PASSED tests: 1 out of 1
        Number of FAILED tests: 0 out of 1

        cmdLineTester_loopReduction_0_FAILED
    duration_ms: 40550
  ...

@keithc-ca keithc-ca self-assigned this Mar 3, 2020
@keithc-ca keithc-ca merged commit 381eb77 into eclipse-openj9:master Mar 3, 2020
@knn-k
Copy link
Contributor

knn-k commented Mar 4, 2020

I am seeing the following error in a cross-build environment for aarch64 Linux. Other shared libraries, such as libj9prt29.so, uses aarch64-linux-gnu-objcopy as expected.

objcopy --only-keep-debug /root/openj9-openjdk-jdk11/build/linux-aarch64-normal-server-release/vm/compiler/../libj9jit29.so /root/openj9-openjdk-jdk11/build/linux-aarch64-normal-server-release/vm/compiler/../libj9jit29.debuginfo
objcopy: Unable to recognise the format of the input file `/root/openj9-openjdk-jdk11/build/linux-aarch64-normal-server-release/vm/compiler/../libj9jit29.so'

It works fine with native builds on aarch64 Linux.

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.

4 participants