changeset 2771:20d321ef9d8c

Change AArch64 HotSpot to the one from IcedTea 2.6.0pre17. * AArch64 port Use the IcedTea7 fork version rather than the one based on HotSpot 25. Add arch-specific processing of tmp1 register needed for d/f2i Add char_array_equals intrinsic Add CNEG and CNEGW to macro assembler. Add frame anchor fences. Add missing instruction synchronization barriers and cache flushes. Add some memory barriers for object creation and runtime calls. Add support for A53 multiply accumulate Add support for AES Intrinsics Add support for pipeline scheduling Add support for String.indexOf intrinsic Added make rules to allow aarch64-x86 hybrid build to progress Added missing aarch64-specific include Added missing aarch64-specific make file Added missing changes for debug code Added missing inline method Added missing shared global UseCRC32Intrinsics Added pd global UseVectoredExceptions Add local method to redirect to AbstractAssembler::relocate Add missing declarations for CRC32 methods Add missing include Add missing special case code for aarch64 Add rules to assemble .S files Add support for storing aarch64 call format Add wrapper method to avoid dependency on not yet defined code buffer class Added missing endif Allow for 0x400 aligned offsets for byte_map_base Array load must only read 32 bits A more efficient sequence for C1_MacroAssembler::float_cmp. Backout 8c8b5e62e624 and instead move .S rule from zeroshark.make to rules.make Backout additional changes made in ec6a6772fed6, which revert parts of the PPC/AIX port and IcedTea fixes. Call ICache::invalidate_range() from Relocation::pd_set_data_value(). Changed klass oop encode to heap oop encode Changed Method* to methodOop Correct assert to allow for AArch64 Correct for difference in include hierarchy Correct typos Corrected error in disassembler code Corrected include Corrected include path Corrected pipeline class for countTrailingZerosL Corrected type Corrected typo Correct includes Correct Method to methdoOopDesc Define uabs(). Use it everywhere an absolute value is wanted. Defn of BIND does not need to use __ macro Delete dead code. Disassembler library should be built as hsdis-aarch64.so Don't test arraycopy routines when using AArch64 simulator Emit_int64 is renamed Ensure byte_map_base can be loaded using adrp with no need for following ldr Ensure C1 static call stub employs absolute move to allow patching Ensure C2 static calls use correct call adddress in static stub reloc Ensure perm gen size is not rounded down to zero Ensure rmethod is reloaded from stack when interpreter makes non leaf VM call Ensure we pick up hsdis-aarch64.so if BUILTIN_SIM is true Fix couple of mistakes in generate of method handle dispatch Fix cut and paste-o in header Fixed another typo Fixed error in include Fixed hsdis for aarch64 native or simulated Fixed various typos and omissions Fixed various typos, overlooked cases and wrong accessors Fix error introduced into profiling code Fix guarantee failure in synchronizer.cpp Fix more errors introduced into interpreter profile counter increment Fix relocations Fix several small typos Fix some typos Fix thinko in Atomic::xchg_ptr. Fix typo Fix up aarch64-specific patching code Fix up crc32 support Fix various typos Get rid of unnecessary declaration Guess at how to implement C1 deoptimize_trap generator Initial cut of aarch64 code pulled from jdk8 tree Make aarch64-x86 hybrid build use correct paths Make hsdis handle aarch64 native case Make static stubs load methodOop in cpool to avoid problems at GC Miscellaneous bug fixes. Missing change needed to support aarch64 build Modified make files to support aarch64 build Modified shared src to support full aarch64 backport Moved fields which need access from java to top level Need to actually return the adapter code size Need to pass CFLAGS when assembling .S files using CC_COMPILE Need to use class handle not class Provide missing CRC32 methods Reload rcpool register after a VM call in case a permgen GC has moved the cache Relocated aarch64 vtable generate code to conform to jdk7 Remove comment to avoid breaking macro Removed aarch64 compiled_IC implementation to conform to jdk7 Removed metaspaceShared code to conform to jdk7 Removed redundant field use_XOR_for_compressed_class_base Removed some errors in signal handling code Removed undefined metadata case Remove redundant bracket Remove support for volatile load/store rules in ad file Renamed emit_int32 to emit_long and added local emit_long64 in place of missing emit_int64 Restored missing open brace Restored several load_heap_oop calls lost in translation Restore working x86 build Reverted aarch64 architecture description (ad) file to conform to jdk7 Reverted aarch64 c1_xxx files to conform to jdk7 Reverted aarch64 c2 globals to conform to jdk7 Reverted aarch64 frame code to conform to jdk7 Reverted aarch64 runtime code to conform to jdk7 Reverted aarch64 stubs code to conform to jdk7 Reverted aarch64 template interpreter code to conform to jdk7 Reverted aarch64 vm structs code to conform to jdk7 Reverted aarch64 vm version code to conform to jdk7 Reverted aarch64 vtable stubs code to conform to jdk7 Reverted assembler_aarch64.cpp/hpp to conform to jdk7 Reverted bytecodeInterpreter_aarch64 to conform to jdk7 Reverted global defs code to conform to jdk7 Reverted instr cache code to conform to jdk7 Reverted interpreter code to conform to jdk7 Reverted interpreter masm code to conform to jdk7 Reverted jni code to conform to jdk7 Reverted method handles code to conform to jdk7 Reverted native instr code to conform to jdk7 Reverted os_cpu/linux_aarch64 code to conform to jdk7 Reverted reloc info code to conform to jdk7 Revert Method:: etc to methodOopDesc:: etc Scripts to build aarch64-x86 hybrid and aarch64 native debug images Some errors revealed when building debug image Temporarily disable running test_gamma Tidy up allocation prefetch Use correct post-increment size in repne_scanw Use membar rules and delete special case volatile rules Use method register to access counter increment field Use movoop in C1 ic_call to keep verifier happy Use os::malloc to allocate the register map. Use the correct return value from the VM resolve call Use TLS for ThreadLocalStorage::thread() Various changes to accommodate inclusion of ppc port in icedtea7 Various concurrency fixes. Work around weird compiler issue 2015-01-21 Andrew John Hughes <gnu.andrew@member.fsf.org> * patches/hotspot/default/systemtap_gc.patch: Remove unused patch. * Makefile.am: (ICEDTEA_ENV): Drop FULL_DEBUG_SYMBOLS=0. This is not needed with the IcedTea HotSpot. * NEWS: Updated. * hotspot.map.in: Update aarch64 HotSpot to icedtea-2.6.0pre17's. 2014-12-12 Andrew John Hughes <gnu.andrew@member.fsf.org> * Makefile.am: (EXTRA_DIST): Drop reference to HotSpot patches as there is no longer an alternate HotSpot. 2014-11-11 Andrew John Hughes <gnu.andrew@member.fsf.org> Merge AArch64 port into mainline IcedTea7. * patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch, * patches/hotspot/aarch64/20141014-8036533-method_for_correct_defaults.patch, * patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch, * patches/hotspot/aarch64/20141014-8038898-safer_safepoints.patch, * patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch, * patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch, * patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch, * patches/hotspot/aarch64/20141014-8044269-analysis_of_archive_files.patch, * patches/hotspot/aarch64/20141014-8046213-testemptybootstrapmethodsattr_failure.patch, * patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch, * patches/hotspot/aarch64/systemtap_gc.patch, * patches/hotspot/aarch64/werror.patch: Remove unneeded patches from AArch64 HotSpot build. * Makefile.am: (ICEDTEA_PATCHES): Remove AArch64 HotSpot build patches.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Thu, 22 Jan 2015 04:20:29 +0000
parents 45ac6cd7aae2
children e32aa5c749cf
files ChangeLog Makefile.am NEWS hotspot.map.in patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch patches/hotspot/aarch64/20141014-8036533-method_for_correct_defaults.patch patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch patches/hotspot/aarch64/20141014-8038898-safer_safepoints.patch patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch patches/hotspot/aarch64/20141014-8044269-analysis_of_archive_files.patch patches/hotspot/aarch64/20141014-8046213-testemptybootstrapmethodsattr_failure.patch patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch patches/hotspot/aarch64/systemtap_gc.patch patches/hotspot/aarch64/werror.patch patches/hotspot/default/systemtap_gc.patch
diffstat 17 files changed, 179 insertions(+), 2182 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 22 01:27:39 2015 +0000
+++ b/ChangeLog	Thu Jan 22 04:20:29 2015 +0000
@@ -1,3 +1,40 @@
+2015-01-21  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	* patches/hotspot/default/systemtap_gc.patch:
+	Remove unused patch.
+	* Makefile.am:
+	(ICEDTEA_ENV): Drop FULL_DEBUG_SYMBOLS=0.
+	This is not needed with the IcedTea HotSpot.
+	* NEWS: Updated.
+	* hotspot.map.in: Update aarch64 HotSpot
+	to icedtea-2.6.0pre17's.
+
+2014-12-12  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	* Makefile.am:
+	(EXTRA_DIST): Drop reference to HotSpot patches
+	as there is no longer an alternate HotSpot.
+
+2014-11-11  Andrew John Hughes  <gnu.andrew@member.fsf.org>
+
+	Merge AArch64 port into mainline IcedTea7.
+	* patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch,
+	* patches/hotspot/aarch64/20141014-8036533-method_for_correct_defaults.patch,
+	* patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch,
+	* patches/hotspot/aarch64/20141014-8038898-safer_safepoints.patch,
+	* patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch,
+	* patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch,
+	* patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch,
+	* patches/hotspot/aarch64/20141014-8044269-analysis_of_archive_files.patch,
+	* patches/hotspot/aarch64/20141014-8046213-testemptybootstrapmethodsattr_failure.patch,
+	* patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch,
+	* patches/hotspot/aarch64/systemtap_gc.patch,
+	* patches/hotspot/aarch64/werror.patch:
+	Remove unneeded patches from AArch64 HotSpot build.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Remove AArch64 HotSpot build
+	patches.
+
 2014-10-29  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	* Makefile.am:
--- a/Makefile.am	Thu Jan 22 01:27:39 2015 +0000
+++ b/Makefile.am	Thu Jan 22 04:20:29 2015 +0000
@@ -285,24 +285,6 @@
 endif
 endif
 
-if WITH_ALT_HSBUILD
-ICEDTEA_PATCHES += patches/hotspot/aarch64/werror.patch \
-	patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch \
-	patches/hotspot/aarch64/20141014-8036533-method_for_correct_defaults.patch \
-	patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch \
-	patches/hotspot/aarch64/20141014-8038898-safer_safepoints.patch \
-	patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch \
-	patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch \
-	patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch \
-	patches/hotspot/aarch64/20141014-8044269-analysis_of_archive_files.patch \
-	patches/hotspot/aarch64/20141014-8046213-testemptybootstrapmethodsattr_failure.patch \
-	patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch
-if ENABLE_SYSTEMTAP
-ICEDTEA_PATCHES += \
-	patches/hotspot/aarch64/systemtap_gc.patch
-endif
-endif
-
 ICEDTEA_PATCHES += $(DISTRIBUTION_PATCHES)
 
 # Bootstrapping patches
@@ -613,13 +595,6 @@
        INFINALITY_SUPPORT="true"
 endif
 
-# This seems illogical, but it actually just
-# turns off the creation of separate debuginfo files.
-if WITH_ALT_HSBUILD
-ICEDTEA_ENV += \
-	FULL_DEBUG_SYMBOLS=0
-endif
-
 # OpenJDK boot build environment.
 ICEDTEA_ENV_BOOT = $(ICEDTEA_ENV) \
 	BOOTCLASSPATH_CLS_RT="-bootclasspath $(CLS_DIR_BOOT):$(RUNTIME)" \
