# HG changeset patch # User Yasumasa Suenaga # Date 1403103696 -32400 # Node ID a3d52921b48fb5756a646073c17a6fe767f3a67d # Parent 51762fe6dc8e3d0cf2c175821bbfccbbb76ce3a9 Bug 1683: HeapStats agent should be adapted to JDK-8027746 reviewed-by: ykubota diff -r 51762fe6dc8e -r a3d52921b48f agent/ChangeLog --- a/agent/ChangeLog Tue Jun 17 23:22:44 2014 +0900 +++ b/agent/ChangeLog Thu Jun 19 00:01:36 2014 +0900 @@ -1,3 +1,7 @@ +2014-06-18 Yasumasa Suenaga + + * Bug 1683: HeapStats agent should be adapted to JDK-8027746 + 2014-06-17 Yasumasa Suenaga * Bug 1844: Agent should be adapted new HotSpot versioning: JDK-8030011 diff -r 51762fe6dc8e -r a3d52921b48f agent/src/oopUtil.cpp --- a/agent/src/oopUtil.cpp Tue Jun 17 23:22:44 2014 +0900 +++ b/agent/src/oopUtil.cpp Thu Jun 19 00:01:36 2014 +0900 @@ -109,7 +109,9 @@ * \brief Select override function information macro. */ #define SELECT_HOOK_FUNCS(prefix) \ - if (enableCR8000213) { \ + if (enableCR8027746) { \ + prefix##_hook = CR8027746_##prefix##_hook; \ + } else if (enableCR8000213) { \ prefix##_hook = CR8000213_##prefix##_hook; \ } else if (enableCR6964458) { \ prefix##_hook = CR6964458_##prefix##_hook; \ @@ -542,6 +544,12 @@ }; /*! + * \brief Pointer of hook information on parallelGC for after CR8027746. + * (no change) + */ +#define CR8027746_par_hook CR8000213_par_hook + +/*! * \brief Pointer of hook information on parallelGC. */ THookFunctionInfo *par_hook = NULL; @@ -616,6 +624,12 @@ }; /*! + * \brief Pointer of hook information on parallelOldGC for after CR8027746. + * (no change) + */ +#define CR8027746_parOld_hook CR8000213_parOld_hook + +/*! * \brief Pointer of hook information on parallelGC. */ THookFunctionInfo *parOld_hook = NULL; @@ -705,6 +719,12 @@ }; /*! +* \brief Pointer of hook information on CMSGC for after CR8027746. +* (no change) +*/ +#define CR8027746_cms_new_hook CR8000213_cms_new_hook + +/*! * \brief Pointer of hook information on parallelGC. */ THookFunctionInfo *cms_new_hook = NULL; @@ -812,6 +832,40 @@ }; /*! + * \brief Pointer of hook information on G1GC for after CR8027746. + */ +THookFunctionInfo CR8027746_g1_hook[] = { + HOOK_FUNC("_ZTV16G1ParCopyClosureIL9G1Barrier0ELb1EE", + "_ZN16G1ParCopyClosureIL9G1Barrier0ELb1EE6do_oopEPP7oopDesc", + &g1_override_func_0, NULL), + HOOK_FUNC("_ZTV16G1ParCopyClosureIL9G1Barrier0ELb1EE", + "_ZN16G1ParCopyClosureIL9G1Barrier0ELb1EE6do_oopEPj", + &g1_override_func_1, NULL), + HOOK_FUNC("_ZTV13InstanceKlass", + "_ZN13InstanceKlass18oop_oop_iterate_nvEP7oopDescP23G1RootRegionScanClosure", + &g1_override_func_2, NULL), + HOOK_FUNC("_ZTV13ObjArrayKlass", + "_ZN13ObjArrayKlass18oop_oop_iterate_nvEP7oopDescP23G1RootRegionScanClosure", + &g1_override_func_3, NULL), + HOOK_FUNC("_ZTV16InstanceRefKlass", + "_ZN16InstanceRefKlass18oop_oop_iterate_nvEP7oopDescP23G1RootRegionScanClosure", + &g1_override_func_4, NULL), + HOOK_FUNC("_ZTV13InstanceKlass", + "_ZN13InstanceKlass18oop_oop_iterate_nvEP7oopDescP14G1CMOopClosure", + &g1_override_func_5, NULL), + HOOK_FUNC("_ZTV13ObjArrayKlass", + "_ZN13ObjArrayKlass18oop_oop_iterate_nvEP7oopDescP14G1CMOopClosure", + &g1_override_func_6, NULL), + HOOK_FUNC("_ZTV14TypeArrayKlass", + "_ZN14TypeArrayKlass15oop_oop_iterateEP7oopDescP18ExtendedOopClosure", + &g1_override_func_7, NULL), + HOOK_FUNC("_ZTV16InstanceRefKlass", + "_ZN16InstanceRefKlass18oop_oop_iterate_nvEP7oopDescP14G1CMOopClosure", + &g1_override_func_8, NULL), + HOOK_FUNC_END +}; + +/*! * \brief Pointer of hook information on parallelGC. */ THookFunctionInfo *g1_hook = NULL; @@ -1033,6 +1087,14 @@ bool enableCR8000213 = false; /*! + * \brief Flag of JVM is applyed JDK-8027746.
+ * Remove do_gen_barrier template parameter in G1ParCopyClosure + * \sa https://bugs.openjdk.java.net/browse/JDK-8027746 + * \sa http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/c685ef164975 + */ +bool enableCR8027746 = false; + +/*! * \brief Flag of JVM is applyed CR#8004883.
* Decision for CR8004883: * 8004883: NPG: clean up anonymous class fix @@ -2829,6 +2891,14 @@ enableCR8000213 = (hotSpotVersion >= afterCR8000213); /* + * See JDK-8027746: + * Remove do_gen_barrier template parameter in G1ParCopyClosure + * (jdk9-b03: 1.9.0-b03) + */ + const unsigned int afterCR8027746 = 26 << 24 | 9 << 16 | 3; + enableCR8027746 = (hotSpotVersion >= afterCR8027746); + + /* * See CR8004883: * 8004883: NPG: clean up anonymous class fix */