Mercurial > hg > truffle
annotate make/solaris/makefiles/dtrace.make @ 5293:2baec1384f2d
Do not remove empty diamond shape if there are guards in any of the branches and evacuate any other anchored values
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 25 Apr 2012 11:38:49 +0200 |
parents | 719f7007c8e8 |
children | d652a62d6e03 |
rev | line source |
---|---|
0 | 1 # |
3954 | 2 # Copyright (c) 2005, 2011, 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 |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
28 # but not for CORE or KERNEL configurations. |
0 | 29 |
30 ifneq ("${TYPE}", "CORE") | |
31 ifneq ("${TYPE}", "KERNEL") | |
32 | |
33 ifdef USE_GCC | |
34 | |
35 dtraceCheck: | |
36 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for gcc builds" | |
37 | |
38 else | |
39 | |
40 JVM_DB = libjvm_db | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
41 LIBJVM_DB = libjvm_db.so |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
42 LIBJVM_DB_G = libjvm$(G_SUFFIX)_db.so |
0 | 43 |
3954 | 44 LIBJVM_DB_DEBUGINFO = libjvm_db.debuginfo |
45 LIBJVM_DB_G_DEBUGINFO = libjvm$(G_SUFFIX)_db.debuginfo | |
46 | |
0 | 47 JVM_DTRACE = jvm_dtrace |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
48 LIBJVM_DTRACE = libjvm_dtrace.so |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
49 LIBJVM_DTRACE_G = libjvm$(G_SUFFIX)_dtrace.so |
0 | 50 |
3954 | 51 LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.debuginfo |
52 LIBJVM_DTRACE_G_DEBUGINFO = libjvm$(G_SUFFIX)_dtrace.debuginfo | |
53 | |
0 | 54 JVMOFFS = JvmOffsets |
55 JVMOFFS.o = $(JVMOFFS).o | |
56 GENOFFS = generate$(JVMOFFS) | |
57 | |
58 DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace | |
59 DTRACE = dtrace | |
60 DTRACE.o = $(DTRACE).o | |
61 | |
62 # to remove '-g' option which causes link problems | |
63 # also '-z nodefs' is used as workaround | |
64 GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';) | |
65 | |
66 ifdef LP64 | |
67 DTRACE_OPTS = -64 -D_LP64 | |
68 endif | |
69 | |
70 # making libjvm_db | |
71 | |
72 # Use mapfile with libjvm_db.so | |
73 LIBJVM_DB_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_db | |
74 LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE)) | |
75 | |
76 # Use mapfile with libjvm_dtrace.so | |
77 LIBJVM_DTRACE_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace | |
78 LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE)) | |
79 | |
80 ifdef USE_GCC | |
81 LFLAGS_JVM_DB += -D_REENTRANT $(PICFLAG) | |
82 LFLAGS_JVM_DTRACE += -D_REENTRANT $(PICFLAG) | |
83 else | |
84 LFLAGS_JVM_DB += -mt $(PICFLAG) -xnolib | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
85 LFLAGS_JVM_DTRACE += -mt $(PICFLAG) -xnolib -ldl |
0 | 86 endif |
87 | |
88 ISA = $(subst i386,i486,$(shell isainfo -n)) | |
89 | |
90 # Making 64/libjvm_db.so: 64-bit version of libjvm_db.so which handles 32-bit libjvm.so | |
91 ifneq ("${ISA}","${BUILDARCH}") | |
92 | |
93 XLIBJVM_DB = 64/$(LIBJVM_DB) | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
94 XLIBJVM_DB_G = 64/$(LIBJVM_DB_G) |
0 | 95 XLIBJVM_DTRACE = 64/$(LIBJVM_DTRACE) |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
96 XLIBJVM_DTRACE_G = 64/$(LIBJVM_DTRACE_G) |
0 | 97 |
3954 | 98 XLIBJVM_DB_DEBUGINFO = 64/$(LIBJVM_DB_DEBUGINFO) |
99 XLIBJVM_DB_G_DEBUGINFO = 64/$(LIBJVM_DB_G_DEBUGINFO) | |
100 XLIBJVM_DTRACE_DEBUGINFO = 64/$(LIBJVM_DTRACE_DEBUGINFO) | |
101 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO) | |
102 | |
0 | 103 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) |
104 @echo Making $@ | |
105 $(QUIETLY) mkdir -p 64/ ; \ | |
433
c1345e85f901
6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents:
196
diff
changeset
|
106 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ |
0 | 107 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
108 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); } |
3954 | 109 ifneq ($(OBJCOPY),) |
110 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) | |
111 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@ | |
112 ifeq ($(STRIP_POLICY),all_strip) | |
113 $(QUIETLY) $(STRIP) $@ | |
114 else | |
115 ifeq ($(STRIP_POLICY),min_strip) | |
116 $(QUIETLY) $(STRIP) -x $@ | |
117 # implied else here is no stripping at all | |
118 endif | |
119 endif | |
120 [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO); } | |
121 endif | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
122 |
0 | 123 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
124 @echo Making $@ | |
125 $(QUIETLY) mkdir -p 64/ ; \ | |
433
c1345e85f901
6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents:
196
diff
changeset
|
126 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ |
0 | 127 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
128 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); } |
3954 | 129 ifneq ($(OBJCOPY),) |
130 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) | |
131 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@ | |
132 ifeq ($(STRIP_POLICY),all_strip) | |
133 $(QUIETLY) $(STRIP) $@ | |
134 else | |
135 ifeq ($(STRIP_POLICY),min_strip) | |
136 $(QUIETLY) $(STRIP) -x $@ | |
137 # implied else here is no stripping at all | |
138 endif | |
139 endif | |
140 [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO); } | |
141 endif | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
142 |
0 | 143 endif # ifneq ("${ISA}","${BUILDARCH}") |
144 | |
145 ifdef USE_GCC | |
146 LFLAGS_GENOFFS += -D_REENTRANT | |
147 else | |
148 LFLAGS_GENOFFS += -mt -xnolib -norunpath | |
149 endif | |
150 | |
151 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \ | |
1972 | 152 $(LIBJVM.o) |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
3954
diff
changeset
|
153 $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \ |
0 | 154 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc |
155 | |
156 $(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
|
157 $(QUIETLY) $(LINK.CXX) -z nodefs -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \ |
0 | 158 ./lib$(GENOFFS).so |
159 | |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
160 CONDITIONALLY_UPDATE_JVMOFFS_TARGET = \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
161 cmp -s $@ $@.tmp; \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
162 case $$? in \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
163 0) rm -f $@.tmp;; \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
164 *) rm -f $@ && mv $@.tmp $@ && echo Updated $@;; \ |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
165 esac |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
166 |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
167 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs. |
0 | 168 $(JVMOFFS).h: $(GENOFFS) |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
169 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -header > $@.tmp |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
170 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
0 | 171 |
172 $(JVMOFFS)Index.h: $(GENOFFS) | |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
173 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -index > $@.tmp |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
174 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
0 | 175 |
176 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h | |
440
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
177 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -table > $@.tmp |
96c6da8f095c
6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents:
196
diff
changeset
|
178 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET) |
0 | 179 |
180 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
3954
diff
changeset
|
181 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp |
0 | 182 |
183 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) | |
184 @echo Making $@ | |
185 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ | |
186 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
187 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); } |
3954 | 188 ifneq ($(OBJCOPY),) |
189 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) | |
190 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ | |
191 ifeq ($(STRIP_POLICY),all_strip) | |
192 $(QUIETLY) $(STRIP) $@ | |
193 else | |
194 ifeq ($(STRIP_POLICY),min_strip) | |
195 $(QUIETLY) $(STRIP) -x $@ | |
196 # implied else here is no stripping at all | |
197 endif | |
198 endif | |
199 [ -f $(LIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO); } | |
200 endif | |
0 | 201 |
202 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | |
203 @echo Making $@ | |
204 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ | |
205 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
443
diff
changeset
|
206 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); } |
3954 | 207 ifneq ($(OBJCOPY),) |
208 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) | |
209 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ | |
210 ifeq ($(STRIP_POLICY),all_strip) | |
211 $(QUIETLY) $(STRIP) $@ | |
212 else | |
213 ifeq ($(STRIP_POLICY),min_strip) | |
214 $(QUIETLY) $(STRIP) -x $@ | |
215 # implied else here is no stripping at all | |
216 endif | |
217 endif | |
218 [ -f $(LIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO); } | |
219 endif | |
0 | 220 |
221 $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ | |
222 $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d | |
223 $(QUIETLY) cat $^ > $@ | |
224 | |
1972 | 225 DTraced_Files = ciEnv.o \ |
226 classLoadingService.o \ | |
227 compileBroker.o \ | |
228 hashtable.o \ | |
229 instanceKlass.o \ | |
230 java.o \ | |
231 jni.o \ | |
232 jvm.o \ | |
233 memoryManager.o \ | |
234 nmethod.o \ | |
235 objectMonitor.o \ | |
236 runtimeService.o \ | |
237 sharedRuntime.o \ | |
238 synchronizer.o \ | |
239 thread.o \ | |
240 unsafe.o \ | |
241 vmThread.o \ | |
242 vmCMSOperations.o \ | |
243 vmPSOperations.o \ | |
244 vmGCOperations.o \ | |
245 | |
0 | 246 # Dtrace is available, so we build $(DTRACE.o) |
247 $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files) | |
248 @echo Compiling $(DTRACE).d | |
249 | |
1799
4094f07967ca
6974813: JVM needs to use demand loading for its DTrace probes
kamg
parents:
1552
diff
changeset
|
250 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \ |
0 | 251 $(DTraced_Files) ||\ |
252 STATUS=$$?;\ | |
253 if [ x"$$STATUS" = x"1" -a \ | |
254 x`uname -r` = x"5.10" -a \ | |
255 x`uname -p` = x"sparc" ]; then\ | |
256 echo "*****************************************************************";\ | |
257 echo "* If you are building server compiler, and the error message is ";\ | |
258 echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\ | |
259 echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\ | |
260 echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\ | |
261 echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\ | |
262 echo "* dtrace probes for this build.";\ | |
263 echo "*****************************************************************";\ | |
264 fi;\ | |
265 exit $$STATUS | |
266 # Since some DTraced_Files are in LIBJVM.o and they are touched by this | |
267 # command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will | |
268 # think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets* | |
269 # files, but it doesn't, so we touch the necessary files to prevent later | |
270 # recompilation. Note: we only touch the necessary files if they already | |
271 # exist in order to close a race where an empty file can be created | |
272 # before the real build rule is executed. | |
273 # But, we can't touch the *.h files: This rule depends | |
274 # on them, and that would cause an infinite cycle of rebuilding. | |
275 # Neither the *.h or *.ccp files need to be touched, since they have | |
276 # rules which do not update them when the generator file has not | |
277 # changed their contents. | |
278 $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi | |
279 $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi | |
280 $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi | |
281 | |
282 .PHONY: dtraceCheck | |
283 | |
116
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
284 SYSTEM_DTRACE_H = /usr/include/dtrace.h |
0 | 285 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace |
286 PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace | |
287 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG}) | |
288 patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG}) | |
116
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
289 systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H)) |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
290 |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
291 ifneq ("$(systemDtraceHdrFound)", "") |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
292 CFLAGS += -DHAVE_DTRACE_H |
018d5b58dd4f
6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents:
91
diff
changeset
|
293 endif |
0 | 294 |
295 ifneq ("$(patchDtraceFound)", "") | |
296 DTRACE_PROG=$(PATCH_DTRACE_PROG) | |
297 DTRACE_INCL=-I/opt/SUNWdtrd/include | |
298 else | |
299 ifneq ("$(systemDtraceFound)", "") | |
300 DTRACE_PROG=$(SYSTEM_DTRACE_PROG) | |
301 else | |
302 | |
303 endif # ifneq ("$(systemDtraceFound)", "") | |
304 endif # ifneq ("$(patchDtraceFound)", "") | |
305 | |
306 ifneq ("${DTRACE_PROG}", "") | |
307 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") | |
308 | |
309 DTRACE_OBJS = $(DTRACE.o) $(JVMOFFS.o) | |
310 CFLAGS += $(DTRACE_INCL) -DDTRACE_ENABLED | |
311 MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE) | |
312 | |
313 dtraceCheck: | |
314 | |
315 else # manually disabled | |
316 | |
317 dtraceCheck: | |
318 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable" | |
319 | |
320 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") | |
321 | |
322 else # No dtrace program found | |
323 | |
324 dtraceCheck: | |
325 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system" | |
326 | |
327 endif # ifneq ("${dtraceFound}", "") | |
328 | |
329 endif # ifdef USE_GCC | |
330 | |
331 else # KERNEL build | |
332 | |
333 dtraceCheck: | |
334 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for KERNEL builds" | |
335 | |
336 endif # ifneq ("${TYPE}", "KERNEL") | |
337 | |
338 else # CORE build | |
339 | |
340 dtraceCheck: | |
341 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds" | |
342 | |
343 endif # ifneq ("${TYPE}", "CORE") |