RFR: 8186166: Generalize Atomic::cmpxchg with templates

Kim Barrett kim.barrett at oracle.com
Thu Aug 17 17:07:39 UTC 2017


> On Aug 17, 2017, at 11:26 AM, Gerard Ziemski <gerard.ziemski at oracle.com> wrote:
> 
> hi Kim,
> 
> I got this error building on Mac OS X:
> 
> /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/runtime/atomic.hpp:275:10: error: implicit instantiation of undefined template 'Atomic::CmpxchgImpl<int, signed char, signed char, void>'
> return CmpxchgImpl<T, D, U>()(exchange_value, dest, compare_value, order);
>        ^
> /Volumes/Work/bugs/0000000/jdk10/hotspot/src/closed/share/vm/jfr/jfrTaggedArtifacts.cpp:80:34: note: in instantiation of function template specialization 'Atomic::cmpxchg<int, signed char, signed char>' requested here
>   const jbyte result = Atomic::cmpxchg(current ^ flag, dest, current);
>                                ^
> /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/runtime/atomic.hpp:164:10: note: template is declared here
> struct CmpxchgImpl;
>        ^
> 1 error generated.
> lib/CompileJvm.gmk:208: recipe for target '/Volumes/Work/bugs/0000000/jdk10/build/macosx-x64/hotspot/variant-server/libjvm/objs/jfrTaggedArtifacts.o' failed
> make[3]: *** [/Volumes/Work/bugs/0000000/jdk10/build/macosx-x64/hotspot/variant-server/libjvm/objs/jfrTaggedArtifacts.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
> make[2]: *** [hotspot-server-libs] Error 2
> 
> ERROR: Build failed for target 'jdk' in configuration 'macosx-x64' (exit code 2) 
> 
> === Output from failing command(s) repeated here ===
> * For target hotspot_variant-server_libjvm_objs_jfrTaggedArtifacts.o:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/closed/share/vm/jfr/jfrTaggedArtifacts.cpp:1:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/asm/assembler.hpp:28:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/asm/codeBuffer.hpp:28:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/code/oopRecorder.hpp:28:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/memory/universe.hpp:28:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/oops/array.hpp:29:
> In file included from /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/memory/allocation.inline.hpp:28:
> /Volumes/Work/bugs/0000000/jdk10/hotspot/src/share/vm/runtime/atomic.hpp:275:10: error: implicit instantiation of undefined template 'Atomic::CmpxchgImpl<int, signed char, signed char, void>'
> return CmpxchgImpl<T, D, U>()(exchange_value, dest, compare_value, order);
>        ^
> /Volumes/Work/bugs/0000000/jdk10/hotspot/src/closed/share/vm/jfr/jfrTaggedArtifacts.cpp:80:34: note: in instantiation of function template specialization 'Atomic::cmpxchg<int, signed char, signed char>' requested here
>  ... (rest of output omitted)

Gerard - you are missing the closed part of the change.

I don’t yet know what John’s problem is, though it’s not the missing closed change, obviously.



More information about the hotspot-dev mailing list