8186476: Re: linux-sparc and linux-zero builds broken
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Tue Aug 29 08:46:11 UTC 2017
Hi Thomas!
Should we squash changes for linux-sparc and linux-zero into your patch?
I’m currently not at the computer, but could send them late in the afternoon when I’m back in Germany.
Adrian
> On Aug 29, 2017, at 10:25 AM, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
>
> Hi,
>
> I got the libjvm.so to build on linuxppc64 and linuxs390 (AIX builds are still running), see attached patch.
>
> @Eric: thank you for the hints!
>
> The replacements for STATIC_CAST are trivial.
> The cause for the second error (renamed function parameter) is too, but for the life of me I could not have guessed it from the error messages I get:
>
> priv/d031900/openjdk/jdk10-hs/source/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp: In instantiation of ‘D Atomic::PlatformAdd<byte_size>::add_and_fetch(I, volatile D*) const [with I = long int; D = long int; long unsigned int byte_size = 8ul]’:
> /priv/d031900/openjdk/jdk10-hs/source/hotspot/src/share/vm/runtime/atomic.hpp:430:74: required from ‘D Atomic::AddAndFetch<Derived>::operator()(I, volatile D*) const [with I = long int; D = long int; Derived = Atomic::PlatformAdd<8ul>]’
> /priv/d031900/openjdk/jdk10-hs/source/hotspot/src/share/vm/runtime/atomic.hpp:367:49: required from ‘D Atomic::AddImpl<I, D, typename EnableIf<(((IsIntegral<T>::value && IsIntegral<U>::value) && (sizeof (I) <= sizeof (D))) && (IsSigned<T>::value == IsSigned<D>::value))
> >::type>::operator()(I, volatile D*) const [with I = long int; D = long int; typename EnableIf<(((IsIntegral<T>::value && IsIntegral<U>::value) && (sizeof (I) <= sizeof (D))) && (IsSigned<T>::value == IsSigned<D>::value))>::type = void]’
> /priv/d031900/openjdk/jdk10-hs/source/hotspot/src/share/vm/runtime/atomic.hpp:353:41: required from ‘static D Atomic::add(I, volatile D*) [with I = long int; D = long int]’
> /priv/d031900/openjdk/jdk10-hs/source/hotspot/src/share/vm/runtime/atomic.hpp:93:31: required from here
> /priv/d031900/openjdk/jdk10-hs/source/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp:173:6: error: insufficient contextual information to determine type
> );
> ^
>
> I think this is a bit of a step backward in terms of maintainability. While I see the increased ease of use for the callers of Atomic, I am not yet convinced introducing template metaprogramming is worth the time it takes to figure out these kind of errors. We do not have many developers versed in C++ metaprogramming (which, as a skill set, does not necessarily intersect with low level system programming).
>
> Sorry for the rant, and thanks again for the help in figuring this out!
>
> Kind Regards, Thomas
>
>
>> On Tue, Aug 29, 2017 at 9:01 AM, Erik Österlund <erik.osterlund at oracle.com> wrote:
>> Hi,
>>
>> First of all, sorry for pushing the change that broke these platforms. I did not spot these problems in Kim's patch, and could not test the code on these platforms.
>> As for what is wrong here, it looks like s/STATIC_CAST/STATIC_ASSERT/g is one of the problems as you noticed, and the local variables have seemingly also been renamed. In particular, it looks like the inline assembly references the variable "inc" that looks like it has been renamed "add_value".
>>
>> Sorry about the inconvenience.
>>
>> Thanks,
>> /Erik
>>
>>
>>> On 2017-08-29 00:24, John Paul Adrian Glaubitz wrote:
>>> After regexp-replacing STATIC_CAST with STATIC_ASSERT, I'm confronted with:
>>>
>>> /home/glaubitz/hs/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp: In instantiation of 'D Atomic::PlatformAdd<byte_size>::add_and_fetch(I, volatile D*)
>>> const [with I = int; D = int; long unsigned int byte_size = 4]':
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:430:74: required from 'D Atomic::AddAndFetch<Derived>::operator()(I, volatile D*) const [with I =
>>> int; D = int; Derived = Atomic::PlatformAdd<4>]'
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:367:36: required from 'D Atomic::AddImpl<I, D, typename EnableIf<(((IsIntegral<T>::value &&
>>> IsIntegral<U>::value) && (sizeof (I) <= sizeof (D))) && (IsSigned<T>::value == IsSigned<D>::value))>::type>::operator()(I, volatile D*) const [with I = int; D =
>>> int; typename EnableIf<(((IsIntegral<T>::value && IsIntegral<U>::value) && (sizeof (I) <= sizeof (D))) && (IsSigned<T>::value == IsSigned<D>::value))>::type =
>>> void]'
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:353:25: required from 'static D Atomic::add(I, volatile D*) [with I = int; D = int]'
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:405:73: required from here
>>> /home/glaubitz/hs/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp:122:6: error: insufficient contextual information to determine type
>>> );
>>> ^
>>> /home/glaubitz/hs/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp:137:6: error: insufficient contextual information to determine type
>>> );
>>> ^
>>> /home/glaubitz/hs/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp: In instantiation of 'D Atomic::PlatformAdd<byte_size>::add_and_fetch(I, volatile D*)
>>> const [with I = long unsigned int; D = long unsigned int; long unsigned int byte_size = 8]':
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:430:74: required from 'D Atomic::AddAndFetch<Derived>::operator()(I, volatile D*) const [with I =
>>> long unsigned int; D = long unsigned int; Derived = Atomic::PlatformAdd<8>]'
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:367:36: required from 'D Atomic::AddImpl<I, D, typename EnableIf<(((IsIntegral<T>::value &&
>>> IsIntegral<U>::value) && (sizeof (I) <= sizeof (D))) && (IsSigned<T>::value == IsSigned<D>::value))>::type>::operator()(I, volatile D*) const [with I = long
>>> unsigned int; D = long unsigned int; typename EnableIf<(((IsIntegral<T>::value && IsIntegral<U>::value) && (sizeof (I) <= sizeof (D))) && (IsSigned<T>::value ==
>>> IsSigned<D>::value))>::type = void]'
>>> /home/glaubitz/hs/hotspot/src/share/vm/runtime/atomic.hpp:353:25: required from 'static D Atomic::add(I, volatile D*) [with I = long unsigned int; D = long
>>> unsigned int]'
>>> /home/glaubitz/hs/hotspot/src/share/vm/services/mallocTracker.hpp:58:29: required from here
>>> /home/glaubitz/hs/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp:173:6: error: insufficient contextual information to determine type
>>> );
>>> ^
>>> /home/glaubitz/hs/hotspot/src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp:188:6: error: insufficient contextual information to determine type
>>> );
>>> ^
>>> lib/CompileJvm.gmk:208: recipe for target '/home/glaubitz/hs/build/linux-s390x-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o' failed
>>> make[3]: *** [/home/glaubitz/hs/build/linux-s390x-normal-server-release/hotspot/variant-server/libjvm/objs/abstractCompiler.o] Error 1
>>> make[3]: Leaving directory '/home/glaubitz/hs/hotspot/make'
>>> make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
>>> make[2]: *** [hotspot-server-libs] Error 2
>>> make[2]: *** Waiting for unfinished jobs....
>>> /usr/lib/jvm/java-8-openjdk-s390x/bin/java -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 -Duser.language=en -Duser.country=US -cp
>>> /home/glaubitz/hs/build/linux-s390x-normal-server-release/buildtools/jdk_tools_classes build.tools.charsetmapping.Main
>>> /home/glaubitz/hs/jdk/make/data/charsetmapping /home/glaubitz/hs/build/linux-s390x-normal-server-release/support/gensrc/jdk.charsets/sun/nio/cs/ext hkscs
>>> '/home/glaubitz/hs/jdk/make/src/classes/build/tools/charsetmapping/HKSCS.java'
>>> Generating jdk.charsets euctw
>>> /usr/bin/touch '/home/glaubitz/hs/build/linux-s390x-normal-server-release/support/gensrc/jdk.charsets/sun/nio/cs/ext/_the.charsetmapping-hkscs'
>>> /usr/lib/jvm/java-8-openjdk-s390x/bin/java -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 -Duser.language=en -Duser.country=US -cp
>>> /home/glaubitz/hs/build/linux-s390x-normal-server-release/buildtools/jdk_tools_classes build.tools.charsetmapping.Main
>>> /home/glaubitz/hs/jdk/make/data/charsetmapping /home/glaubitz/hs/build/linux-s390x-normal-server-release/support/gensrc/jdk.charsets/sun/nio/cs/ext euctw
>>> '/home/glaubitz/hs/jdk/make/src/classes/build/tools/charsetmapping/EUC_TW.java'
>>> Generating support/gensrc/jdk.charsets/sun/nio/cs/ext/sjis0213.dat
>>> /usr/bin/touch '/home/glaubitz/hs/build/linux-s390x-normal-server-release/support/gensrc/jdk.charsets/sun/nio/cs/ext/_the.charsetmapping-euctw'
>>> /usr/lib/jvm/java-8-openjdk-s390x/bin/java -XX:+UseSerialGC -Xms32M -Xmx512M -XX:TieredStopAtLevel=1 -Duser.language=en -Duser.country=US -cp
>>> /home/glaubitz/hs/build/linux-s390x-normal-server-release/buildtools/jdk_tools_classes build.tools.charsetmapping.Main
>>> '/home/glaubitz/hs/jdk/make/data/charsetmapping/sjis0213.map'
>>> '/home/glaubitz/hs/build/linux-s390x-normal-server-release/support/gensrc/jdk.charsets/sun/nio/cs/ext/sjis0213.dat' sjis0213
>>>
>>> I have been looking at the code for over half an hour but I couldn't find the actual problem.
>>>
>>> Anyone got an idea?
>>>
>>
>
> <diff.txt>
More information about the hotspot-dev
mailing list