@@ -781,7 +756,6 @@
 EXTRA_DIST = $(GENERATED_FILES) $(top_srcdir)/patches/*.patch \
 	$(top_srcdir)/patches/boot/*.patch \
 	$(top_srcdir)/patches/cacao/*.patch \
-	$(top_srcdir)/patches/hotspot/*/*.patch \
 	$(top_srcdir)/patches/jamvm/*.patch \
 	tools-copy contrib overlays \
 	jconsole.desktop policytool.desktop \
--- a/NEWS	Thu Jan 22 01:27:39 2015 +0000
+++ b/NEWS	Thu Jan 22 04:20:29 2015 +0000
@@ -115,6 +115,147 @@
 * JamVM
   - PR2050: JamVM lacks JVM_FindClassFromCaller introduced by security patch in 2.5.3
   - PR2171: JamVM builds with executable stack, causing failures on SELinux & PaX kernels
+* AArch64 port
+  - Use the IcedTea7 fork version rather than the one based on HotSpot 25.
+  - Add arch-specific processing of tmp1 register needed for d/f2i
+  - Add char_array_equals intrinsic
+  - Add CNEG and CNEGW to macro assembler.
+  - Add frame anchor fences.
+  - Add missing instruction synchronization barriers and cache flushes.
+  - Add some memory barriers for object creation and runtime calls.
+  - Add support for A53 multiply accumulate
+  - Add support for AES Intrinsics
+  - Add support for pipeline scheduling
+  - Add support for String.indexOf intrinsic
+  - Added make rules to allow aarch64-x86 hybrid build to progress
+  - Added missing aarch64-specific include
+  - Added missing aarch64-specific make file
+  - Added missing changes for debug code
+  - Added missing inline method
+  - Added missing shared global UseCRC32Intrinsics
+  - Added pd global UseVectoredExceptions
+  - Add local method to redirect to AbstractAssembler::relocate
+  - Add missing declarations for CRC32 methods
+  - Add missing include
+  - Add missing special case code for aarch64
+  - Add rules to assemble .S files
+  - Add support for storing aarch64 call format
+  - Add wrapper method to avoid dependency on not yet defined code buffer class
+  - Added missing endif
+  - Allow for 0x400 aligned offsets for byte_map_base
+  - Array load must only read 32 bits
+  - A more efficient sequence for C1_MacroAssembler::float_cmp.
+  - Backout 8c8b5e62e624 and instead move .S rule from zeroshark.make to rules.make
+  - Backout additional changes made in ec6a6772fed6, which revert parts of the PPC/AIX port and IcedTea fixes.
+  - Call ICache::invalidate_range() from Relocation::pd_set_data_value().
+  - Changed klass oop encode to heap oop encode
+  - Changed Method* to methodOop
+  - Correct assert to allow for AArch64
+  - Correct for difference in include hierarchy
+  - Correct typos
+  - Corrected error in disassembler code
+  - Corrected include
+  - Corrected include path
+  - Corrected pipeline class for countTrailingZerosL
+  - Corrected type
+  - Corrected typo
+  - Correct includes
+  - Correct Method to methdoOopDesc
+  - Define uabs().  Use it everywhere an absolute value is wanted.
+  - Defn of BIND does not need to use __ macro
+  - Delete dead code.
+  - Disassembler library should be built as hsdis-aarch64.so
+  - Don't test arraycopy routines when using AArch64 simulator
+  - Emit_int64 is renamed
+  - Ensure byte_map_base can be loaded using adrp with no need for following ldr
+  - Ensure C1 static call stub employs absolute move to allow patching
+  - Ensure C2 static calls use correct call adddress in static stub reloc
+  - Ensure perm gen size is not rounded down to zero
+  - Ensure rmethod is reloaded from stack when interpreter makes non leaf VM call
+  - Ensure we pick up hsdis-aarch64.so if BUILTIN_SIM is true
+  - Fix couple of mistakes in generate of method handle dispatch
+  - Fix cut and paste-o in header
+  - Fixed another typo
+  - Fixed error in include
+  - Fixed hsdis for aarch64 native or simulated
+  - Fixed various typos and omissions
+  - Fixed various typos, overlooked cases and wrong accessors
+  - Fix error introduced into profiling code
+  - Fix guarantee failure in synchronizer.cpp
+  - Fix more errors introduced into interpreter profile counter increment
+  - Fix relocations
+  - Fix several small typos
+  - Fix some typos
+  - Fix thinko in Atomic::xchg_ptr.
+  - Fix typo
+  - Fix up aarch64-specific patching code
+  - Fix up crc32 support
+  - Fix various typos
+  - Get rid of unnecessary declaration
+  - Guess at how to implement C1 deoptimize_trap generator
+  - Initial cut of aarch64 code pulled from jdk8 tree
+  - Make aarch64-x86 hybrid build use correct paths
+  - Make hsdis handle aarch64 native case
+  - Make static stubs load methodOop in cpool to avoid problems at GC
+  - Miscellaneous bug fixes.
+  - Missing change needed to support aarch64 build
+  - Modified make files to support aarch64 build
+  - Modified shared src to support full aarch64 backport
+  - Moved fields which need access from java to top level
+  - Need to actually return the adapter code size
+  - Need to pass CFLAGS when assembling .S files using CC_COMPILE
+  - Need to use class handle not class
+  - Provide missing CRC32 methods
+  - Reload rcpool register after a VM call in case a permgen GC has moved the cache
+  - Relocated aarch64 vtable generate code to conform to jdk7
+  - Remove comment to avoid breaking macro
+  - Removed aarch64 compiled_IC implementation to conform to jdk7
+  - Removed metaspaceShared code to conform to jdk7
+  - Removed redundant field use_XOR_for_compressed_class_base
+  - Removed some errors in signal handling code
+  - Removed undefined metadata case
+  - Remove redundant bracket
+  - Remove support for volatile load/store rules in ad file
+  - Renamed emit_int32 to emit_long and added local emit_long64 in place of missing emit_int64
+  - Restored missing open brace
+  - Restored several load_heap_oop calls lost in translation
+  - Restore working x86 build
+  - Reverted aarch64 architecture description (ad) file to conform to jdk7
+  - Reverted aarch64 c1_xxx files to conform to jdk7
+  - Reverted aarch64 c2 globals to conform to jdk7
+  - Reverted aarch64 frame code to conform to jdk7
+  - Reverted aarch64 runtime code to conform to jdk7
+  - Reverted aarch64 stubs code to conform to jdk7
+  - Reverted aarch64 template interpreter code to conform to jdk7
+  - Reverted aarch64 vm structs code to conform to jdk7
+  - Reverted aarch64 vm version code to conform to jdk7
+  - Reverted aarch64 vtable stubs code to conform to jdk7
+  - Reverted assembler_aarch64.cpp/hpp to conform to jdk7
+  - Reverted bytecodeInterpreter_aarch64 to conform to jdk7
+  - Reverted global defs code to conform to jdk7
+  - Reverted instr cache code to conform to jdk7
+  - Reverted interpreter code to conform to jdk7
+  - Reverted interpreter masm code to conform to jdk7
+  - Reverted jni code to conform to jdk7
+  - Reverted method handles code to conform to jdk7
+  - Reverted native instr code to conform to jdk7
+  - Reverted os_cpu/linux_aarch64 code to conform to jdk7
+  - Reverted reloc info code to conform to jdk7
+  - Revert Method:: etc to methodOopDesc:: etc
+  - Scripts to build aarch64-x86 hybrid and aarch64 native debug images
+  - Some errors revealed when building debug image
+  - Temporarily disable running test_gamma
+  - Tidy up allocation prefetch
+  - Use correct post-increment size in repne_scanw
+  - Use membar rules and delete special case volatile rules
+  - Use method register to access counter increment field
+  - Use movoop in C1 ic_call to keep verifier happy
+  - Use os::malloc to allocate the register map.
+  - Use the correct return value from the VM resolve call
+  - Use TLS for ThreadLocalStorage::thread()
+  - Various changes to accommodate inclusion of ppc port in icedtea7
+  - Various concurrency fixes.
+  - Work around weird compiler issue
 
 New in release 2.5.3 (2014-10-14):
 
--- a/hotspot.map.in	Thu Jan 22 01:27:39 2015 +0000
+++ b/hotspot.map.in	Thu Jan 22 04:20:29 2015 +0000
@@ -1,3 +1,3 @@
 # version type(drop/hg) url changeset sha256sum
 default drop http://icedtea.classpath.org/download/drops/icedtea7/@ICEDTEA_RELEASE@ 6144ca9b6a72 4825f8543aa0c065530b05b0a95915a44eea153bbb696d2ffc4b50a398813e34
-aarch64 drop http://icedtea.classpath.org/download/drops/icedtea7/@ICEDTEA_RELEASE@ 116bc9da35de b9e7f67079184310450c9b461b492f340aa7824c27079b430c8f25b58b327ec5
+aarch64 drop http://icedtea.classpath.org/download/drops/icedtea7/@ICEDTEA_RELEASE@ 4d25046abb67 60da8d427f7e3659f701e54c763ea8366d8af3280c7e10670004938b2f07efef
--- a/patches/hotspot/aarch64/20141014-8015256-better_class_accessibility.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-# HG changeset patch
-# User coleenp
-# Date 1399583989 14400
-#      Thu May 08 17:19:49 2014 -0400
-# Node ID 671021ba6f79fadfb510be047b23dcdabe35160d
-# Parent  9580ebccfdc392c93c79633bdc207139de511438
-8015256: Better class accessibility
-Summary: Improve protection domain check in forName()
-Reviewed-by: mchung, acorn, jdn
-
-diff -r 9580ebccfdc3 -r 671021ba6f79 make/bsd/makefiles/mapfile-vers-debug
---- openjdk/hotspot/make/bsd/makefiles/mapfile-vers-debug	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/make/bsd/makefiles/mapfile-vers-debug	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -82,6 +82,7 @@
-                 _JVM_EnableCompiler
-                 _JVM_Exit
-                 _JVM_FillInStackTrace
-+                _JVM_FindClassFromCaller
-                 _JVM_FindClassFromClass
-                 _JVM_FindClassFromClassLoader
-                 _JVM_FindClassFromBootLoader
-diff -r 9580ebccfdc3 -r 671021ba6f79 make/bsd/makefiles/mapfile-vers-product
---- openjdk/hotspot/make/bsd/makefiles/mapfile-vers-product	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/make/bsd/makefiles/mapfile-vers-product	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -82,6 +82,7 @@
-                 _JVM_EnableCompiler
-                 _JVM_Exit
-                 _JVM_FillInStackTrace
-+                _JVM_FindClassFromCaller
-                 _JVM_FindClassFromClass
-                 _JVM_FindClassFromClassLoader
-                 _JVM_FindClassFromBootLoader
-diff -r 9580ebccfdc3 -r 671021ba6f79 make/linux/makefiles/mapfile-vers-debug
---- openjdk/hotspot/make/linux/makefiles/mapfile-vers-debug	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/make/linux/makefiles/mapfile-vers-debug	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -84,6 +84,7 @@
-                 JVM_EnableCompiler;
-                 JVM_Exit;
-                 JVM_FillInStackTrace;
-+                JVM_FindClassFromCaller;
-                 JVM_FindClassFromClass;
-                 JVM_FindClassFromClassLoader;
-                 JVM_FindClassFromBootLoader;
-diff -r 9580ebccfdc3 -r 671021ba6f79 make/linux/makefiles/mapfile-vers-product
---- openjdk/hotspot/make/linux/makefiles/mapfile-vers-product	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/make/linux/makefiles/mapfile-vers-product	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -84,6 +84,7 @@
-                 JVM_EnableCompiler;
-                 JVM_Exit;
-                 JVM_FillInStackTrace;
-+                JVM_FindClassFromCaller;
-                 JVM_FindClassFromClass;
-                 JVM_FindClassFromClassLoader;
-                 JVM_FindClassFromBootLoader;
-diff -r 9580ebccfdc3 -r 671021ba6f79 make/solaris/makefiles/mapfile-vers
---- openjdk/hotspot/make/solaris/makefiles/mapfile-vers	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/make/solaris/makefiles/mapfile-vers	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -84,6 +84,7 @@
-                 JVM_EnableCompiler;
-                 JVM_Exit;
-                 JVM_FillInStackTrace;
-+                JVM_FindClassFromCaller;
-                 JVM_FindClassFromClass;
-                 JVM_FindClassFromClassLoader;
-                 JVM_FindClassFromBootLoader;
-diff -r 9580ebccfdc3 -r 671021ba6f79 src/share/vm/prims/jvm.cpp
---- openjdk/hotspot/src/share/vm/prims/jvm.cpp	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/src/share/vm/prims/jvm.cpp	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -777,6 +777,7 @@
-   return (jclass) JNIHandles::make_local(env, k->java_mirror());
- JVM_END
- 
-+// Not used; JVM_FindClassFromCaller replaces this.
- JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
-                                                jboolean init, jobject loader,
-                                                jboolean throwError))
-@@ -803,6 +804,42 @@
-   return result;
- JVM_END
- 
-+// Find a class with this name in this loader, using the caller's protection domain.
-+JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name,
-+                                          jboolean init, jobject loader,
-+                                          jclass caller))
-+  JVMWrapper2("JVM_FindClassFromCaller %s throws ClassNotFoundException", name);
-+  // Java libraries should ensure that name is never null...
-+  if (name == NULL || (int)strlen(name) > Symbol::max_length()) {
-+    // It's impossible to create this class;  the name cannot fit
-+    // into the constant pool.
-+    THROW_MSG_0(vmSymbols::java_lang_ClassNotFoundException(), name);
-+  }
-+
-+  TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);
-+
-+  oop loader_oop = JNIHandles::resolve(loader);
-+  oop from_class = JNIHandles::resolve(caller);
-+  oop protection_domain = NULL;
-+  // If loader is null, shouldn't call ClassLoader.checkPackageAccess; otherwise get
-+  // NPE. Put it in another way, the bootstrap class loader has all permission and
-+  // thus no checkPackageAccess equivalence in the VM class loader.
-+  // The caller is also passed as NULL by the java code if there is no security
-+  // manager to avoid the performance cost of getting the calling class.
-+  if (from_class != NULL && loader_oop != NULL) {
-+    protection_domain = java_lang_Class::as_Klass(from_class)->protection_domain();
-+  }
-+
-+  Handle h_loader(THREAD, loader_oop);
-+  Handle h_prot(THREAD, protection_domain);
-+  jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
-+                                               h_prot, false, THREAD);
-+
-+  if (TraceClassResolution && result != NULL) {
-+    trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
-+  }
-+  return result;
-+JVM_END
- 
- JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name,
-                                          jboolean init, jclass from))
-@@ -3966,10 +4003,15 @@
- 
- // Shared JNI/JVM entry points //////////////////////////////////////////////////////////////
- 
--jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS) {
-+jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init,
-+                                    Handle loader, Handle protection_domain,
-+                                    jboolean throwError, TRAPS) {
-   // Security Note:
-   //   The Java level wrapper will perform the necessary security check allowing
--  //   us to pass the NULL as the initiating class loader.
-+  //   us to pass the NULL as the initiating class loader.  The VM is responsible for
-+  //   the checkPackageAccess relative to the initiating class loader via the
-+  //   protection_domain. The protection_domain is passed as NULL by the java code
-+  //   if there is no security manager in 3-arg Class.forName().
-   Klass* klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL);
- 
-   KlassHandle klass_handle(THREAD, klass);
-diff -r 9580ebccfdc3 -r 671021ba6f79 src/share/vm/prims/jvm.h
---- openjdk/hotspot/src/share/vm/prims/jvm.h	Thu Sep 11 07:28:58 2014 -0400
-+++ openjdk/hotspot/src/share/vm/prims/jvm.h	Thu May 08 17:19:49 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -417,6 +417,19 @@
- JVM_FindClassFromBootLoader(JNIEnv *env, const char *name);
- 
- /*
-+ * Find a class from a given class loader.  Throws ClassNotFoundException.
-+ *  name:   name of class
-+ *  init:   whether initialization is done
-+ *  loader: class loader to look up the class. This may not be the same as the caller's
-+ *          class loader.
-+ *  caller: initiating class. The initiating class may be null when a security
-+ *          manager is not installed.
-+ */
-+JNIEXPORT jclass JNICALL
-+JVM_FindClassFromCaller(JNIEnv *env, const char *name, jboolean init,
-+                        jobject loader, jclass caller);
-+
-+/*
-  * Find a class from a given class.
-  */
- JNIEXPORT jclass JNICALL
--- a/patches/hotspot/aarch64/20141014-8036533-method_for_correct_defaults.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-# HG changeset patch
-# User hseigel
-# Date 1412453060 -3600
-#      Sat Oct 04 21:04:20 2014 +0100
-# Node ID f26d56905af0d3d8584d7ebc1e77c0515742286c
-# Parent  671021ba6f79fadfb510be047b23dcdabe35160d
-8036533: Method for correct defaults
-8036156: Limit default method hierarchy
-Summary: Fix protected access checks
-Reviewed-by: coleenp, lfoltan, acorn, ahgross
-
-diff -r 671021ba6f79 -r f26d56905af0 src/share/vm/classfile/stackMapFrame.cpp
---- openjdk/hotspot/src/share/vm/classfile/stackMapFrame.cpp	Thu May 08 17:19:49 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/stackMapFrame.cpp	Sat Oct 04 21:04:20 2014 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -163,7 +163,7 @@
-     VerificationType* from, VerificationType* to, int32_t len, TRAPS) const {
-   int32_t i = 0;
-   for (i = 0; i < len; i++) {
--    if (!to[i].is_assignable_from(from[i], verifier(), THREAD)) {
-+    if (!to[i].is_assignable_from(from[i], verifier(), false, THREAD)) {
-       break;
-     }
-   }
-@@ -260,7 +260,7 @@
-   }
-   VerificationType top = _stack[--_stack_size];
-   bool subtype = type.is_assignable_from(
--    top, verifier(), CHECK_(VerificationType::bogus_type()));
-+    top, verifier(), false, CHECK_(VerificationType::bogus_type()));
-   if (!subtype) {
-     verifier()->verify_error(
-         ErrorContext::bad_type(_offset, stack_top_ctx(),
-@@ -280,7 +280,7 @@
-     return VerificationType::bogus_type();
-   }
-   bool subtype = type.is_assignable_from(_locals[index],
--    verifier(), CHECK_(VerificationType::bogus_type()));
-+    verifier(), false, CHECK_(VerificationType::bogus_type()));
-   if (!subtype) {
-     verifier()->verify_error(
-         ErrorContext::bad_type(_offset,
-@@ -303,14 +303,14 @@
-         "get long/double overflows locals");
-     return;
-   }
--  bool subtype = type1.is_assignable_from(_locals[index], verifier(), CHECK);
-+  bool subtype = type1.is_assignable_from(_locals[index], verifier(), false, CHECK);
-   if (!subtype) {
-     verifier()->verify_error(
-         ErrorContext::bad_type(_offset,
-             TypeOrigin::local(index, this), TypeOrigin::implicit(type1)),
-         "Bad local variable type");
-   } else {
--    subtype = type2.is_assignable_from(_locals[index + 1], verifier(), CHECK);
-+    subtype = type2.is_assignable_from(_locals[index + 1], verifier(), false, CHECK);
-     if (!subtype) {
-       /* Unreachable? All local store routines convert a split long or double
-        * into a TOP during the store.  So we should never end up seeing an
-diff -r 671021ba6f79 -r f26d56905af0 src/share/vm/classfile/stackMapFrame.hpp
---- openjdk/hotspot/src/share/vm/classfile/stackMapFrame.hpp	Thu May 08 17:19:49 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/stackMapFrame.hpp	Sat Oct 04 21:04:20 2014 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -238,7 +238,7 @@
-     if (_stack_size != 0) {
-       VerificationType top = _stack[_stack_size - 1];
-       bool subtype = type.is_assignable_from(
--        top, verifier(), CHECK_(VerificationType::bogus_type()));
-+        top, verifier(), false, CHECK_(VerificationType::bogus_type()));
-       if (subtype) {
-         --_stack_size;
-         return top;
-@@ -253,9 +253,9 @@
-     assert(type2.is_long() || type2.is_double(), "must be long/double_2");
-     if (_stack_size >= 2) {
-       VerificationType top1 = _stack[_stack_size - 1];
--      bool subtype1 = type1.is_assignable_from(top1, verifier(), CHECK);
-+      bool subtype1 = type1.is_assignable_from(top1, verifier(), false, CHECK);
-       VerificationType top2 = _stack[_stack_size - 2];
--      bool subtype2 = type2.is_assignable_from(top2, verifier(), CHECK);
-+      bool subtype2 = type2.is_assignable_from(top2, verifier(), false, CHECK);
-       if (subtype1 && subtype2) {
-         _stack_size -= 2;
-         return;
-diff -r 671021ba6f79 -r f26d56905af0 src/share/vm/classfile/verificationType.cpp
---- openjdk/hotspot/src/share/vm/classfile/verificationType.cpp	Thu May 08 17:19:49 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/verificationType.cpp	Sat Oct 04 21:04:20 2014 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -42,7 +42,8 @@
- }
- 
- bool VerificationType::is_reference_assignable_from(
--    const VerificationType& from, ClassVerifier* context, TRAPS) const {
-+    const VerificationType& from, ClassVerifier* context,
-+    bool from_field_is_protected, TRAPS) const {
-   instanceKlassHandle klass = context->current_class();
-   if (from.is_null()) {
-     // null is assignable to any reference
-@@ -62,9 +63,11 @@
-         Handle(THREAD, klass->protection_domain()), true, CHECK_false);
-     KlassHandle this_class(THREAD, obj);
- 
--    if (this_class->is_interface()) {
--      // We treat interfaces as java.lang.Object, including
--      // java.lang.Cloneable and java.io.Serializable
-+    if (this_class->is_interface() && (!from_field_is_protected ||
-+        from.name() != vmSymbols::java_lang_Object())) {
-+      // If we are not trying to access a protected field or method in
-+      // java.lang.Object then we treat interfaces as java.lang.Object,
-+      // including java.lang.Cloneable and java.io.Serializable.
-       return true;
-     } else if (from.is_object()) {
-       Klass* from_class = SystemDictionary::resolve_or_fail(
-@@ -76,7 +79,8 @@
-     VerificationType comp_this = get_component(context, CHECK_false);
-     VerificationType comp_from = from.get_component(context, CHECK_false);
-     if (!comp_this.is_bogus() && !comp_from.is_bogus()) {
--      return comp_this.is_assignable_from(comp_from, context, CHECK_false);
-+      return comp_this.is_assignable_from(comp_from, context,
-+                                          from_field_is_protected, CHECK_false);
-     }
-   }
-   return false;
-diff -r 671021ba6f79 -r f26d56905af0 src/share/vm/classfile/verificationType.hpp
---- openjdk/hotspot/src/share/vm/classfile/verificationType.hpp	Thu May 08 17:19:49 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/verificationType.hpp	Sat Oct 04 21:04:20 2014 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -265,7 +265,8 @@
-   // is assignable to another.  Returns true if one can assign 'from' to
-   // this.
-   bool is_assignable_from(
--      const VerificationType& from, ClassVerifier* context, TRAPS) const {
-+      const VerificationType& from, ClassVerifier* context,
-+      bool from_field_is_protected, TRAPS) const {
-     if (equals(from) || is_bogus()) {
-       return true;
-     } else {
-@@ -286,7 +287,9 @@
-           return from.is_integer();
-         default:
-           if (is_reference() && from.is_reference()) {
--            return is_reference_assignable_from(from, context, CHECK_false);
-+            return is_reference_assignable_from(from, context,
-+                                                from_field_is_protected,
-+                                                CHECK_false);
-           } else {
-             return false;
-           }
-@@ -308,7 +311,8 @@
-  private:
- 
-   bool is_reference_assignable_from(
--    const VerificationType&, ClassVerifier*, TRAPS) const;
-+    const VerificationType&, ClassVerifier*, bool from_field_is_protected,
-+    TRAPS) const;
- };
- 
- #endif // SHARE_VM_CLASSFILE_VERIFICATIONTYPE_HPP
-diff -r 671021ba6f79 -r f26d56905af0 src/share/vm/classfile/verifier.cpp
---- openjdk/hotspot/src/share/vm/classfile/verifier.cpp	Thu May 08 17:19:49 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp	Sat Oct 04 21:04:20 2014 +0100
-@@ -1736,7 +1736,7 @@
-       VerificationType throwable =
-         VerificationType::reference_type(vmSymbols::java_lang_Throwable());
-       bool is_subclass = throwable.is_assignable_from(
--        catch_type, this, CHECK_VERIFY(this));
-+        catch_type, this, false, CHECK_VERIFY(this));
-       if (!is_subclass) {
-         // 4286534: should throw VerifyError according to recent spec change
-         verify_error(ErrorContext::bad_type(handler_pc,
-@@ -2191,7 +2191,7 @@
-         stack_object_type = current_type();
-       }
-       is_assignable = target_class_type.is_assignable_from(
--        stack_object_type, this, CHECK_VERIFY(this));
-+        stack_object_type, this, false, CHECK_VERIFY(this));
-       if (!is_assignable) {
-         verify_error(ErrorContext::bad_type(bci,
-             current_frame->stack_top_ctx(),
-@@ -2218,7 +2218,7 @@
-         // It's protected access, check if stack object is assignable to
-         // current class.
-         is_assignable = current_type().is_assignable_from(
--          stack_object_type, this, CHECK_VERIFY(this));
-+          stack_object_type, this, true, CHECK_VERIFY(this));
-         if (!is_assignable) {
-           verify_error(ErrorContext::bad_type(bci,
-               current_frame->stack_top_ctx(),
-@@ -2315,7 +2315,7 @@
-         instanceKlassHandle mh(THREAD, m->method_holder());
-         if (m->is_protected() && !mh->is_same_class_package(_klass())) {
-           bool assignable = current_type().is_assignable_from(
--            objectref_type, this, CHECK_VERIFY(this));
-+            objectref_type, this, true, CHECK_VERIFY(this));
-           if (!assignable) {
-             verify_error(ErrorContext::bad_type(bci,
-                 TypeOrigin::cp(new_class_index, objectref_type),
-@@ -2489,11 +2489,11 @@
-     bool have_imr_indirect = cp->tag_at(index).value() == JVM_CONSTANT_InterfaceMethodref;
-     if (!current_class()->is_anonymous()) {
-       subtype = ref_class_type.is_assignable_from(
--                 current_type(), this, CHECK_VERIFY(this));
-+                 current_type(), this, false, CHECK_VERIFY(this));
-     } else {
-       VerificationType host_klass_type =
-                         VerificationType::reference_type(current_class()->host_klass()->name());
--      subtype = ref_class_type.is_assignable_from(host_klass_type, this, CHECK_VERIFY(this));
-+      subtype = ref_class_type.is_assignable_from(host_klass_type, this, false, CHECK_VERIFY(this));
- 
-       // If invokespecial of IMR, need to recheck for same or
-       // direct interface relative to the host class
-@@ -2537,7 +2537,7 @@
-           VerificationType top = current_frame->pop_stack(CHECK_VERIFY(this));
-           VerificationType hosttype =
-             VerificationType::reference_type(current_class()->host_klass()->name());
--          bool subtype = hosttype.is_assignable_from(top, this, CHECK_VERIFY(this));
-+          bool subtype = hosttype.is_assignable_from(top, this, false, CHECK_VERIFY(this));
-           if (!subtype) {
-             verify_error( ErrorContext::bad_type(current_frame->offset(),
-               current_frame->stack_top_ctx(),
-@@ -2562,7 +2562,7 @@
-               // It's protected access, check if stack object is
-               // assignable to current class.
-               bool is_assignable = current_type().is_assignable_from(
--                stack_object_type, this, CHECK_VERIFY(this));
-+                stack_object_type, this, true, CHECK_VERIFY(this));
-               if (!is_assignable) {
-                 if (ref_class_type.name() == vmSymbols::java_lang_Object()
-                     && stack_object_type.is_array()
-@@ -2745,7 +2745,7 @@
-         "Method expects a return value");
-     return;
-   }
--  bool match = return_type.is_assignable_from(type, this, CHECK_VERIFY(this));
-+  bool match = return_type.is_assignable_from(type, this, false, CHECK_VERIFY(this));
-   if (!match) {
-     verify_error(ErrorContext::bad_type(bci,
-         current_frame->stack_top_ctx(), TypeOrigin::signature(return_type)),
-diff -r 671021ba6f79 -r f26d56905af0 src/share/vm/runtime/reflection.cpp
---- openjdk/hotspot/src/share/vm/runtime/reflection.cpp	Thu May 08 17:19:49 2014 -0400
-+++ openjdk/hotspot/src/share/vm/runtime/reflection.cpp	Sat Oct 04 21:04:20 2014 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -484,7 +484,7 @@
-     ik = InstanceKlass::cast(hc);
- 
-     // There's no way to make a host class loop short of patching memory.
--    // Therefore there cannot be a loop here unles there's another bug.
-+    // Therefore there cannot be a loop here unless there's another bug.
-     // Still, let's check for it.
-     assert(--inf_loop_check > 0, "no host_klass loop");
-   }
-@@ -553,7 +553,8 @@
-   if (access.is_protected()) {
-     if (!protected_restriction) {
-       // See if current_class (or outermost host class) is a subclass of field_class
--      if (host_class->is_subclass_of(field_class)) {
-+      // An interface may not access protected members of j.l.Object
-+      if (!host_class->is_interface() && host_class->is_subclass_of(field_class)) {
-         if (access.is_static() || // static fields are ok, see 6622385
-             current_class == resolved_class ||
-             field_class == resolved_class ||
--- a/patches/hotspot/aarch64/20141014-8036805-correct_linker_method_lookup.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-# HG changeset patch
-# User lfoltan
-# Date 1397593040 14400
-#      Tue Apr 15 16:17:20 2014 -0400
-# Node ID 088ea5eccf62f21f75b311f49102c1d27bc577f9
-# Parent  f26d56905af0d3d8584d7ebc1e77c0515742286c
-8036805: Correct linker method lookup.
-Summary: Correct handling of array of primitive type qualifiers during field and method resolution.
-Reviewed-by: acorn, hseigel, ahgross
-
-diff -r f26d56905af0 -r 088ea5eccf62 src/share/vm/interpreter/linkResolver.cpp
---- openjdk/hotspot/src/share/vm/interpreter/linkResolver.cpp	Sat Oct 04 21:04:20 2014 +0100
-+++ openjdk/hotspot/src/share/vm/interpreter/linkResolver.cpp	Tue Apr 15 16:17:20 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -245,6 +245,12 @@
- void LinkResolver::lookup_method_in_klasses(methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, bool checkpolymorphism, bool in_imethod_resolve, TRAPS) {
-   Method* result_oop = klass->uncached_lookup_method(name, signature);
- 
-+  if (klass->oop_is_array()) {
-+    // Only consider klass and super klass for arrays
-+    result = methodHandle(THREAD, result_oop);
-+    return;
-+  }
-+
-   // JDK 8, JVMS 5.4.3.4: Interface method resolution should
-   // ignore static and non-public methods of java.lang.Object,
-   // like clone, finalize, registerNatives.
-@@ -283,6 +289,11 @@
-     result = methodHandle(THREAD, super_klass->uncached_lookup_method(name, signature));
-   }
- 
-+  if (klass->oop_is_array()) {
-+    // Only consider klass and super klass for arrays
-+    return;
-+  }
-+
-   if (result.is_null()) {
-     Array<Method*>* default_methods = InstanceKlass::cast(klass())->default_methods();
-     if (default_methods != NULL) {
-@@ -539,7 +550,7 @@
-   // 2. lookup method in resolved klass and its super klasses
-   lookup_method_in_klasses(resolved_method, resolved_klass, method_name, method_signature, true, false, CHECK);
- 
--  if (resolved_method.is_null()) { // not found in the class hierarchy
-+  if (resolved_method.is_null() && !resolved_klass->oop_is_array()) { // not found in the class hierarchy
-     // 3. lookup method in all the interfaces implemented by the resolved klass
-     lookup_method_in_interfaces(resolved_method, resolved_klass, method_name, method_signature, CHECK);
- 
-@@ -552,16 +563,16 @@
-         CLEAR_PENDING_EXCEPTION;
-       }
-     }
-+  }
- 
--    if (resolved_method.is_null()) {
--      // 4. method lookup failed
--      ResourceMark rm(THREAD);
--      THROW_MSG_CAUSE(vmSymbols::java_lang_NoSuchMethodError(),
--                      Method::name_and_sig_as_C_string(resolved_klass(),
--                                                              method_name,
--                                                              method_signature),
--                      nested_exception);
--    }
-+  if (resolved_method.is_null()) {
-+    // 4. method lookup failed
-+    ResourceMark rm(THREAD);
-+    THROW_MSG_CAUSE(vmSymbols::java_lang_NoSuchMethodError(),
-+                    Method::name_and_sig_as_C_string(resolved_klass(),
-+                                                            method_name,
-+                                                            method_signature),
-+                    nested_exception);
-   }
- 
-   // 5. check if method is concrete
-@@ -636,17 +647,18 @@
-   // JDK8: also look for static methods
-   lookup_method_in_klasses(resolved_method, resolved_klass, method_name, method_signature, false, true, CHECK);
- 
--  if (resolved_method.is_null()) {
-+  if (resolved_method.is_null() && !resolved_klass->oop_is_array()) {
-     // lookup method in all the super-interfaces
-     lookup_method_in_interfaces(resolved_method, resolved_klass, method_name, method_signature, CHECK);
--    if (resolved_method.is_null()) {
--      // no method found
--      ResourceMark rm(THREAD);
--      THROW_MSG(vmSymbols::java_lang_NoSuchMethodError(),
--                Method::name_and_sig_as_C_string(resolved_klass(),
--                                                        method_name,
--                                                        method_signature));
--    }
-+  }
-+
-+  if (resolved_method.is_null()) {
-+    // no method found
-+    ResourceMark rm(THREAD);
-+    THROW_MSG(vmSymbols::java_lang_NoSuchMethodError(),
-+              Method::name_and_sig_as_C_string(resolved_klass(),
-+                                                      method_name,
-+                                                      method_signature));
-   }
- 
-   if (nostatics && resolved_method->is_static()) {
-@@ -779,7 +791,7 @@
-   }
- 
-   // Resolve instance field
--  KlassHandle sel_klass(THREAD, InstanceKlass::cast(resolved_klass())->find_field(field, sig, &fd));
-+  KlassHandle sel_klass(THREAD, resolved_klass->find_field(field, sig, &fd));
-   // check if field exists; i.e., if a klass containing the field def has been selected
-   if (sel_klass.is_null()) {
-     ResourceMark rm(THREAD);
-diff -r f26d56905af0 -r 088ea5eccf62 src/share/vm/oops/arrayKlass.cpp
---- openjdk/hotspot/src/share/vm/oops/arrayKlass.cpp	Sat Oct 04 21:04:20 2014 +0100
-+++ openjdk/hotspot/src/share/vm/oops/arrayKlass.cpp	Tue Apr 15 16:17:20 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -64,6 +64,13 @@
-   return NULL;
- }
- 
-+// find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
-+Klass* ArrayKlass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
-+  // There are no fields in an array klass but look to the super class (Object)
-+  assert(super(), "super klass must be present");
-+  return super()->find_field(name, sig, fd);
-+}
-+
- Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
-   // There are no methods in an array klass but the super class (Object) has some
-   assert(super(), "super klass must be present");
-diff -r f26d56905af0 -r 088ea5eccf62 src/share/vm/oops/arrayKlass.hpp
---- openjdk/hotspot/src/share/vm/oops/arrayKlass.hpp	Sat Oct 04 21:04:20 2014 +0100
-+++ openjdk/hotspot/src/share/vm/oops/arrayKlass.hpp	Tue Apr 15 16:17:20 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -28,6 +28,7 @@
- #include "memory/universe.hpp"
- #include "oops/klass.hpp"
- 
-+class fieldDescriptor;
- class klassVtable;
- 
- // ArrayKlass is the abstract baseclass for all array classes
-@@ -85,6 +86,9 @@
-   virtual oop multi_allocate(int rank, jint* sizes, TRAPS);
-   objArrayOop allocate_arrayArray(int n, int length, TRAPS);
- 
-+  // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
-+  Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
-+
-   // Lookup operations
-   Method* uncached_lookup_method(Symbol* name, Symbol* signature) const;
- 
-diff -r f26d56905af0 -r 088ea5eccf62 src/share/vm/oops/klass.cpp
---- openjdk/hotspot/src/share/vm/oops/klass.cpp	Sat Oct 04 21:04:20 2014 +0100
-+++ openjdk/hotspot/src/share/vm/oops/klass.cpp	Tue Apr 15 16:17:20 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -128,6 +128,15 @@
-   return is_subclass_of(k);
- }
- 
-+Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {
-+#ifdef ASSERT
-+  tty->print_cr("Error: find_field called on a klass oop."
-+                " Likely error: reflection method does not correctly"
-+                " wrap return value in a mirror object.");
-+#endif
-+  ShouldNotReachHere();
-+  return NULL;
-+}
- 
- Method* Klass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
- #ifdef ASSERT
-diff -r f26d56905af0 -r 088ea5eccf62 src/share/vm/oops/klass.hpp
---- openjdk/hotspot/src/share/vm/oops/klass.hpp	Sat Oct 04 21:04:20 2014 +0100
-+++ openjdk/hotspot/src/share/vm/oops/klass.hpp	Tue Apr 15 16:17:20 2014 -0400
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
-  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-  *
-  * This code is free software; you can redistribute it and/or modify it
-@@ -91,6 +91,7 @@
- class klassVtable;
- class ParCompactionManager;
- class KlassSizeStats;
-+class fieldDescriptor;
- 
- class Klass : public Metadata {
-   friend class VMStructs;
-@@ -421,6 +422,7 @@
-   virtual void initialize(TRAPS);
-   // lookup operation for MethodLookupCache
-   friend class MethodLookupCache;
-+  virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const;
-   virtual Method* uncached_lookup_method(Symbol* name, Symbol* signature) const;
-  public:
-   Method* lookup_method(Symbol* name, Symbol* signature) const {
--- a/patches/hotspot/aarch64/20141014-8038898-safer_safepoints.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-# HG changeset patch
-# User twisti
-# Date 1398112591 36000
-#      Mon Apr 21 10:36:31 2014 -1000
-# Node ID 77e62c1876767e336b1b47c62e45b9db39808a72
-# Parent  088ea5eccf62f21f75b311f49102c1d27bc577f9
-8038898: Safer safepoints
-Reviewed-by: kvn, ahgross
-
-diff -r 088ea5eccf62 -r 77e62c187676 src/share/vm/runtime/arguments.cpp
---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Tue Apr 15 16:17:20 2014 -0400
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Mon Apr 21 10:36:31 2014 -1000
-@@ -2342,6 +2342,8 @@
-   status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
-   status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
- 
-+  status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset");
-+
-   return status;
- }
- 
--- a/patches/hotspot/aarch64/20141014-8038903-more_native_monitor_monitoring.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-# HG changeset patch
-# User zgu
-# Date 1402928626 14400
-#      Mon Jun 16 10:23:46 2014 -0400
-# Node ID e6b2c9c464d11d2b54d61c693d447f3cb8670663
-# Parent  77e62c1876767e336b1b47c62e45b9db39808a72
-8038903: More native monitor monitoring
-Summary: Moved ntive monitor monitoring flags to experimental
-Reviewed-by: acorn, hseigel, mschoene
-
-diff -r 77e62c187676 -r e6b2c9c464d1 src/share/vm/runtime/globals.hpp
---- openjdk/hotspot/src/share/vm/runtime/globals.hpp	Mon Apr 21 10:36:31 2014 -1000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	Mon Jun 16 10:23:46 2014 -0400
-@@ -1147,11 +1147,11 @@
-           "Prevent spurious or premature wakeups from object.wait "         \
-           "(Solaris only)")                                                 \
-                                                                             \
--  product(intx, NativeMonitorTimeout, -1, "(Unstable)")                     \
--                                                                            \
--  product(intx, NativeMonitorFlags, 0, "(Unstable)")                        \
--                                                                            \
--  product(intx, NativeMonitorSpinLimit, 20, "(Unstable)")                   \
-+  experimental(intx, NativeMonitorTimeout, -1, "(Unstable)")                \
-+                                                                            \
-+  experimental(intx, NativeMonitorFlags, 0, "(Unstable)")                   \
-+                                                                            \
-+  experimental(intx, NativeMonitorSpinLimit, 20, "(Unstable)")              \
-                                                                             \
-   develop(bool, UsePthreads, false,                                         \
-           "Use pthread-based instead of libthread-based synchronization "   \
--- a/patches/hotspot/aarch64/20141014-8041717-issue_with_class_file_parser.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-# HG changeset patch
-# User hseigel
-# Date 1401471163 14400
-#      Fri May 30 13:32:43 2014 -0400
-# Node ID 9664162a7109691191835f5d625daba3ce5f78a5
-# Parent  e6b2c9c464d11d2b54d61c693d447f3cb8670663
-8041717: Issue with class file parser
-Summary: Add better checking for bad values.
-Reviewed-by: coleenp, lfoltan, mschoene
-
-diff -r e6b2c9c464d1 -r 9664162a7109 src/share/vm/classfile/classFileParser.cpp
---- openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Jun 16 10:23:46 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri May 30 13:32:43 2014 -0400
-@@ -2826,6 +2826,11 @@
-       "bootstrap_method_index %u has bad constant type in class file %s",
-       bootstrap_method_index,
-       CHECK);
-+
-+    guarantee_property((operand_fill_index + 1 + argument_count) < operands->length(),
-+      "Invalid BootstrapMethods num_bootstrap_methods or num_bootstrap_arguments value in class file %s",
-+      CHECK);
-+
-     operands->at_put(operand_fill_index++, bootstrap_method_index);
-     operands->at_put(operand_fill_index++, argument_count);
- 
-@@ -2843,7 +2848,6 @@
-   }
- 
-   assert(operand_fill_index == operands->length(), "exact fill");
--  assert(ConstantPool::operand_array_length(operands) == attribute_array_length, "correct decode");
- 
-   u1* current_end = cfs->current();
-   guarantee_property(current_end == current_start + attribute_byte_length,
--- a/patches/hotspot/aarch64/20141014-8042603-safepointpolloffset.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-# HG changeset patch
-# User twisti
-# Date 1400640658 25200
-#      Tue May 20 19:50:58 2014 -0700
-# Node ID cb9aea9e6eb75c7f1ca7b2dd477b48d481261fa7
-# Parent  9664162a7109691191835f5d625daba3ce5f78a5
-8042603: 'SafepointPollOffset' was not declared in static member function 'static bool Arguments::check_vm_args_consistency()'
-Reviewed-by: kvn
-
-diff -r 9664162a7109 -r cb9aea9e6eb7 src/share/vm/runtime/arguments.cpp
---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Fri May 30 13:32:43 2014 -0400
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Tue May 20 19:50:58 2014 -0700
-@@ -2342,7 +2342,9 @@
-   status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
-   status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
- 
-+#ifdef COMPILER1
-   status &= verify_interval(SafepointPollOffset, 0, os::vm_page_size() - BytesPerWord, "SafepointPollOffset");
-+#endif
- 
-   return status;
- }
--- a/patches/hotspot/aarch64/20141014-8044269-analysis_of_archive_files.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-# HG changeset patch
-# User jiangli
-# Date 1407879976 14400
-#      Tue Aug 12 17:46:16 2014 -0400
-# Node ID f3c772c55002ccb7313952d067261951322be263
-# Parent  cb9aea9e6eb75c7f1ca7b2dd477b48d481261fa7
-8044269: Analysis of archive files.
-Summary: Add checksum verification.
-Reviewed-by: iklam, dholmes, mschoene
-
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/classfile/classLoader.cpp
---- openjdk/hotspot/src/share/vm/classfile/classLoader.cpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/classfile/classLoader.cpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -81,6 +81,7 @@
- typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
- typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf);
- typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
-+typedef jint     (JNICALL *Crc32_t)(jint crc, const jbyte *buf, jint len);
- 
- static ZipOpen_t         ZipOpen            = NULL;
- static ZipClose_t        ZipClose           = NULL;
-@@ -89,6 +90,7 @@
- static ReadMappedEntry_t ReadMappedEntry    = NULL;
- static GetNextEntry_t    GetNextEntry       = NULL;
- static canonicalize_fn_t CanonicalizeEntry  = NULL;
-+static Crc32_t           Crc32              = NULL;
- 
- // Globals
- 
-@@ -629,9 +631,11 @@
-   ReadEntry    = CAST_TO_FN_PTR(ReadEntry_t, os::dll_lookup(handle, "ZIP_ReadEntry"));
-   ReadMappedEntry = CAST_TO_FN_PTR(ReadMappedEntry_t, os::dll_lookup(handle, "ZIP_ReadMappedEntry"));
-   GetNextEntry = CAST_TO_FN_PTR(GetNextEntry_t, os::dll_lookup(handle, "ZIP_GetNextEntry"));
-+  Crc32        = CAST_TO_FN_PTR(Crc32_t, os::dll_lookup(handle, "ZIP_CRC32"));
- 
-   // ZIP_Close is not exported on Windows in JDK5.0 so don't abort if ZIP_Close is NULL
--  if (ZipOpen == NULL || FindEntry == NULL || ReadEntry == NULL || GetNextEntry == NULL) {
-+  if (ZipOpen == NULL || FindEntry == NULL || ReadEntry == NULL ||
-+      GetNextEntry == NULL || Crc32 == NULL) {
-     vm_exit_during_initialization("Corrupted ZIP library", path);
-   }
- 
-@@ -641,6 +645,11 @@
-   // This lookup only works on 1.3. Do not check for non-null here
- }
- 
-+int ClassLoader::crc32(int crc, const char* buf, int len) {
-+  assert(Crc32 != NULL, "ZIP_CRC32 is not found");
-+  return (*Crc32)(crc, (const jbyte*)buf, len);
-+}
-+
- // PackageInfo data exists in order to support the java.lang.Package
- // class.  A Package object provides information about a java package
- // (version, vendor, etc.) which originates in the manifest of the jar
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/classfile/classLoader.hpp
---- openjdk/hotspot/src/share/vm/classfile/classLoader.hpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/classfile/classLoader.hpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -215,6 +215,7 @@
-   // to avoid confusing the zip library
-   static bool get_canonical_path(char* orig, char* out, int len);
-  public:
-+  static int crc32(int crc, const char* buf, int len);
-   // Used by the kernel jvm.
-   static void update_class_path_entry_list(char *path,
-                                            bool check_for_duplicates);
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/memory/filemap.cpp
---- openjdk/hotspot/src/share/vm/memory/filemap.cpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/memory/filemap.cpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -176,7 +176,14 @@
-     fail_continue("The shared archive file has the wrong version.");
-     return false;
-   }
--  _file_offset = (long)n;
-+  size_t len = lseek(fd, 0, SEEK_END);
-+  struct FileMapInfo::FileMapHeader::space_info* si =
-+    &_header._space[MetaspaceShared::mc];
-+  if (si->_file_offset >= len || len - si->_file_offset < si->_used) {
-+    fail_continue("The shared archive file has been truncated.");
-+    return false;
-+  }
-+  _file_offset = n;
-   return true;
- }
- 
-@@ -267,6 +274,7 @@
-   si->_capacity = capacity;
-   si->_read_only = read_only;
-   si->_allow_exec = allow_exec;
-+  si->_crc = ClassLoader::crc32(0, base, (jint)size);
-   write_bytes_aligned(base, (int)size);
- }
- 
-@@ -291,14 +299,15 @@
- // Align file position to an allocation unit boundary.
- 
- void FileMapInfo::align_file_position() {
--  long new_file_offset = align_size_up(_file_offset, os::vm_allocation_granularity());
-+  size_t new_file_offset = align_size_up(_file_offset,
-+                                         os::vm_allocation_granularity());
-   if (new_file_offset != _file_offset) {
-     _file_offset = new_file_offset;
-     if (_file_open) {
-       // Seek one byte back from the target and write a byte to insure
-       // that the written file is the correct length.
-       _file_offset -= 1;
--      if (lseek(_fd, _file_offset, SEEK_SET) < 0) {
-+      if (lseek(_fd, (long)_file_offset, SEEK_SET) < 0) {
-         fail_stop("Unable to seek.", NULL);
-       }
-       char zero = 0;
-@@ -405,6 +414,19 @@
-   return base;
- }
- 
-+bool FileMapInfo::verify_region_checksum(int i) {
-+  if (!VerifySharedSpaces) {
-+    return true;
-+  }
-+  const char* buf = _header._space[i]._base;
-+  size_t sz = _header._space[i]._used;
-+  int crc = ClassLoader::crc32(0, buf, (jint)sz);
-+  if (crc != _header._space[i]._crc) {
-+    fail_continue("Checksum verification failed.");
-+    return false;
-+  }
-+  return true;
-+}
- 
- // Unmap a memory region in the address space.
- 
-@@ -456,8 +478,20 @@
-   return true;
- }
- 
-+int FileMapInfo::compute_header_crc() {
-+  char* header = (char*)&_header;
-+  // start computing from the field after _crc
-+  char* buf = (char*)&_header._crc + sizeof(int);
-+  size_t sz = sizeof(FileMapInfo::FileMapHeader) - (buf - header);
-+  int crc = ClassLoader::crc32(0, buf, (jint)sz);
-+  return crc;
-+}
- 
- bool FileMapInfo::validate() {
-+  if (VerifySharedSpaces && compute_header_crc() != _header._crc) {
-+    fail_continue("Header checksum verification failed.");
-+    return false;
-+  }
-   if (_header._version != current_version()) {
-     fail_continue("The shared archive file is the wrong version.");
-     return false;
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/memory/filemap.hpp
---- openjdk/hotspot/src/share/vm/memory/filemap.hpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/memory/filemap.hpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -54,7 +54,7 @@
- 
-   bool  _file_open;
-   int   _fd;
--  long  _file_offset;
-+  size_t  _file_offset;
- 
-   // FileMapHeader describes the shared space data in the file to be
-   // mapped.  This structure gets written to a file.  It is not a class, so
-@@ -62,12 +62,14 @@
- 
-   struct FileMapHeader {
-     int    _magic;                    // identify file type.
-+    int    _crc;                      // header crc checksum.
-     int    _version;                  // (from enum, above.)
-     size_t _alignment;                // how shared archive should be aligned
-     int    _obj_alignment;            // value of ObjectAlignmentInBytes
- 
-     struct space_info {
--      int    _file_offset;   // sizeof(this) rounded to vm page size
-+      int    _crc;           // crc checksum of the current space
-+      size_t _file_offset;   // sizeof(this) rounded to vm page size
-       char*  _base;          // copy-on-write base address
-       size_t _capacity;      // for validity checking
-       size_t _used;          // for setting space top on read
-@@ -104,6 +106,8 @@
-   }
- 
-   static int current_version()        { return _current_version; }
-+  int    compute_header_crc();
-+  void   set_header_crc(int crc)      { _header._crc = crc; }
-   void   populate_header(size_t alignment);
-   bool   validate();
-   void   invalidate();
-@@ -136,6 +140,7 @@
-   void  write_bytes_aligned(const void* buffer, int count);
-   char* map_region(int i);
-   void  unmap_region(int i);
-+  bool  verify_region_checksum(int i);
-   void  close();
-   bool  is_open() { return _file_open; }
-   ReservedSpace reserve_shared_memory();
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/memory/metaspaceShared.cpp
---- openjdk/hotspot/src/share/vm/memory/metaspaceShared.cpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/memory/metaspaceShared.cpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -581,6 +581,7 @@
- 
-   // Pass 2 - write data.
-   mapinfo->open_for_write();
-+  mapinfo->set_header_crc(mapinfo->compute_header_crc());
-   mapinfo->write_header();
-   mapinfo->write_space(MetaspaceShared::ro, _loader_data->ro_metaspace(), true);
-   mapinfo->write_space(MetaspaceShared::rw, _loader_data->rw_metaspace(), false);
-@@ -861,9 +862,13 @@
- 
-   // Map each shared region
-   if ((_ro_base = mapinfo->map_region(ro)) != NULL &&
-+       mapinfo->verify_region_checksum(ro) &&
-       (_rw_base = mapinfo->map_region(rw)) != NULL &&
-+       mapinfo->verify_region_checksum(rw) &&
-       (_md_base = mapinfo->map_region(md)) != NULL &&
-+       mapinfo->verify_region_checksum(md) &&
-       (_mc_base = mapinfo->map_region(mc)) != NULL &&
-+       mapinfo->verify_region_checksum(mc) &&
-       (image_alignment == (size_t)max_alignment())) {
-     // Success (no need to do anything)
-     return true;
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/runtime/arguments.cpp
---- openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -3536,6 +3536,11 @@
-     return JNI_ENOMEM;
-   }
- 
-+  // Set up VerifySharedSpaces
-+  if (FLAG_IS_DEFAULT(VerifySharedSpaces) && SharedArchiveFile != NULL) {
-+    VerifySharedSpaces = true;
-+  }
-+
-   // Delay warning until here so that we've had a chance to process
-   // the -XX:-PrintWarnings flag
-   if (needs_hotspotrc_warning) {
-diff -r cb9aea9e6eb7 -r f3c772c55002 src/share/vm/runtime/globals.hpp
---- openjdk/hotspot/src/share/vm/runtime/globals.hpp	Tue May 20 19:50:58 2014 -0700
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	Tue Aug 12 17:46:16 2014 -0400
-@@ -3721,6 +3721,10 @@
-   product(bool, UseSharedSpaces, true,                                      \
-           "Use shared spaces for metadata")                                 \
-                                                                             \
-+  product(bool, VerifySharedSpaces, false,                                  \
-+          "Verify shared spaces (false for default archive, true for "      \
-+          "archive specified by -XX:SharedArchiveFile)")                    \
-+                                                                            \
-   product(bool, RequireSharedSpaces, false,                                 \
-           "Require shared spaces for metadata")                             \
-                                                                             \
--- a/patches/hotspot/aarch64/20141014-8046213-testemptybootstrapmethodsattr_failure.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-# HG changeset patch
-# User asaha
-# Date 1402377672 25200
-#      Mon Jun 09 22:21:12 2014 -0700
-# Node ID 6358e85321420be7d53b7cb4ac45ff9ea0390c6f
-# Parent  f3c772c55002ccb7313952d067261951322be263
-8046213: Test test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java Fails
-Reviewed-by: lfoltan
-
-diff -r f3c772c55002 -r 6358e8532142 src/share/vm/classfile/classFileParser.cpp
---- openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue Aug 12 17:46:16 2014 -0400
-+++ openjdk/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Jun 09 22:21:12 2014 -0700
-@@ -2780,11 +2780,6 @@
-   ClassFileStream* cfs = stream();
-   u1* current_start = cfs->current();
- 
--  guarantee_property(attribute_byte_length > sizeof(u2),
--                     "Invalid BootstrapMethods attribute length %u in class file %s",
--                     attribute_byte_length,
--                     CHECK);
--
-   cfs->guarantee_more(attribute_byte_length, CHECK);
- 
-   int attribute_array_length = cfs->get_u2_fast();
--- a/patches/hotspot/aarch64/20141014-8050485-super_causes_verifyerror.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-# HG changeset patch
-# User hseigel
-# Date 1407889765 14400
-#      Tue Aug 12 20:29:25 2014 -0400
-# Node ID fa7db0bbeac1cb2751167ff9134c48aceced1cda
-# Parent  6358e85321420be7d53b7cb4ac45ff9ea0390c6f
-8050485: super() in a try block in a ctor causes VerifyError
-Summary: Parse catch clause paths to ensure they end in throws
-Reviewed-by: dlong, acorn, kamg, ctornqvi, lfoltan
-
-diff -r 6358e8532142 -r fa7db0bbeac1 src/share/vm/classfile/verifier.cpp
---- openjdk/hotspot/src/share/vm/classfile/verifier.cpp	Mon Jun 09 22:21:12 2014 -0700
-+++ openjdk/hotspot/src/share/vm/classfile/verifier.cpp	Tue Aug 12 20:29:25 2014 -0400
-@@ -2233,6 +2233,181 @@
-   }
- }
- 
-+// Look at the method's handlers.  If the bci is in the handler's try block
-+// then check if the handler_pc is already on the stack.  If not, push it.
-+void ClassVerifier::push_handlers(ExceptionTable* exhandlers,
-+                                  GrowableArray<u4>* handler_stack,
-+                                  u4 bci) {
-+  int exlength = exhandlers->length();
-+  for(int x = 0; x < exlength; x++) {
-+    if (bci >= exhandlers->start_pc(x) && bci < exhandlers->end_pc(x)) {
-+      handler_stack->append_if_missing(exhandlers->handler_pc(x));
-+    }
-+  }
-+}
-+
-+// Return TRUE if all code paths starting with start_bc_offset end in
-+// bytecode athrow or loop.
-+bool ClassVerifier::ends_in_athrow(u4 start_bc_offset) {
-+  ResourceMark rm;
-+  // Create bytecode stream.
-+  RawBytecodeStream bcs(method());
-+  u4 code_length = method()->code_size();
-+  bcs.set_start(start_bc_offset);
-+  u4 target;
-+  // Create stack for storing bytecode start offsets for if* and *switch.
-+  GrowableArray<u4>* bci_stack = new GrowableArray<u4>(30);
-+  // Create stack for handlers for try blocks containing this handler.
-+  GrowableArray<u4>* handler_stack = new GrowableArray<u4>(30);
-+  // Create list of visited branch opcodes (goto* and if*).
-+  GrowableArray<u4>* visited_branches = new GrowableArray<u4>(30);
-+  ExceptionTable exhandlers(_method());
-+
-+  while (true) {
-+    if (bcs.is_last_bytecode()) {
-+      // if no more starting offsets to parse or if at the end of the
-+      // method then return false.
-+      if ((bci_stack->is_empty()) || ((u4)bcs.end_bci() == code_length))
-+        return false;
-+      // Pop a bytecode starting offset and scan from there.
-+      bcs.set_start(bci_stack->pop());
-+    }
-+    Bytecodes::Code opcode = bcs.raw_next();
-+    u4 bci = bcs.bci();
-+
-+    // If the bytecode is in a TRY block, push its handlers so they
-+    // will get parsed.
-+    push_handlers(&exhandlers, handler_stack, bci);
-+
-+    switch (opcode) {
-+      case Bytecodes::_if_icmpeq:
-+      case Bytecodes::_if_icmpne:
-+      case Bytecodes::_if_icmplt:
-+      case Bytecodes::_if_icmpge:
-+      case Bytecodes::_if_icmpgt:
-+      case Bytecodes::_if_icmple:
-+      case Bytecodes::_ifeq:
-+      case Bytecodes::_ifne:
-+      case Bytecodes::_iflt:
-+      case Bytecodes::_ifge:
-+      case Bytecodes::_ifgt:
-+      case Bytecodes::_ifle:
-+      case Bytecodes::_if_acmpeq:
-+      case Bytecodes::_if_acmpne:
-+      case Bytecodes::_ifnull:
-+      case Bytecodes::_ifnonnull:
-+        target = bcs.dest();
-+        if (visited_branches->contains(bci)) {
-+          if (bci_stack->is_empty()) return true;
-+          // Pop a bytecode starting offset and scan from there.
-+          bcs.set_start(bci_stack->pop());
-+        } else {
-+          if (target > bci) { // forward branch
-+            if (target >= code_length) return false;
-+            // Push the branch target onto the stack.
-+            bci_stack->push(target);
-+            // then, scan bytecodes starting with next.
-+            bcs.set_start(bcs.next_bci());
-+          } else { // backward branch
-+            // Push bytecode offset following backward branch onto the stack.
-+            bci_stack->push(bcs.next_bci());
-+            // Check bytecodes starting with branch target.
-+            bcs.set_start(target);
-+          }
-+          // Record target so we don't branch here again.
-+          visited_branches->append(bci);
-+        }
-+        break;
-+
-+      case Bytecodes::_goto:
-+      case Bytecodes::_goto_w:
-+        target = (opcode == Bytecodes::_goto ? bcs.dest() : bcs.dest_w());
-+        if (visited_branches->contains(bci)) {
-+          if (bci_stack->is_empty()) return true;
-+          // Been here before, pop new starting offset from stack.
-+          bcs.set_start(bci_stack->pop());
-+        } else {
-+          if (target >= code_length) return false;
-+          // Continue scanning from the target onward.
-+          bcs.set_start(target);
-+          // Record target so we don't branch here again.
-+          visited_branches->append(bci);
-+        }
-+        break;
-+
-+      // Check that all switch alternatives end in 'athrow' bytecodes. Since it
-+      // is  difficult to determine where each switch alternative ends, parse
-+      // each switch alternative until either hit a 'return', 'athrow', or reach
-+      // the end of the method's bytecodes.  This is gross but should be okay
-+      // because:
-+      // 1. tableswitch and lookupswitch byte codes in handlers for ctor explicit
-+      //    constructor invocations should be rare.
-+      // 2. if each switch alternative ends in an athrow then the parsing should be
-+      //    short.  If there is no athrow then it is bogus code, anyway.
-+      case Bytecodes::_lookupswitch:
-+      case Bytecodes::_tableswitch:
-+        {
-+          address aligned_bcp = (address) round_to((intptr_t)(bcs.bcp() + 1), jintSize);
-+          u4 default_offset = Bytes::get_Java_u4(aligned_bcp) + bci;
-+          int keys, delta;
-+          if (opcode == Bytecodes::_tableswitch) {
-+            jint low = (jint)Bytes::get_Java_u4(aligned_bcp + jintSize);
-+            jint high = (jint)Bytes::get_Java_u4(aligned_bcp + 2*jintSize);
-+            // This is invalid, but let the regular bytecode verifier
-+            // report this because the user will get a better error message.
-+            if (low > high) return true;
-+            keys = high - low + 1;
-+            delta = 1;
-+          } else {
-+            keys = (int)Bytes::get_Java_u4(aligned_bcp + jintSize);
-+            delta = 2;
-+          }
-+          // Invalid, let the regular bytecode verifier deal with it.
-+          if (keys < 0) return true;
-+
-+          // Push the offset of the next bytecode onto the stack.
-+          bci_stack->push(bcs.next_bci());
-+
-+          // Push the switch alternatives onto the stack.
-+          for (int i = 0; i < keys; i++) {
-+            u4 target = bci + (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize);
-+            if (target > code_length) return false;
-+            bci_stack->push(target);
-+          }
-+
-+          // Start bytecode parsing for the switch at the default alternative.
-+          if (default_offset > code_length) return false;
-+          bcs.set_start(default_offset);
-+          break;
-+        }
-+
-+      case Bytecodes::_return:
-+        return false;
-+
-+      case Bytecodes::_athrow:
-+        {
-+          if (bci_stack->is_empty()) {
-+            if (handler_stack->is_empty()) {
-+              return true;
-+            } else {
-+              // Parse the catch handlers for try blocks containing athrow.
-+              bcs.set_start(handler_stack->pop());
-+            }
-+          } else {
-+            // Pop a bytecode offset and starting scanning from there.
-+            bcs.set_start(bci_stack->pop());
-+          }
-+        }
-+        break;
-+
-+      default:
-+        ;
-+    } // end switch
-+  } // end while loop
-+
-+  return false;
-+}
-+
- void ClassVerifier::verify_invoke_init(
-     RawBytecodeStream* bcs, u2 ref_class_index, VerificationType ref_class_type,
-     StackMapFrame* current_frame, u4 code_length, bool *this_uninit,
-@@ -2259,18 +2434,26 @@
-       return;
-     }
- 
--    // Make sure that this call is not done from within a TRY block because
--    // that can result in returning an incomplete object.  Simply checking
--    // (bci >= start_pc) also ensures that this call is not done after a TRY
--    // block.  That is also illegal because this call must be the first Java
--    // statement in the constructor.
-+    // Check if this call is done from inside of a TRY block.  If so, make
-+    // sure that all catch clause paths end in a throw.  Otherwise, this
-+    // can result in returning an incomplete object.
-     ExceptionTable exhandlers(_method());
-     int exlength = exhandlers.length();
-     for(int i = 0; i < exlength; i++) {
--      if (bci >= exhandlers.start_pc(i)) {
--        verify_error(ErrorContext::bad_code(bci),
--                     "Bad <init> method call from after the start of a try block");
--        return;
-+      u2 start_pc = exhandlers.start_pc(i);
-+      u2 end_pc = exhandlers.end_pc(i);
-+
-+      if (bci >= start_pc && bci < end_pc) {
-+        if (!ends_in_athrow(exhandlers.handler_pc(i))) {
-+          verify_error(ErrorContext::bad_code(bci),
-+            "Bad <init> method call from after the start of a try block");
-+          return;
-+        } else if (VerboseVerification) {
-+          ResourceMark rm;
-+          tty->print_cr(
-+            "Survived call to ends_in_athrow(): %s",
-+                        current_class()->name()->as_C_string());
-+        }
-       }
-     }
- 
-diff -r 6358e8532142 -r fa7db0bbeac1 src/share/vm/classfile/verifier.hpp
---- openjdk/hotspot/src/share/vm/classfile/verifier.hpp	Mon Jun 09 22:21:12 2014 -0700
-+++ openjdk/hotspot/src/share/vm/classfile/verifier.hpp	Tue Aug 12 20:29:25 2014 -0400
-@@ -30,6 +30,7 @@
- #include "oops/klass.hpp"
- #include "oops/method.hpp"
- #include "runtime/handles.hpp"
-+#include "utilities/growableArray.hpp"
- #include "utilities/exceptions.hpp"
- 
- // The verifier class
-@@ -306,6 +307,16 @@
-     StackMapFrame* current_frame, u4 code_length, bool* this_uninit,
-     constantPoolHandle cp, TRAPS);
- 
-+  // Used by ends_in_athrow() to push all handlers that contain bci onto
-+  // the handler_stack, if the handler is not already on the stack.
-+  void push_handlers(ExceptionTable* exhandlers,
-+                     GrowableArray<u4>* handler_stack,
-+                     u4 bci);
-+
-+  // Returns true if all paths starting with start_bc_offset end in athrow
-+  // bytecode or loop.
-+  bool ends_in_athrow(u4 start_bc_offset);
-+
-   void verify_invoke_instructions(
-     RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame,
-     bool* this_uninit, VerificationType return_type,
--- a/patches/hotspot/aarch64/systemtap_gc.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,373 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/oopMap.cpp openjdk/hotspot/src/share/vm/compiler/oopMap.cpp
---- openjdk.orig/hotspot/src/share/vm/compiler/oopMap.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/oopMap.cpp	2014-03-07 04:29:33.230530073 +0000
-@@ -33,9 +33,13 @@
- #include "memory/resourceArea.hpp"
- #include "runtime/frame.inline.hpp"
- #include "runtime/signature.hpp"
-+#include "utilities/dtrace.hpp"
- #ifdef COMPILER1
- #include "c1/c1_Defs.hpp"
- #endif
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL1(provider, gc__collection__delete, *uintptr_t);
-+#endif /* !USDT2 */
- 
- // OopMapStream
- 
-@@ -677,6 +681,9 @@
-                     " - Derived: " INTPTR_FORMAT "  Base: " INTPTR_FORMAT " (Offset: %d)",
-           derived_loc, (address)*derived_loc, (address)base, offset);
-     }
-+#ifndef USDT2
-+  HS_DTRACE_PROBE1(hotspot, gc__collection__delete, entry);
-+#endif /* !USDT2 */
- 
-     // Delete entry
-     delete entry;
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-03-07 04:29:33.234530133 +0000
-@@ -62,6 +62,12 @@
- #include "runtime/vmThread.hpp"
- #include "services/memoryService.hpp"
- #include "services/runtimeService.hpp"
-+#include "utilities/dtrace.hpp"
-+
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- 
- // statics
- CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL;
-@@ -1642,7 +1648,13 @@
-                                             size_t size,
-                                             bool   tlab)
- {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, tlab);
-+#endif /* !USDT2 */
-   collector()->collect(full, clear_all_soft_refs, size, tlab);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, tlab);
-+#endif /* !USDT2 */
- }
- 
- void CMSCollector::collect(bool   full,
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	2014-03-07 04:33:00.601620772 +0000
-@@ -49,8 +49,13 @@
- #include "runtime/thread.hpp"
- #include "runtime/vmThread.hpp"
- #include "utilities/copy.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/events.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__end, *uintptr_t, *uintptr_t);
-+ #endif /* !USDT2 */ 
- class HeapRegion;
- 
- void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
-@@ -84,6 +89,9 @@
-   // The marking doesn't preserve the marks of biased objects.
-   BiasedLocking::preserve_marks();
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__G1__begin, &sh, sh->gc_cause());
-+#endif /* !USDT2 */
-   mark_sweep_phase1(marked_for_unloading, clear_all_softrefs);
- 
-   mark_sweep_phase2();
-@@ -99,6 +107,9 @@
-   BiasedLocking::restore_marks();
-   GenMarkSweep::deallocate_stacks();
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__G1__end, &sh, sh->gc_cause());
-+#endif /* !USDT2 */
-   // "free at last gc" is calculated from these.
-   // CHF: cheating for now!!!
-   //  Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	2014-03-07 04:31:58.396693660 +0000
-@@ -43,8 +43,14 @@
- #include "runtime/java.hpp"
- #include "runtime/vmThread.hpp"
- #include "services/memTracker.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/vmError.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__end, *uintptr_t, *uintptr_t);
-+#endif /* !USDT2 */
-+
- PSYoungGen*  ParallelScavengeHeap::_young_gen = NULL;
- PSOldGen*    ParallelScavengeHeap::_old_gen = NULL;
- PSAdaptiveSizePolicy* ParallelScavengeHeap::_size_policy = NULL;
-@@ -530,7 +536,13 @@
-   }
- 
-   VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__begin, &op, cause);
-+#endif /* !USDT2 */
-   VMThread::execute(&op);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__end, &op, cause);
-+#endif /* !USDT2 */
- }
- 
- void ParallelScavengeHeap::oop_iterate(ExtendedOopClosure* cl) {
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2014-03-07 04:29:33.234530133 +0000
-@@ -56,11 +56,18 @@
- #include "services/management.hpp"
- #include "services/memoryService.hpp"
- #include "services/memTracker.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/events.hpp"
- #include "utilities/stack.inline.hpp"
- 
- #include <math.h>
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__ParallelCompact__clear, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__parallel__collect, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__move, *uintptr_t, *uintptr_t, *uintptr_t, *uintptr_t);
-+#endif /* !USDT2 */
-+
- // All sizes are in HeapWords.
- const size_t ParallelCompactData::Log2RegionSize  = 16; // 64K words
- const size_t ParallelCompactData::RegionSize      = (size_t)1 << Log2RegionSize;
-@@ -451,6 +458,9 @@
- 
- void ParallelCompactData::clear()
- {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__ParallelCompact__clear, &_region_data, _region_data->data_location());
-+#endif /* !USDT2 */
-   memset(_region_data, 0, _region_vspace->committed_size());
-   memset(_block_data, 0, _block_vspace->committed_size());
- }
-@@ -1977,6 +1987,9 @@
-          "should be in vm thread");
- 
-   ParallelScavengeHeap* heap = gc_heap();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__parallel__collect, heap, heap->gc_cause());
-+#endif /* !USDT2 */
-   GCCause::Cause gc_cause = heap->gc_cause();
-   assert(!heap->is_gc_active(), "not reentrant");
- 
-@@ -3269,6 +3282,9 @@
-   // past the end of the partial object entering the region (if any).
-   HeapWord* const dest_addr = sd.partial_obj_end(dp_region);
-   HeapWord* const new_top = _space_info[space_id].new_top();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__move, &beg_addr, &end_addr, &dest_addr, &new_top);
-+#endif /* !USDT2 */
-   assert(new_top >= dest_addr, "bad new_top value");
-   const size_t words = pointer_delta(new_top, dest_addr);
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	2014-03-07 04:29:33.234530133 +0000
-@@ -54,8 +54,17 @@
- #include "runtime/vmThread.hpp"
- #include "runtime/vm_operations.hpp"
- #include "services/memoryService.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/stack.inline.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__end, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__end, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__end, *uintptr_t, *uintptr_t);
-+#endif /* !USDT2 */
- 
- HeapWord*                  PSScavenge::_to_space_top_before_gc = NULL;
- int                        PSScavenge::_consecutive_skipped_scavenges = 0;
-@@ -228,7 +237,13 @@
-   PSAdaptiveSizePolicy* policy = heap->size_policy();
-   IsGCActiveMark mark;
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__begin, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-   const bool scavenge_done = PSScavenge::invoke_no_policy();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__end, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-   const bool need_full_gc = !scavenge_done ||
-     policy->should_full_GC(heap->old_gen()->free_in_bytes());
-   bool full_gc_done = false;
-@@ -245,9 +260,21 @@
-     const bool clear_all_softrefs = cp->should_clear_all_soft_refs();
- 
-     if (UseParallelOldGC) {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__begin, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-       full_gc_done = PSParallelCompact::invoke_no_policy(clear_all_softrefs);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__end, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-     } else {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__begin, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-       full_gc_done = PSMarkSweep::invoke_no_policy(clear_all_softrefs);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__end, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-     }
-   }
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2014-03-07 04:29:33.234530133 +0000
-@@ -54,6 +54,12 @@
- #include "utilities/copy.hpp"
- #include "utilities/globalDefinitions.hpp"
- #include "utilities/workgroup.hpp"
-+#include "utilities/dtrace.hpp"
-+
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- 
- #ifdef _MSC_VER
- #pragma warning( push )
-@@ -911,6 +917,9 @@
-                                bool   clear_all_soft_refs,
-                                size_t size,
-                                bool   is_tlab) {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   assert(full || size > 0, "otherwise we don't want to collect");
- 
-   GenCollectedHeap* gch = GenCollectedHeap::heap();
-@@ -1061,6 +1070,10 @@
-     gch->print_heap_change(gch_prev_used);
-   }
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-+
-   if (PrintGCDetails && ParallelGCVerbose) {
-     TASKQUEUE_STATS_ONLY(thread_state_set.print_termination_stats());
-     TASKQUEUE_STATS_ONLY(thread_state_set.print_taskqueue_stats());
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/defNewGeneration.cpp openjdk/hotspot/src/share/vm/memory/defNewGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/defNewGeneration.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/defNewGeneration.cpp	2014-03-07 04:31:15.676056944 +0000
-@@ -44,8 +44,13 @@
- #include "runtime/java.hpp"
- #include "runtime/thread.inline.hpp"
- #include "utilities/copy.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/stack.inline.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- //
- // DefNewGeneration functions.
- 
-@@ -558,6 +563,9 @@
-                                bool   clear_all_soft_refs,
-                                size_t size,
-                                bool   is_tlab) {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   assert(full || size > 0, "otherwise we don't want to collect");
- 
-   GenCollectedHeap* gch = GenCollectedHeap::heap();
-@@ -706,6 +714,10 @@
-   jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
-   update_time_of_last_gc(now);
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-+
-   gch->trace_heap_after_gc(&gc_tracer);
-   gc_tracer.report_tenuring_threshold(tenuring_threshold());
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/generation.cpp openjdk/hotspot/src/share/vm/memory/generation.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/generation.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/generation.cpp	2014-03-07 04:29:33.234530133 +0000
-@@ -41,8 +41,14 @@
- #include "oops/oop.inline.hpp"
- #include "runtime/java.hpp"
- #include "utilities/copy.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/events.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
-+
- Generation::Generation(ReservedSpace rs, size_t initial_size, int level) :
-   _level(level),
-   _ref_processor(NULL) {
-@@ -640,7 +646,13 @@
-   SerialOldTracer* gc_tracer = GenMarkSweep::gc_tracer();
-   gc_tracer->report_gc_start(gch->gc_cause(), gc_timer->gc_start());
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   GenMarkSweep::invoke_at_safepoint(_level, ref_processor(), clear_all_soft_refs);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
- 
-   gc_timer->register_gc_end();
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/tenuredGeneration.cpp openjdk/hotspot/src/share/vm/memory/tenuredGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/tenuredGeneration.cpp	2014-03-06 09:11:53.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/tenuredGeneration.cpp	2014-03-07 04:30:33.691431197 +0000
-@@ -34,6 +34,12 @@
- #include "oops/oop.inline.hpp"
- #include "runtime/java.hpp"
- #include "utilities/macros.hpp"
-+#include "utilities/dtrace.hpp"
-+
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- 
- TenuredGeneration::TenuredGeneration(ReservedSpace rs,
-                                      size_t initial_byte_size, int level,
-@@ -152,8 +158,14 @@
-                                 size_t size,
-                                 bool   is_tlab) {
-   retire_alloc_buffers_before_full_gc();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   OneContigSpaceCardGeneration::collect(full, clear_all_soft_refs,
-                                         size, is_tlab);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
- }
- 
- void TenuredGeneration::compute_new_size() {
--- a/patches/hotspot/aarch64/werror.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make	2014-03-25 14:07:53.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2014-03-28 03:26:57.229802760 +0000
-@@ -205,7 +205,9 @@
- endif
- 
- # Compiler warnings are treated as errors
-+ifneq ($(COMPILER_WARNINGS_FATAL),false)
- WARNINGS_ARE_ERRORS = -Werror
-+endif
- 
- ifeq ($(USE_CLANG), true)
-   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
-diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/adlc.make openjdk/hotspot/make/solaris/makefiles/adlc.make
---- openjdk.orig/hotspot/make/solaris/makefiles/adlc.make	2014-03-25 14:07:53.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/adlc.make	2014-03-28 03:26:02.604988364 +0000
-@@ -73,8 +73,10 @@
- 
- # CFLAGS_WARN holds compiler options to suppress/enable warnings.
- # Compiler warnings are treated as errors
--ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
--  CFLAGS_WARN = +w -errwarn
-+ifneq ($(COMPILER_WARNINGS_FATAL),false)
-+  ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
-+    CFLAGS_WARN = +w -errwarn
-+  endif
- endif
- CFLAGS += $(CFLAGS_WARN)
- 
-diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make
---- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make	2014-03-25 14:07:53.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2014-03-28 03:27:28.206264586 +0000
-@@ -116,7 +116,9 @@
- 
- 
- # Compiler warnings are treated as errors 
--WARNINGS_ARE_ERRORS = -Werror 
-+ifneq ($(COMPILER_WARNINGS_FATAL),false)
-+WARNINGS_ARE_ERRORS = -Werror
-+endif
- # Enable these warnings. See 'info gcc' about details on these options
- WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef
- CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
--- a/patches/hotspot/default/systemtap_gc.patch	Thu Jan 22 01:27:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,379 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/oopMap.cpp openjdk/hotspot/src/share/vm/compiler/oopMap.cpp
---- openjdk.orig/hotspot/src/share/vm/compiler/oopMap.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/oopMap.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -33,9 +33,13 @@
- #include "memory/resourceArea.hpp"
- #include "runtime/frame.inline.hpp"
- #include "runtime/signature.hpp"
-+#include "utilities/dtrace.hpp"
- #ifdef COMPILER1
- #include "c1/c1_Defs.hpp"
- #endif
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL1(provider, gc__collection__delete, *uintptr_t);
-+#endif /* !USDT2 */
- 
- // OopMapStream
- 
-@@ -677,6 +681,9 @@
-                     " - Derived: " INTPTR_FORMAT "  Base: " INTPTR_FORMAT " (Offset: %d)",
-           derived_loc, (address)*derived_loc, (address)base, offset);
-     }
-+#ifndef USDT2
-+  HS_DTRACE_PROBE1(hotspot, gc__collection__delete, entry);
-+#endif /* !USDT2 */
- 
-     // Delete entry
-     delete entry;
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -59,6 +59,12 @@
- #include "runtime/vmThread.hpp"
- #include "services/memoryService.hpp"
- #include "services/runtimeService.hpp"
-+#include "utilities/dtrace.hpp"
-+
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- 
- // statics
- CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL;
-@@ -1647,7 +1653,13 @@
-                                             size_t size,
-                                             bool   tlab)
- {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, tlab);
-+#endif /* !USDT2 */
-   collector()->collect(full, clear_all_soft_refs, size, tlab);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, tlab);
-+#endif /* !USDT2 */
- }
- 
- void CMSCollector::collect(bool   full,
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp openjdk/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -50,8 +50,13 @@
- #include "runtime/thread.hpp"
- #include "runtime/vmThread.hpp"
- #include "utilities/copy.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/events.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__G1__end, *uintptr_t, *uintptr_t);
-+ #endif /* !USDT2 */ 
- class HeapRegion;
- 
- void G1MarkSweep::invoke_at_safepoint(ReferenceProcessor* rp,
-@@ -89,6 +94,9 @@
-   // The marking doesn't preserve the marks of biased objects.
-   BiasedLocking::preserve_marks();
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__G1__begin, &sh, sh->gc_cause());
-+#endif /* !USDT2 */
-   mark_sweep_phase1(marked_for_unloading, clear_all_softrefs);
- 
-   mark_sweep_phase2();
-@@ -108,6 +116,9 @@
-   GenRemSet* rs = sh->rem_set();
-   rs->invalidate(sh->perm_gen()->used_region(), true /*whole_heap*/);
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__G1__end, &sh, sh->gc_cause());
-+#endif /* !USDT2 */
-   // "free at last gc" is calculated from these.
-   // CHF: cheating for now!!!
-   //  Universe::set_heap_capacity_at_last_gc(Universe::heap()->capacity());
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -54,6 +54,12 @@
- #include "utilities/copy.hpp"
- #include "utilities/globalDefinitions.hpp"
- #include "utilities/workgroup.hpp"
-+#include "utilities/dtrace.hpp"
-+
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__parnew__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- 
- #ifdef _MSC_VER
- #pragma warning( push )
-@@ -919,6 +925,9 @@
-                                bool   clear_all_soft_refs,
-                                size_t size,
-                                bool   is_tlab) {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   assert(full || size > 0, "otherwise we don't want to collect");
- 
-   GenCollectedHeap* gch = GenCollectedHeap::heap();
-@@ -1070,6 +1079,10 @@
-     gch->print_heap_change(gch_prev_used);
-   }
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__parnew__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-+
-   if (PrintGCDetails && ParallelGCVerbose) {
-     TASKQUEUE_STATS_ONLY(thread_state_set.print_termination_stats());
-     TASKQUEUE_STATS_ONLY(thread_state_set.print_taskqueue_stats());
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -43,8 +43,14 @@
- #include "runtime/java.hpp"
- #include "runtime/vmThread.hpp"
- #include "services/memTracker.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/vmError.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__parscavenge__heap__end, *uintptr_t, *uintptr_t);
-+#endif /* !USDT2 */
-+
- PSYoungGen*  ParallelScavengeHeap::_young_gen = NULL;
- PSOldGen*    ParallelScavengeHeap::_old_gen = NULL;
- PSPermGen*   ParallelScavengeHeap::_perm_gen = NULL;
-@@ -815,7 +821,13 @@
-   }
- 
-   VM_ParallelGCSystemGC op(gc_count, full_gc_count, cause);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__begin, &op, cause);
-+#endif /* !USDT2 */
-   VMThread::execute(&op);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__parscavenge__heap__end, &op, cause);
-+#endif /* !USDT2 */
- }
- 
- // This interface assumes that it's being called by the
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -58,11 +58,18 @@
- #include "services/management.hpp"
- #include "services/memoryService.hpp"
- #include "services/memTracker.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/events.hpp"
- #include "utilities/stack.inline.hpp"
- 
- #include <math.h>
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__ParallelCompact__clear, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__parallel__collect, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__move, *uintptr_t, *uintptr_t, *uintptr_t, *uintptr_t);
-+#endif /* !USDT2 */
-+
- // All sizes are in HeapWords.
- const size_t ParallelCompactData::Log2RegionSize  = 16; // 64K words
- const size_t ParallelCompactData::RegionSize      = (size_t)1 << Log2RegionSize;
-@@ -469,6 +476,9 @@
- 
- void ParallelCompactData::clear()
- {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__ParallelCompact__clear, &_region_data, _region_data->data_location());
-+#endif /* !USDT2 */
-   memset(_region_data, 0, _region_vspace->committed_size());
-   memset(_block_data, 0, _block_vspace->committed_size());
- }
-@@ -2012,6 +2022,9 @@
-          "should be in vm thread");
- 
-   ParallelScavengeHeap* heap = gc_heap();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__parallel__collect, heap, heap->gc_cause());
-+#endif /* !USDT2 */
-   GCCause::Cause gc_cause = heap->gc_cause();
-   assert(!heap->is_gc_active(), "not reentrant");
- 
-@@ -3511,6 +3524,9 @@
-   // past the end of the partial object entering the region (if any).
-   HeapWord* const dest_addr = sd.partial_obj_end(dp_region);
-   HeapWord* const new_top = _space_info[space_id].new_top();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__move, &beg_addr, &end_addr, &dest_addr, &new_top);
-+#endif /* !USDT2 */
-   assert(new_top >= dest_addr, "bad new_top value");
-   const size_t words = pointer_delta(new_top, dest_addr);
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp	2014-01-24 04:36:46.878006161 +0000
-@@ -55,8 +55,17 @@
- #include "runtime/vmThread.hpp"
- #include "runtime/vm_operations.hpp"
- #include "services/memoryService.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/stack.inline.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSScavenge__end, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSParallelCompact__end, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__begin, *uintptr_t, *uintptr_t);
-+  HS_DTRACE_PROBE_DECL2(provider, gc__collection__PSMarkSweep__end, *uintptr_t, *uintptr_t);
-+#endif /* !USDT2 */
- 
- HeapWord*                  PSScavenge::_to_space_top_before_gc = NULL;
- int                        PSScavenge::_consecutive_skipped_scavenges = 0;
-@@ -231,7 +240,13 @@
-   PSAdaptiveSizePolicy* policy = heap->size_policy();
-   IsGCActiveMark mark;
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__begin, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-   const bool scavenge_done = PSScavenge::invoke_no_policy();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSScavenge__end, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-   const bool need_full_gc = !scavenge_done ||
-     policy->should_full_GC(heap->old_gen()->free_in_bytes());
-   bool full_gc_done = false;
-@@ -248,9 +263,21 @@
-     const bool clear_all_softrefs = cp->should_clear_all_soft_refs();
- 
-     if (UseParallelOldGC) {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__begin, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-       full_gc_done = PSParallelCompact::invoke_no_policy(clear_all_softrefs);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSParallelCompact__end, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-     } else {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__begin, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-       full_gc_done = PSMarkSweep::invoke_no_policy(clear_all_softrefs);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE2(hotspot, gc__collection__PSMarkSweep__end, &heap, heap->gc_cause());
-+#endif /* !USDT2 */
-     }
-   }
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/defNewGeneration.cpp openjdk/hotspot/src/share/vm/memory/defNewGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/defNewGeneration.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/defNewGeneration.cpp	2014-01-24 04:36:46.882006220 +0000
-@@ -42,6 +42,7 @@
- #include "oops/oop.inline.hpp"
- #include "runtime/java.hpp"
- #include "utilities/copy.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/stack.inline.hpp"
- #ifdef TARGET_OS_FAMILY_linux
- # include "thread_linux.inline.hpp"
-@@ -55,7 +56,10 @@
- #ifdef TARGET_OS_FAMILY_bsd
- # include "thread_bsd.inline.hpp"
- #endif
--
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__defnew__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- //
- // DefNewGeneration functions.
- 
-@@ -534,6 +538,9 @@
-                                bool   clear_all_soft_refs,
-                                size_t size,
-                                bool   is_tlab) {
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   assert(full || size > 0, "otherwise we don't want to collect");
- 
-   GenCollectedHeap* gch = GenCollectedHeap::heap();
-@@ -679,6 +686,10 @@
-   jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
-   update_time_of_last_gc(now);
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__defnew__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-+
-   gch->trace_heap_after_gc(&gc_tracer);
-   gc_tracer.report_tenuring_threshold(tenuring_threshold());
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/generation.cpp openjdk/hotspot/src/share/vm/memory/generation.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/generation.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/generation.cpp	2014-01-24 04:37:16.862442615 +0000
-@@ -41,8 +41,14 @@
- #include "oops/oop.inline.hpp"
- #include "runtime/java.hpp"
- #include "utilities/copy.hpp"
-+#include "utilities/dtrace.hpp"
- #include "utilities/events.hpp"
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__contig__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
-+
- Generation::Generation(ReservedSpace rs, size_t initial_size, int level) :
-   _level(level),
-   _ref_processor(NULL) {
-@@ -481,7 +487,13 @@
-   SerialOldTracer* gc_tracer = GenMarkSweep::gc_tracer();
-   gc_tracer->report_gc_start(gch->gc_cause(), gc_timer->gc_start());
- 
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   GenMarkSweep::invoke_at_safepoint(_level, ref_processor(), clear_all_soft_refs);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__contig__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
- 
-   gc_timer->register_gc_end();
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/tenuredGeneration.cpp openjdk/hotspot/src/share/vm/memory/tenuredGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/tenuredGeneration.cpp	2014-01-23 23:25:39.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/tenuredGeneration.cpp	2014-01-24 04:36:46.882006220 +0000
-@@ -33,6 +33,12 @@
- #include "memory/tenuredGeneration.hpp"
- #include "oops/oop.inline.hpp"
- #include "runtime/java.hpp"
-+#include "utilities/dtrace.hpp"
-+
-+#ifndef USDT2
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__begin, bool, bool, size_t, bool);
-+  HS_DTRACE_PROBE_DECL4(provider, gc__collection__tenured__end, bool, bool, size_t, bool);
-+#endif /* !USDT2 */
- 
- TenuredGeneration::TenuredGeneration(ReservedSpace rs,
-                                      size_t initial_byte_size, int level,
-@@ -307,8 +313,14 @@
-                                 size_t size,
-                                 bool   is_tlab) {
-   retire_alloc_buffers_before_full_gc();
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__begin, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
-   OneContigSpaceCardGeneration::collect(full, clear_all_soft_refs,
-                                         size, is_tlab);
-+#ifndef USDT2
-+  HS_DTRACE_PROBE4(hotspot, gc__collection__tenured__end, full, clear_all_soft_refs, size, is_tlab);
-+#endif  /* !USDT2 */
- }
- 
- void TenuredGeneration::update_gc_stats(int current_level,