RFR (M): 8188224: Generalize Atomic::load/store to use templates

David Holmes david.holmes at oracle.com
Sat Nov 11 03:30:10 UTC 2017


Hi Mikael,

On 11/11/2017 10:59 AM, Michael Dardis wrote:
> Hi David,
> 
> Unfortunately I'm using VS2017 for a couple of reasons (64bit compiler 
> in community edition, improved UWP support). Everything else works fine 
> with a couple of very minor tweaks, but I'm having real trouble trying 
> to deal with the templates here and figure out what's missing.

I've cc'd our C++ guru Kim Barrett.

> Understand it's not a supported platform, but maybe someone has 
> encountered this or has a hunch as to where the compiler is going wrong 
> in the new templates. Going to have to update eventually and I think 
> with the push for more open involvement in OpenJDK having at least the 
> ability to build on more setups and compilers is a good thing.

Well you just joined the trailblazers in that department :)

Cheers,
David

> Thanks
> Michael
> 
> 
> On 11 Nov. 2017 11:02, "David Holmes" <david.holmes at oracle.com 
> <mailto:david.holmes at oracle.com>> wrote:
> 
>     Hi Michael,
> 
> 
>     On 11/11/2017 7:30 AM, Michael Dardis wrote:
> 
>         Hi Erik et al,
> 
>         Since this commit I am having trouble building the project on 64 bit
>         Windows (though Linux works fine).
>         I was wondering whether anyone else has experienced this issue,
>         or on the
>         contrary whether someone can report a success.
> 
> 
>     We have no problems building on any of our supported platforms. :)
> 
>     What version of Visual Studio are you using? The supported build
>     version is still VS2013-SP4 [1]
> 
>     David
> 
>     [1]
>     https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms <https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms>
> 
> 
>         The revision immediately preceding this builds fine, but the
>         current tip
>         does not.
>         I have copied the relevant error below - looks like a missing
>         implementation of 8 byte atomic store, but I cannot work the
>         template magic
>         to figure out if it really is missing or something else is going on.
> 
>         Thanks
>         Michael
> 
> 
> 
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [*** [lib/CompileGtest.gmk:67:
>         /cygdrive/c/openjdk/OpenJDK/build/windows-x86_64-normal-server-release/hotspot/variant-server/libjvm/gtest/objs/BUILD_GTEST_LIBJVM_pch.obj]
>         Error 1
> 
>         T=ClassPathEntry *,
>         D=ClassPathEntry *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with [make/Main.gmk:268: hotspot-server-libs] Error 2
> 
>         [*** Waiting for unfinished jobs....
> 
>         T=ClassPathEntry *,
>         D=ClassPathEntry *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\classfile/classLoader.hpp(55):
>         note:
>         see reference to function template instantiation 'void
>         OrderAccess::release_store<ClassPathEntry*,ClassPathEntry*>(volatile
>         D
>         *,T)' being compiled
>         with
>         [
>         D=ClassPathEntry *,
>         T=ClassPathEntry *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=MethodData *,
>         D=MethodData *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=MethodData *,
>         D=MethodData *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\oops/method.hpp(340): note: see
>         reference to function template instantiation 'void
>         OrderAccess::release_store<MethodData*,MethodData*>(volatile D
>         *,T)' being
>         compiled
>         with
>         [
>         D=MethodData *,
>         T=MethodData *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=ExceptionCache *,
>         D=ExceptionCache *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=ExceptionCache *,
>         D=ExceptionCache *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\code/compiledMethod.hpp(291):
>         note:
>         see reference to function template instantiation 'void
>         OrderAccess::release_store<ExceptionCache*,ExceptionCache*>(volatile
>         D
>         *,T)' being compiled
>         with
>         [
>         D=ExceptionCache *,
>         T=ExceptionCache *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=markOop,
>         D=markOop
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=markOop,
>         D=markOop
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\oops/oop.inline.hpp(93):
>         note: see
>         reference to function template instantiation 'void
>         OrderAccess::release_store<markOop,markOop>(volatile D *,T)'
>         being compiled
>         with
>         [
>         D=markOop,
>         T=markOop
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=Klass *,
>         D=Klass *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=Klass *,
>         D=Klass *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\oops/oop.inline.hpp(164):
>         note: see
>         reference to function template instantiation 'void
>         OrderAccess::release_store<Klass*,Klass*>(volatile D *,T)' being
>         compiled
>         with
>         [
>         D=Klass *,
>         T=Klass *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=oop,
>         D=oop
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=oop,
>         D=oop
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\oops/oop.inline.hpp(364):
>         note: see
>         reference to function template instantiation 'void
>         OrderAccess::release_store<oop,oop>(volatile D *,T)' being compiled
>         with
>         [
>         D=oop,
>         T=oop
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=Metadata *,
>         D=Metadata *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=Metadata *,
>         D=Metadata *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\oops/oop.inline.hpp(454):
>         note: see
>         reference to function template instantiation 'void
>         OrderAccess::release_store<Metadata*,Metadata*>(volatile D *,T)'
>         being
>         compiled
>         with
>         [
>         D=Metadata *,
>         T=Metadata *
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         error C2027: use of undefined type
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=address,
>         D=address
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\runtime/orderAccess.inline.hpp(59):
>         note: see declaration of
>         'Atomic::StoreImpl<T,D,OrderAccess::PlatformOrderedStore<8,RELEASE_X>,void>'
>         with
>         [
>         T=address,
>         D=address
>         ]
>         c:\openjdk\OpenJDK\src\hotspot\share\oops/oop.inline.hpp(522):
>         note: see
>         reference to function template instantiation 'void
>         OrderAccess::release_store<address,address>(volatile D *,T)'
>         being compiled
>         with
>         [
>         D=address,
>         T=address
>         ]
> 
> 


More information about the hotspot-dev mailing list