Mon, 28 Jul 2014 15:06:38 -0700
8051344: JVM crashed in Compile::start() during method parsing w/ UseRTMDeopt turned on
Summary: call rtm_deopt() only if there were no compilation bailouts before.
Reviewed-by: kvn
duke@435 | 1 | # |
dcubed@3724 | 2 | # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 4 | # |
duke@435 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@435 | 6 | # under the terms of the GNU General Public License version 2 only, as |
duke@435 | 7 | # published by the Free Software Foundation. |
duke@435 | 8 | # |
duke@435 | 9 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 12 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 13 | # accompanied this code). |
duke@435 | 14 | # |
duke@435 | 15 | # You should have received a copy of the GNU General Public License version |
duke@435 | 16 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 17 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 18 | # |
trims@1907 | 19 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 20 | # or visit www.oracle.com if you need additional information or have any |
trims@1907 | 21 | # questions. |
duke@435 | 22 | # |
duke@435 | 23 | # |
duke@435 | 24 | |
duke@435 | 25 | # Rules to build serviceability agent library, used by vm.make |
duke@435 | 26 | |
dcubed@4344 | 27 | # libsaproc.so: serviceability agent |
phh@1558 | 28 | |
phh@1558 | 29 | SAPROC = saproc |
minqi@4093 | 30 | SADIS = sadis |
duke@435 | 31 | LIBSAPROC = lib$(SAPROC).so |
minqi@4093 | 32 | SADISOBJ = $(SADIS).o |
duke@435 | 33 | |
dcubed@3150 | 34 | LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo |
dcubed@3724 | 35 | LIBSAPROC_DIZ = lib$(SAPROC).diz |
dcubed@3150 | 36 | |
duke@435 | 37 | AGENT_DIR = $(GAMMADIR)/agent |
duke@435 | 38 | |
duke@435 | 39 | SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc |
duke@435 | 40 | |
duke@435 | 41 | SASRCFILES = $(SASRCDIR)/saproc.cpp |
duke@435 | 42 | |
minqi@4093 | 43 | SADISSRCFILES = $(AGENT_DIR)/src/share/native/sadis.c |
minqi@4093 | 44 | |
duke@435 | 45 | SAMAPFILE = $(SASRCDIR)/mapfile |
duke@435 | 46 | |
dcubed@3150 | 47 | DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) |
dcubed@3150 | 48 | DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO) |
dcubed@3724 | 49 | DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ) |
duke@435 | 50 | |
duke@435 | 51 | # if $(AGENT_DIR) does not exist, we don't build SA |
duke@435 | 52 | |
stefank@2314 | 53 | ifneq ($(wildcard $(AGENT_DIR)),) |
stefank@2314 | 54 | BUILDLIBSAPROC = $(LIBSAPROC) |
stefank@2314 | 55 | endif |
duke@435 | 56 | |
duke@435 | 57 | SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) |
duke@435 | 58 | |
duke@435 | 59 | ifdef USE_GCC |
duke@435 | 60 | SA_LFLAGS += -D_REENTRANT |
duke@435 | 61 | else |
duke@435 | 62 | SA_LFLAGS += -mt -xnolib -norunpath |
duke@435 | 63 | endif |
duke@435 | 64 | |
dcubed@2838 | 65 | # The libproc Pstack_iter() interface changed in Nevada-B159. |
dcubed@2886 | 66 | # Use 'uname -r -v' to determine the Solaris version as per |
dcubed@2886 | 67 | # Solaris Nevada team request. This logic needs to match: |
dcubed@2838 | 68 | # agent/src/os/solaris/proc/saproc.cpp: set_has_newer_Pstack_iter(): |
dcubed@2838 | 69 | # - skip SunOS 4 or older |
dcubed@2838 | 70 | # - skip Solaris 10 or older |
dcubed@2886 | 71 | # - skip two digit internal Nevada builds |
dcubed@2886 | 72 | # - skip three digit internal Nevada builds thru 149 |
dcubed@2886 | 73 | # - skip internal Nevada builds 150-158 |
dcubed@2886 | 74 | # - if not skipped, print define for Nevada-B159 or later |
dcubed@2838 | 75 | SOLARIS_11_B159_OR_LATER := \ |
dcubed@2838 | 76 | $(shell uname -r -v \ |
dcubed@2886 | 77 | | sed -n \ |
dcubed@2886 | 78 | -e '/^[0-4]\. /b' \ |
dcubed@2886 | 79 | -e '/^5\.[0-9] /b' \ |
dcubed@2886 | 80 | -e '/^5\.10 /b' \ |
kvn@3044 | 81 | -e '/ snv_[0-9][0-9]$$/b' \ |
kvn@3044 | 82 | -e '/ snv_[01][0-4][0-9]$$/b' \ |
kvn@3044 | 83 | -e '/ snv_15[0-8]$$/b' \ |
dcubed@2886 | 84 | -e 's/.*/-DSOLARIS_11_B159_OR_LATER/' \ |
dcubed@2886 | 85 | -e 'p' \ |
dcubed@2886 | 86 | ) |
dcubed@2838 | 87 | |
dcubed@2838 | 88 | # Uncomment the following to simulate building on Nevada-B159 or later |
dcubed@2838 | 89 | # when actually building on Nevada-B158 or earlier: |
dcubed@2838 | 90 | #SOLARIS_11_B159_OR_LATER=-DSOLARIS_11_B159_OR_LATER |
dcubed@2838 | 91 | |
minqi@4093 | 92 | |
minqi@4093 | 93 | $(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SADISOBJ) $(SAMAPFILE) |
duke@435 | 94 | $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ |
duke@435 | 95 | echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ |
duke@435 | 96 | exit 1; \ |
duke@435 | 97 | fi |
duke@435 | 98 | @echo Making SA debugger back-end... |
minqi@4093 | 99 | $(QUIETLY) $(CXX) \ |
duke@435 | 100 | $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ |
duke@435 | 101 | -I$(SASRCDIR) \ |
duke@435 | 102 | -I$(GENERATED) \ |
duke@435 | 103 | -I$(BOOT_JAVA_HOME)/include \ |
duke@435 | 104 | -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \ |
dcubed@2838 | 105 | $(SOLARIS_11_B159_OR_LATER) \ |
duke@435 | 106 | $(SASRCFILES) \ |
minqi@4093 | 107 | $(SADISOBJ) \ |
duke@435 | 108 | $(SA_LFLAGS) \ |
duke@435 | 109 | -o $@ \ |
duke@435 | 110 | -ldl -ldemangle -lthread -lc |
minqi@4093 | 111 | |
minqi@4093 | 112 | $(SADISOBJ): $(SADISSRCFILES) |
minqi@4093 | 113 | $(QUIETLY) $(CC) \ |
minqi@4093 | 114 | $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ |
minqi@4093 | 115 | -I$(SASRCDIR) \ |
minqi@4093 | 116 | -I$(GENERATED) \ |
minqi@4093 | 117 | -I$(BOOT_JAVA_HOME)/include \ |
minqi@4093 | 118 | -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \ |
minqi@4093 | 119 | $(SOLARIS_11_B159_OR_LATER) \ |
minqi@4093 | 120 | $(SADISSRCFILES) \ |
minqi@4093 | 121 | -c -o $(SADISOBJ) |
minqi@4093 | 122 | |
dcubed@3724 | 123 | ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
dcubed@3798 | 124 | # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set. |
dcubed@3798 | 125 | # Clear the SHF_ALLOC flag (if set) from empty section headers. |
dcubed@3798 | 126 | # An empty section header has sh_addr == 0 and sh_size == 0. |
dcubed@3798 | 127 | # This problem has only been seen on Solaris X64, but we call this tool |
dcubed@3798 | 128 | # on all Solaris builds just in case. |
dcubed@3798 | 129 | $(QUIETLY) $(FIX_EMPTY_SEC_HDR_FLAGS) $@ |
dcubed@3150 | 130 | $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO) |
dcubed@3798 | 131 | # $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections. |
dcubed@3798 | 132 | # Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available. |
dcubed@3798 | 133 | # $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@ |
dcubed@3798 | 134 | $(QUIETLY) $(ADD_GNU_DEBUGLINK) $(LIBSAPROC_DEBUGINFO) $@ |
dcubed@3150 | 135 | ifeq ($(STRIP_POLICY),all_strip) |
dcubed@3150 | 136 | $(QUIETLY) $(STRIP) $@ |
dcubed@3150 | 137 | else |
dcubed@3150 | 138 | ifeq ($(STRIP_POLICY),min_strip) |
dcubed@3150 | 139 | $(QUIETLY) $(STRIP) -x $@ |
dcubed@3150 | 140 | # implied else here is no stripping at all |
dcubed@3150 | 141 | endif |
dcubed@3150 | 142 | endif |
dcubed@3724 | 143 | ifeq ($(ZIP_DEBUGINFO_FILES),1) |
dcubed@4344 | 144 | $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) |
dcubed@4344 | 145 | $(RM) $(LIBSAPROC_DEBUGINFO) |
dcubed@3724 | 146 | endif |
dcubed@3150 | 147 | endif |
duke@435 | 148 | |
stefank@2314 | 149 | install_saproc: $(BULDLIBSAPROC) |
duke@435 | 150 | $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \ |
duke@435 | 151 | echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ |
dcubed@3150 | 152 | test -f $(LIBSAPROC_DEBUGINFO) && \ |
dcubed@3150 | 153 | cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \ |
dcubed@3724 | 154 | test -f $(LIBSAPROC_DIZ) && \ |
dcubed@3724 | 155 | cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \ |
duke@435 | 156 | cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ |
duke@435 | 157 | fi |
duke@435 | 158 | |
stefank@2314 | 159 | .PHONY: install_saproc |