<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 18, 2018, at 12:14 AM, Vladimir Kozlov <<a href="mailto:vladimir.kozlov@oracle.com" class="">vladimir.kozlov@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 7/17/18 5:17 PM, Christian Thalinger wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">On Jul 12, 2018, at 5:28 PM, Vladimir Kozlov <<a href="mailto:vladimir.kozlov@oracle.com" class="">vladimir.kozlov@oracle.com</a>> wrote:<br class=""><br class="">Including GC group since I added new method to GCConfig.<br class=""><br class=""><a href="http://cr.openjdk.java.net/~kvn/8207069/webrev.00/" class="">http://cr.openjdk.java.net/~kvn/8207069/webrev.00/</a><br class="">https://bugs.openjdk.java.net/browse/JDK-8207069<br class=""><br class="">Recent Graal's changes [1] added list of GC [2] which matches Hotspot GC list [3].<br class="">I used that to fix this issue by storing enum value from Graal in AOT config header and compare it with selected GC when AOT library is loaded into Hotspot.<br class=""></blockquote>The fix is correct but too strict.  For example, Serial and Parallel GC can use the same AOT library.  CMS too.<br class=""></blockquote><br class="">Do you have other suggestions how to check compatibility?<br class=""></div></div></blockquote><div><br class=""></div>I think the best way would be to use <span style="color: rgb(0, 97, 65); font-family: Monaco; font-size: 11px;" class="">BarrierSet</span><span style="font-family: Monaco; font-size: 11px;" class="">::Name</span>:</div><div><br class=""></div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(78, 144, 114);" class="">// Do something for each concrete barrier set part of the build.</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: #931a68" class="">#define</span> FOR_EACH_CONCRETE_BARRIER_SET_DO(f)          \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">  f(CardTableBarrierSet)                             \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">  EPSILONGC_ONLY(f(EpsilonBarrierSet))               \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">  G1GC_ONLY(f(G1BarrierSet))                         \</div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">  ZGC_ONLY(f(ZBarrierSet))</div><div class=""><br class=""></div></div><div><blockquote type="cite" class=""><div class=""><div class=""><br class="">Thanks,<br class="">Vladimir<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">I verified the fix with all GCs combination when compiling AOT lib and using it. I also ran our hs-tier1-3 testing which includes AOT and Graal tests.<br class=""><br class="">These changes are for JDK 11 so I don't need to go through Graal PR now but I would need to do that for JDK 12 to make changes in AOT code.<br class=""><br class="">Thanks,<br class="">Vladimir<br class=""><br class="">[1] <a href="https://bugs.openjdk.java.net/browse/JDK-8205824" class="">https://bugs.openjdk.java.net/browse/JDK-8205824</a><br class="">  "[GR-10514] Use whitelist for GCs supported by Graal"<br class="">[2] <a href="http://hg.openjdk.java.net/jdk/jdk11/file/bf686c47c109/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java#l137" class="">http://hg.openjdk.java.net/jdk/jdk11/file/bf686c47c109/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalRuntime.java#l137</a><br class="">[3] <a href="http://hg.openjdk.java.net/jdk/jdk11/file/bf686c47c109/src/hotspot/share/gc/shared/collectedHeap.hpp#l173" class="">http://hg.openjdk.java.net/jdk/jdk11/file/bf686c47c109/src/hotspot/share/gc/shared/collectedHeap.hpp#l173</a><br class=""></blockquote></blockquote></div></div></blockquote></div><br class=""></body></html>