RFR: 8207057: No debug info for assembler files
Erik Joelsson
erik.joelsson at oracle.com
Fri Jul 13 13:57:09 UTC 2018
This looks good. I checked on my mac and it seems you can safely add -g
for clang as well. For Solaris I can't find any reasonable flag, so ok
to leave it. For windows it's not relevant at this point since we don't
have any assembly AFAIK.
/Erik
On 2018-07-13 01:46, Severin Gehwolf wrote:
> On Fri, 2018-07-13 at 09:29 +0200, Severin Gehwolf wrote:
>> Hi Erik,
>>
>> Thanks for the review!
>>
>> On Thu, 2018-07-12 at 09:47 -0700, Erik Joelsson wrote:
>>> Hello Severin,
>>> From looking at your jdk-submit job I can already say that it's not working on Solaris:
>>> jib > /bin/as: error: unknown option 'g0'
>>> jib > /bin/as: error: unknown option 'xs'
>>> jib > usage: /bin/as [-V] [-Q{y,n}] [-s]
>>> jib > [-S{a|b|c|l|A|B|C|L}] [-hwcap={1|0}] [-o objfile] [-L]
>>> jib > [-P [[-Yc,path] [-Ipath] [-Dname] [-Dname=def] [-Uname]]...]
>>> jib > [-m [-Ym,path]] [-n] [-ul] [-xF]
>>> jib > [-m32] [-m64]
>>> jib > [-xarch={sparc,sparcvis,sparcvis2,sparcvis3,sparc4,sparc5,sparcfmaf,sparcima,sparcace,sparcaceplus}]
>>> jib > file.s...
>> OK. Not too surprising. Would you happen to know what those magic flags
>> for solaris should be?
>>
>>> I think we need to introduce a separate ASFLAGS_DEBUG_SYMBOLS variable for this to work.
>> I'll work on that then.
> New webrev:
> http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8207057/webrev.02/
>
> This leaves non-GCC toolchains unchanged since I don't know the
> relevant flags (if they even exist). I'd be happy to add them if
> somebody tells me what they should be.
>
> New jdk-submit job should be running too.
>
> Thanks,
> Severin
>
>>> /Erik
>>>
>>> On 2018-07-12 08:17, Severin Gehwolf wrote:
>>>> Hi,
>>>>
>>>> Could I please get a review of this build fix? The problem is that no
>>>> debug info gets ever generated for assembler files in hotspot. The
>>>> proposed fix is to generated debug info via CFLAGS_DEBUG_SYMBOLS if so
>>>> requested. For example --with-native-debug-info=none no debug info is
>>>> generated. --with-native-debug-info=internal generates it. The question
>>>> is whether the assembler will accept the same debug-info related flags
>>>> as the compiler on all supported platforms (CFLAGS_DEBUG_SYMBOLS).
>>>> Thoughts?
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8207057
>>>> webrev: http://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8207057/webrev.01/
>>>>
>>>> Testing:
>>>> - I've manually verified via gdb that relevant debug info is present.
>>>> - Currently running this through jdk-submit
>>>>
>>>> Thanks,
>>>> Severin
>>>>
>>>> PS:
>>>>
>>>> --with-native-debug-info=internal
>>>>
>>>> $ grep -in linux_x86_64.s build/linux-x86_64-normal-server-release/build.log
>>>> 3549:SetupCompileNativeFile BUILD_LIBJVM_linux_x86_64.s
>>>> 3550: [2] FILE := /disk/openjdk/upstream-sources/openjdk-head/src/hotspot/os_cpu/linux_x86/linux_x86_64.s
>>>> 15605:Compiling linux_x86_64.s (for libjvm.so)
>>>> 15607:( /usr/bin/gcc -c -m64 -g -o /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o /disk/openjdk/upstream-sources/openjdk-head/src/hotspot/os_cpu/linux_x86/linux_x86_64.s > >(/usr/bin/tee /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.log) 2> >(/usr/bin/tee /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.log >&2) || ( exitcode=$? && /usr/bin/cp /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.log /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_linux_x86_64.o.log && /usr/bin/cp /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.cmdline /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_linux_x86_64.o.cmdline && exit $exitcode ) )
>>>>
>>>> Note: -g switch is present.
>>>>
>>>> --with-native-debug-info=none
>>>>
>>>> $ grep -in linux_x86_64.s build/linux-x86_64-normal-server-release/build.log
>>>> 3549:SetupCompileNativeFile BUILD_LIBJVM_linux_x86_64.s
>>>> 3550: [2] FILE := /disk/openjdk/upstream-sources/openjdk-head/src/hotspot/os_cpu/linux_x86/linux_x86_64.s
>>>> 12499:Compiling linux_x86_64.s (for libjvm.so)
>>>> 12653:( /usr/bin/gcc -c -m64 -o /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o /disk/openjdk/upstream-sources/openjdk-head/src/hotspot/os_cpu/linux_x86/linux_x86_64.s > >(/usr/bin/tee /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.log) 2> >(/usr/bin/tee /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.log >&2) || ( exitcode=$? && /usr/bin/cp /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.log /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_linux_x86_64.o.log && /usr/bin/cp /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/linux_x86_64.o.cmdline /disk/openjdk/upstream-sources/openjdk-head/build/linux-x86_64-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_linux_x86_64.o.cmdline && exit $exitcode ) )
>>>>
>>>> Note: No -g switch present as expected.
>>>
More information about the build-dev
mailing list