Mercurial > hg > graal-jvmci-8
annotate make/solaris/makefiles/dtrace.make @ 21626:ca3c6538bcec
JVMCI update makefiles for Solaris/SPARC; os::read at early stage of VM does not work, use ::read as fallback in JVMCIRuntime::parse_lines (JBS:GRAAL-54)
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 14:17:05 +0200 |
parents | 7848fc12602b |
children |
rev | line source |
---|---|
0 | 1 # |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
2 # Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
0 | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | |
5 # This code is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License version 2 only, as | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1123
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1123
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1123
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
25 # Rules to build jvm_db/dtrace, used by vm.make | |
26 | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
27 # We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2 |
7951 | 28 # but not for CORE configuration. |
0 | 29 |
30 ifneq ("${TYPE}", "CORE") | |
31 | |
32 ifdef USE_GCC | |
33 | |
34 dtraceCheck: | |
35 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for gcc builds" | |
36 | |
37 else | |
38 | |
39 JVM_DB = libjvm_db | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
40 LIBJVM_DB = libjvm_db.so |
0 | 41 |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
42 LIBJVM_DB_DEBUGINFO = libjvm_db.debuginfo |
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
43 LIBJVM_DB_DIZ = libjvm_db.diz |
3954 | 44 |
0 | 45 JVM_DTRACE = jvm_dtrace |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
46 LIBJVM_DTRACE = libjvm_dtrace.so |
0 | 47 |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
48 LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.debuginfo |
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
49 LIBJVM_DTRACE_DIZ = libjvm_dtrace.diz |
3954 | 50 |
0 | 51 JVMOFFS = JvmOffsets |
52 JVMOFFS.o = $(JVMOFFS).o | |
53 GENOFFS = generate$(JVMOFFS) | |
54 | |
55 DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace | |
56 DTRACE = dtrace | |
57 DTRACE.o = $(DTRACE).o | |
58 | |
59 # to remove '-g' option which causes link problems | |
60 # also '-z nodefs' is used as workaround | |
61 GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';) | |
62 | |
63 ifdef LP64 | |
64 DTRACE_OPTS = -64 -D_LP64 | |
65 endif | |
66 | |
67 # making libjvm_db | |
68 | |
69 # Use mapfile with libjvm_db.so | |
70 LIBJVM_DB_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_db | |
71 LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE)) | |
72 | |
73 # Use mapfile with libjvm_dtrace.so | |
74 LIBJVM_DTRACE_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace | |
75 LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE)) | |
76 | |
77 ifdef USE_GCC | |
78 LFLAGS_JVM_DB += -D_REENTRANT $(PICFLAG) | |
79 LFLAGS_JVM_DTRACE += -D_REENTRANT $(PICFLAG) | |
80 else | |
81 LFLAGS_JVM_DB += -mt $(PICFLAG) -xnolib | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
82 LFLAGS_JVM_DTRACE += -mt $(PICFLAG) -xnolib -ldl |
0 | 83 endif |
84 | |
85 ISA = $(subst i386,i486,$(shell isainfo -n)) | |
86 | |
87 # Making 64/libjvm_db.so: 64-bit version of libjvm_db.so which handles 32-bit libjvm.so | |
88 ifneq ("${ISA}","${BUILDARCH}") | |
89 | |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
90 XLIBJVM_DIR = 64 |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
91 XLIBJVM_DB = $(XLIBJVM_DIR)/$(LIBJVM_DB) |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
92 XLIBJVM_DTRACE = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE) |
0 | 93 |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
94 XLIBJVM_DB_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DB_DEBUGINFO) |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
95 XLIBJVM_DB_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DB_DIZ) |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
96 XLIBJVM_DTRACE_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DEBUGINFO) |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
97 XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ) |
3954 | 98 |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
99 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) |
0 | 100 @echo Making $@ |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
101 $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ |
433
c1345e85f901
6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents:
196
diff
changeset
|
102 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ |
0 | 103 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
104 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
3954 | 105 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
106 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
107 # in the link name: |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
108 ( cd $(XLIBJVM_DIR) && $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB) ) |
3954 | 109 ifeq ($(STRIP_POLICY),all_strip) |
110 $(QUIETLY) $(STRIP) $@ | |
111 else | |
112 ifeq ($(STRIP_POLICY),min_strip) | |
113 $(QUIETLY) $(STRIP) -x $@ | |
114 # implied else here is no stripping at all | |
115 endif | |
116 endif | |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
117 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
118 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
119 # in the archived name: |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
120 ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) ) |
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
121 $(RM) $(XLIBJVM_DB_DEBUGINFO) |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
122 endif |
3954 | 123 endif |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
124 |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
125 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
0 | 126 @echo Making $@ |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
127 $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ |
433
c1345e85f901
6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents:
196
diff
changeset
|
128 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ |
0 | 129 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
130 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
3954 | 131 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
132 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
133 # in the link name: |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
134 ( cd $(XLIBJVM_DIR) && $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE) ) |
3954 | 135 ifeq ($(STRIP_POLICY),all_strip) |
136 $(QUIETLY) $(STRIP) $@ | |
137 else | |
138 ifeq ($(STRIP_POLICY),min_strip) | |
139 $(QUIETLY) $(STRIP) -x $@ | |
140 # implied else here is no stripping at all | |
141 endif | |
142 endif | |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
143 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
6167
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
144 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) is not |
d1b0644d6acf
7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips)
dcubed
parents:
6095
diff
changeset
|
145 # in the archived name: |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
146 ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO)) |
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
147 $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
148 endif |
3954 | 149 endif |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
150 |
0 | 151 endif # ifneq ("${ISA}","${BUILDARCH}") |
152 | |
153 ifdef USE_GCC | |
154 LFLAGS_GENOFFS += -D_REENTRANT | |
155 else | |
156 LFLAGS_GENOFFS += -mt -xnolib -norunpath | |
157 endif | |
158 | |
159 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \ | |
1972 | 160 $(LIBJVM.o) |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
3954
diff
changeset
|
161 $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \ |
0 | 162 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc |
163 | |
164 $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).so | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
3954
diff
changeset
|
165 $(QUIETLY) $(LINK.CXX) -z nodefs -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \ |
0 | 166 ./lib$(GENOFFS).so |
167 | |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
168 CONDITIONALLY_UPDATE_JVMOFFS_TARGET = \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
169 cmp -s $@ $@.tmp; \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
170 case $$? in \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
171 0) rm -f $@.tmp;; \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
172 *) rm -f $@ && mv $@.tmp $@ && echo Updated $@;; \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
173 esac |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
174 |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
175 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs. |
0 | 176 $(JVMOFFS).h: $(GENOFFS) |
6845
9024b6b53ec2
8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents:
6190
diff
changeset
|
177 $(QUIETLY) LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./$(GENOFFS) -header > $@.tmp |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
178 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
0 | 179 |
180 $(JVMOFFS)Index.h: $(GENOFFS) | |
6845
9024b6b53ec2
8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents:
6190
diff
changeset
|
181 $(QUIETLY) LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./$(GENOFFS) -index > $@.tmp |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
182 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
0 | 183 |
184 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h | |
6845
9024b6b53ec2
8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents:
6190
diff
changeset
|
185 $(QUIETLY) LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./$(GENOFFS) -table > $@.tmp |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
186 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
0 | 187 |
188 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
3954
diff
changeset
|
189 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp |
0 | 190 |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
191 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) |
0 | 192 @echo Making $@ |
193 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ | |
194 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc | |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
195 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
3954 | 196 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
197 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ |
3954 | 198 ifeq ($(STRIP_POLICY),all_strip) |
199 $(QUIETLY) $(STRIP) $@ | |
200 else | |
201 ifeq ($(STRIP_POLICY),min_strip) | |
202 $(QUIETLY) $(STRIP) -x $@ | |
203 # implied else here is no stripping at all | |
204 endif | |
205 endif | |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
206 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
207 $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) |
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
208 $(RM) $(LIBJVM_DB_DEBUGINFO) |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
209 endif |
3954 | 210 endif |
0 | 211 |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
212 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
0 | 213 @echo Making $@ |
214 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ | |
215 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor | |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
216 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
3954 | 217 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) |
20640
8c76e844a7f9
8033602: wrong stabs data in libjvm.debuginfo on JDK 8 - SPARC
dcubed
parents:
12015
diff
changeset
|
218 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ |
3954 | 219 ifeq ($(STRIP_POLICY),all_strip) |
220 $(QUIETLY) $(STRIP) $@ | |
221 else | |
222 ifeq ($(STRIP_POLICY),min_strip) | |
223 $(QUIETLY) $(STRIP) -x $@ | |
224 # implied else here is no stripping at all | |
225 endif | |
226 endif | |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
227 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
228 $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) |
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6845
diff
changeset
|
229 $(RM) $(LIBJVM_DTRACE_DEBUGINFO) |
6020
d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
4891
diff
changeset
|
230 endif |
3954 | 231 endif |
0 | 232 |
233 $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ | |
234 $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d | |
235 $(QUIETLY) cat $^ > $@ | |
236 | |
1972 | 237 DTraced_Files = ciEnv.o \ |
238 classLoadingService.o \ | |
239 compileBroker.o \ | |
240 hashtable.o \ | |
241 instanceKlass.o \ | |
242 java.o \ | |
243 jni.o \ | |
244 jvm.o \ | |
245 memoryManager.o \ | |
246 nmethod.o \ | |
247 objectMonitor.o \ | |
248 runtimeService.o \ | |
249 sharedRuntime.o \ | |
250 synchronizer.o \ | |
251 thread.o \ | |
252 unsafe.o \ | |
253 vmThread.o \ | |
254 vmCMSOperations.o \ | |
255 vmPSOperations.o \ | |
256 vmGCOperations.o \ | |
257 | |
0 | 258 # Dtrace is available, so we build $(DTRACE.o) |
259 $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files) | |
260 @echo Compiling $(DTRACE).d | |
261 | |
1799
4094f07967ca
6974813: JVM needs to use demand loading for its DTrace probes
kamg
parents:
1552
diff
changeset
|
262 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \ |
0 | 263 $(DTraced_Files) ||\ |
264 STATUS=$$?;\ | |
12015
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
265 if [ x"$$STATUS" = x"1" ]; then \ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
266 if [ x`uname -r` = x"5.10" -a \ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
267 x`uname -p` = x"sparc" ]; then\ |
0 | 268 echo "*****************************************************************";\ |
269 echo "* If you are building server compiler, and the error message is ";\ | |
270 echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\ | |
271 echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\ | |
272 echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\ | |
273 echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\ | |
274 echo "* dtrace probes for this build.";\ | |
275 echo "*****************************************************************";\ | |
12015
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
276 elif [ x`uname -r` = x"5.10" ]; then\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
277 echo "*****************************************************************";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
278 echo "* If you are seeing 'syntax error near \"umpiconninfo_t\"' on Solaris";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
279 echo "* 10, try doing 'cd /usr/lib/dtrace && gzip mpi.d' as root, ";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
280 echo "* or set the environment variable HOTSPOT_DISABLE_DTRACE_PROBES";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
281 echo "* to disable dtrace probes for this build.";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
282 echo "*****************************************************************";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
283 else \ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
284 echo "*****************************************************************";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
285 echo "* If you cannot fix dtrace build issues, try to ";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
286 echo "* set the environment variable HOTSPOT_DISABLE_DTRACE_PROBES";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
287 echo "* to disable dtrace probes for this build.";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
288 echo "*****************************************************************";\ |
c661fa2e5189
8022093: syntax error near "umpiconninfo_t" -- when building on Solaris 10
iklam
parents:
7951
diff
changeset
|
289 fi; \ |
0 | 290 fi;\ |
291 exit $$STATUS | |
292 # Since some DTraced_Files are in LIBJVM.o and they are touched by this | |
293 # command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will | |
294 # think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets* | |
295 # files, but it doesn't, so we touch the necessary files to prevent later | |
296 # recompilation. Note: we only touch the necessary files if they already | |
297 # exist in order to close a race where an empty file can be created | |
298 # before the real build rule is executed. | |
299 # But, we can't touch the *.h files: This rule depends | |
300 # on them, and that would cause an infinite cycle of rebuilding. | |
301 # Neither the *.h or *.ccp files need to be touched, since they have | |
302 # rules which do not update them when the generator file has not | |
303 # changed their contents. | |
304 $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi | |
305 $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi | |
306 $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi | |
307 | |
308 .PHONY: dtraceCheck | |
309 | |
116
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
310 SYSTEM_DTRACE_H = /usr/include/dtrace.h |
0 | 311 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace |
312 PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace | |
313 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG}) | |
314 patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG}) | |
116
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
315 systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H)) |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
316 |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
317 ifneq ("$(systemDtraceHdrFound)", "") |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
318 CFLAGS += -DHAVE_DTRACE_H |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
319 endif |
0 | 320 |
321 ifneq ("$(patchDtraceFound)", "") | |
322 DTRACE_PROG=$(PATCH_DTRACE_PROG) | |
323 DTRACE_INCL=-I/opt/SUNWdtrd/include | |
324 else | |
325 ifneq ("$(systemDtraceFound)", "") | |
326 DTRACE_PROG=$(SYSTEM_DTRACE_PROG) | |
327 else | |
328 | |
329 endif # ifneq ("$(systemDtraceFound)", "") | |
330 endif # ifneq ("$(patchDtraceFound)", "") | |
331 | |
332 ifneq ("${DTRACE_PROG}", "") | |
333 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") | |
334 | |
335 DTRACE_OBJS = $(DTRACE.o) $(JVMOFFS.o) | |
336 CFLAGS += $(DTRACE_INCL) -DDTRACE_ENABLED | |
337 MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE) | |
338 | |
339 dtraceCheck: | |
340 | |
341 else # manually disabled | |
342 | |
343 dtraceCheck: | |
344 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable" | |
345 | |
346 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") | |
347 | |
348 else # No dtrace program found | |
349 | |
350 dtraceCheck: | |
351 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system" | |
352 | |
353 endif # ifneq ("${dtraceFound}", "") | |
354 | |
355 endif # ifdef USE_GCC | |
356 | |
357 else # CORE build | |
358 | |
359 dtraceCheck: | |
360 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds" | |
361 | |
362 endif # ifneq ("${TYPE}", "CORE") |