Tue, 27 May 2014 08:44:23 -0700
8038422: CDS test failed: assert((size % os::vm_allocation_granularity()) == 0) failed when limiting SharedMiscDataSize
Summary: In debug version, the assert is against os::vm_allocation_granularity(), but in initialization, we use os::vm_page_size() to align the allocation size. In windows, _vm_page_size and _vm_allocation_granularity may not be same. In debug version, the assert is against os::vm_allocation_granularity(), but in initialization, we use os::vm_page_size() to align the allocation size. In windows, _vm_page_size and _vm_allocation_granularity may not be same.
Reviewed-by: dholmes, iklam, jiangli, coleenp
Contributed-by: yumin.qi@oracle.com
phh@3492 | 1 | # |
dcubed@6703 | 2 | # Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved. |
phh@3492 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
phh@3492 | 4 | # |
phh@3492 | 5 | # This code is free software; you can redistribute it and/or modify it |
phh@3492 | 6 | # under the terms of the GNU General Public License version 2 only, as |
phh@3492 | 7 | # published by the Free Software Foundation. |
phh@3492 | 8 | # |
phh@3492 | 9 | # This code is distributed in the hope that it will be useful, but WITHOUT |
phh@3492 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
phh@3492 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
phh@3492 | 12 | # version 2 for more details (a copy is included in the LICENSE file that |
phh@3492 | 13 | # accompanied this code). |
phh@3492 | 14 | # |
phh@3492 | 15 | # You should have received a copy of the GNU General Public License version |
phh@3492 | 16 | # 2 along with this work; if not, write to the Free Software Foundation, |
phh@3492 | 17 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
phh@3492 | 18 | # |
phh@3492 | 19 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
phh@3492 | 20 | # or visit www.oracle.com if you need additional information or have any |
phh@3492 | 21 | # questions. |
dcubed@5898 | 22 | # |
phh@3492 | 23 | # |
phh@3492 | 24 | |
phh@3492 | 25 | # macosx universal builds |
phh@3492 | 26 | universal_product: |
phh@3492 | 27 | $(MAKE) MACOSX_UNIVERSAL=true all_product_universal |
kvn@7138 | 28 | universal_optimized: |
kvn@7138 | 29 | $(MAKE) MACOSX_UNIVERSAL=true all_optimized_universal |
phh@3492 | 30 | universal_fastdebug: |
phh@3492 | 31 | $(MAKE) MACOSX_UNIVERSAL=true all_fastdebug_universal |
phh@3492 | 32 | universal_debug: |
phh@3492 | 33 | $(MAKE) MACOSX_UNIVERSAL=true all_debug_universal |
phh@3492 | 34 | |
phh@3492 | 35 | |
phh@3492 | 36 | # Universal builds include 1 or more architectures in a single binary |
phh@3492 | 37 | all_product_universal: |
phh@3492 | 38 | # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_PRODUCT_TARGETS) |
phh@3492 | 39 | $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_PRODUCT_TARGETS) |
dcubed@5898 | 40 | $(QUIETLY) $(MAKE) BUILD_FLAVOR=product EXPORT_SUBDIR= universalize |
kvn@7138 | 41 | all_optimized_universal: |
kvn@7138 | 42 | # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_OPTIMIZED_TARGETS) |
kvn@7138 | 43 | $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_OPTIMIZED_TARGETS) |
kvn@7138 | 44 | $(QUIETLY) $(MAKE) BUILD_FLAVOR=optimized EXPORT_SUBDIR=/optimized universalize |
phh@3492 | 45 | all_fastdebug_universal: |
phh@3492 | 46 | # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_FASTDEBUG_TARGETS) |
phh@3492 | 47 | $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_FASTDEBUG_TARGETS) |
dcubed@5898 | 48 | $(QUIETLY) $(MAKE) BUILD_FLAVOR=fastdebug EXPORT_SUBDIR=/fastdebug universalize |
phh@3492 | 49 | all_debug_universal: |
phh@3492 | 50 | # $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=32 $(COMMON_VM_DEBUG_TARGETS) |
phh@3492 | 51 | $(QUIETLY) $(MAKE) ARCH_DATA_MODEL=64 $(COMMON_VM_DEBUG_TARGETS) |
dcubed@5898 | 52 | $(QUIETLY) $(MAKE) BUILD_FLAVOR=debug EXPORT_SUBDIR=/debug universalize |
phh@3492 | 53 | |
phh@3492 | 54 | |
phh@3492 | 55 | # Consolidate architecture builds into a single Universal binary |
phh@3492 | 56 | universalize: $(UNIVERSAL_LIPO_LIST) $(UNIVERSAL_COPY_LIST) |
phh@3492 | 57 | $(RM) -r $(EXPORT_PATH)/jre/lib/{i386,amd64} |
phh@3492 | 58 | |
phh@3492 | 59 | |
phh@3492 | 60 | # Package built libraries in a universal binary |
phh@3492 | 61 | $(UNIVERSAL_LIPO_LIST): |
phh@3492 | 62 | BUILT_LIPO_FILES="`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) 2>/dev/null`"; \ |
phh@3492 | 63 | if [ -n "$${BUILT_LIPO_FILES}" ]; then \ |
phh@3492 | 64 | $(MKDIR) -p $(shell dirname $@); \ |
phh@3492 | 65 | lipo -create -output $@ $${BUILT_LIPO_FILES}; \ |
dcubed@5898 | 66 | fi |
phh@3492 | 67 | |
phh@3492 | 68 | |
phh@3492 | 69 | # Copy built non-universal binaries in place |
dcubed@5898 | 70 | # - copies directories; including empty dirs |
dcubed@5898 | 71 | # - copies files, symlinks, other non-directory files |
phh@3492 | 72 | $(UNIVERSAL_COPY_LIST): |
dcubed@5898 | 73 | BUILT_COPY_FILES="`find $(EXPORT_JRE_LIB_DIR)/{i386,amd64}/$(subst $(EXPORT_JRE_LIB_DIR)/,,$@) -prune 2>/dev/null`"; \ |
phh@3512 | 74 | if [ -n "$${BUILT_COPY_FILES}" ]; then \ |
phh@3512 | 75 | for i in $${BUILT_COPY_FILES}; do \ |
dcubed@5898 | 76 | $(MKDIR) -p $(shell dirname $@); \ |
dcubed@5898 | 77 | $(CP) -R $${i} $@; \ |
phh@3512 | 78 | done; \ |
phh@3492 | 79 | fi |
phh@3492 | 80 | |
phh@3492 | 81 | |
phh@3492 | 82 | # Replace arch specific binaries with universal binaries |
dcubed@6703 | 83 | # Do not touch jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) |
dcubed@6703 | 84 | # That symbolic link belongs to the 'jdk' build. |
phh@3492 | 85 | export_universal: |
phh@3492 | 86 | $(RM) -r $(EXPORT_PATH)/jre/lib/{i386,amd64} |
phh@3492 | 87 | $(RM) -r $(JDK_IMAGE_DIR)/jre/lib/{i386,amd64} |
phh@3492 | 88 | ($(CD) $(EXPORT_PATH) && \ |
phh@3492 | 89 | $(TAR) -cf - *) | \ |
phh@3492 | 90 | ($(CD) $(JDK_IMAGE_DIR) && $(TAR) -xpf -) |
phh@3492 | 91 | |
phh@3492 | 92 | |
phh@3492 | 93 | # Overlay universal binaries |
dcubed@6703 | 94 | # Do not touch jre/lib/{client,server}/libjsig.$(LIBRARY_SUFFIX) |
dcubed@6703 | 95 | # That symbolic link belongs to the 'jdk' build. |
phh@3492 | 96 | copy_universal: |
phh@3492 | 97 | $(RM) -r $(JDK_IMAGE_DIR)$(COPY_SUBDIR)/jre/lib/{i386,amd64} |
phh@3492 | 98 | ($(CD) $(EXPORT_PATH)$(COPY_SUBDIR) && \ |
phh@3492 | 99 | $(TAR) -cf - *) | \ |
phh@3492 | 100 | ($(CD) $(JDK_IMAGE_DIR)$(COPY_SUBDIR) && $(TAR) -xpf -) |
phh@3492 | 101 | |
phh@3492 | 102 | |
phh@3492 | 103 | # Additional processing for universal builds |
phh@3492 | 104 | export_product_jdk:: |
phh@3492 | 105 | $(MAKE) EXPORT_SUBDIR= export_universal |
phh@3492 | 106 | export_optimized_jdk:: |
kvn@7138 | 107 | $(MAKE) EXPORT_SUBDIR=/optimized export_universal |
phh@3492 | 108 | export_fastdebug_jdk:: |
phh@3492 | 109 | $(MAKE) EXPORT_SUBDIR=/fastdebug export_universal |
phh@3492 | 110 | export_debug_jdk:: |
phh@3492 | 111 | $(MAKE) EXPORT_SUBDIR=/debug export_universal |
phh@3492 | 112 | copy_product_jdk:: |
phh@3492 | 113 | $(MAKE) COPY_SUBDIR= copy_universal |
kvn@7138 | 114 | copy_optimized_jdk:: |
kvn@7138 | 115 | $(MAKE) COPY_SUBDIR=/optimized copy_universal |
phh@3492 | 116 | copy_fastdebug_jdk:: |
phh@3492 | 117 | $(MAKE) COPY_SUBDIR=/fastdebug copy_universal |
phh@3492 | 118 | copy_debug_jdk:: |
phh@3492 | 119 | $(MAKE) COPY_SUBDIR=/debug copy_universal |
phh@3492 | 120 | |
phh@3492 | 121 | .PHONY: universal_product universal_fastdebug universal_debug \ |
phh@3492 | 122 | all_product_universal all_fastdebug_universal all_debug_universal \ |
kvn@7138 | 123 | universal_optimized all_optimized_universal \ |
sla@3877 | 124 | universalize export_universal copy_universal \ |
sla@3877 | 125 | $(UNIVERSAL_LIPO_LIST) $(UNIVERSAL_COPY_LIST) |