Mercurial > hg > truffle
annotate make/bsd/makefiles/dtrace.make @ 20304:a22acf6d7598
8048112: G1 Full GC needs to support the case when the very first region is not available
Summary: Refactor preparation for compaction during Full GC so that it lazily initializes the first compaction point. This also avoids problems later when the first region may not be committed. Also reviewed by K. Barrett.
Reviewed-by: brutisso
author | tschatzl |
---|---|
date | Mon, 21 Jul 2014 10:00:31 +0200 |
parents | f509b8f4699b |
children | a3ba776d6ab6 |
rev | line source |
---|---|
3960 | 1 # |
7951 | 2 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
3960 | 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 # | |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 # or visit www.oracle.com if you need additional information or have any | |
21 # questions. | |
22 # | |
23 # | |
24 | |
4006 | 25 # Rules to build jvm_db/dtrace, used by vm.make |
26 | |
27 # We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2 | |
7951 | 28 # but not for CORE configuration. |
4006 | 29 |
30 ifneq ("${TYPE}", "CORE") | |
31 | |
32 ifeq ($(OS_VENDOR), Darwin) | |
33 # we build dtrace for macosx using USDT2 probes | |
34 | |
35 DtraceOutDir = $(GENERATED)/dtracefiles | |
36 | |
37 # Bsd does not build libjvm_db, does not compile on macosx | |
38 # disabled in build: rule in vm.make | |
39 JVM_DB = libjvm_db | |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6853
diff
changeset
|
40 LIBJVM_DB = libjvm_db.dylib |
4006 | 41 |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
42 LIBJVM_DB_DEBUGINFO = libjvm_db.dylib.dSYM |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
43 LIBJVM_DB_DIZ = libjvm_db.diz |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
44 |
4006 | 45 JVM_DTRACE = jvm_dtrace |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6853
diff
changeset
|
46 LIBJVM_DTRACE = libjvm_dtrace.dylib |
4006 | 47 |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
48 LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.dylib.dSYM |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
49 LIBJVM_DTRACE_DIZ = libjvm_dtrace.diz |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
50 |
4006 | 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 = -D_LP64 | |
65 endif | |
66 | |
67 # making libjvm_db | |
68 | |
69 # Use mapfile with libjvm_db.so | |
70 LIBJVM_DB_MAPFILE = # no mapfile for usdt2 # $(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 = # no mapfile for usdt2 # $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace | |
75 #LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE)) | |
76 | |
77 LFLAGS_JVM_DB += $(PICFLAG) # -D_REENTRANT | |
78 LFLAGS_JVM_DTRACE += $(PICFLAG) # -D_REENTRANT | |
79 | |
80 ISA = $(subst i386,i486,$(BUILDARCH)) | |
81 | |
82 # Making 64/libjvm_db.so: 64-bit version of libjvm_db.so which handles 32-bit libjvm.so | |
83 ifneq ("${ISA}","${BUILDARCH}") | |
84 | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
85 XLIBJVM_DIR = 64 |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
86 XLIBJVM_DB = $(XLIBJVM_DIR)/$(LIBJVM_DB) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
87 XLIBJVM_DTRACE = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE) |
4006 | 88 XARCH = $(subst sparcv9,v9,$(shell echo $(ISA))) |
89 | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
90 XLIBJVM_DB_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
91 XLIBJVM_DB_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DB_DIZ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
92 XLIBJVM_DTRACE_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
93 XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
94 |
4006 | 95 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) |
96 @echo Making $@ | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
97 $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ |
4006 | 98 $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \ |
99 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c #-lc | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
100 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
101 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
102 $(DSYMUTIL) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
103 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
104 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
105 # is not in the archived name: |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
106 ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -r -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
107 $(RM) -r $(XLIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
108 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
109 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
110 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
111 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
112 # is not in the link name: |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
113 $(QUIETLY) ( cd $(XLIBJVM_DIR) && $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB) ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
114 ifeq ($(STRIP_POLICY),all_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
115 $(QUIETLY) $(STRIP) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
116 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
117 ifeq ($(STRIP_POLICY),min_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
118 $(QUIETLY) $(STRIP) -x $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
119 # implied else here is no stripping at all |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
120 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
121 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
122 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
123 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
124 # is not in the archived name: |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
125 ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
126 $(RM) $(XLIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
127 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
128 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
129 endif |
4006 | 130 |
131 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | |
132 @echo Making $@ | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
133 $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \ |
4006 | 134 $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \ |
135 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c #-lc -lthread -ldoor | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
136 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
137 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
138 $(DSYMUTIL) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
139 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
140 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
141 # is not in the archived name: |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
142 ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -r -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
143 $(RM) -r $(XLIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
144 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
145 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
146 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
147 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
148 # is not in the link name: |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
149 ( cd $(XLIBJVM_DIR) && $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE) ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
150 ifeq ($(STRIP_POLICY),all_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
151 $(QUIETLY) $(STRIP) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
152 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
153 ifeq ($(STRIP_POLICY),min_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
154 $(QUIETLY) $(STRIP) -x $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
155 # implied else here is no stripping at all |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
156 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
157 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
158 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
159 # Do this part in the $(XLIBJVM_DIR) subdir so $(XLIBJVM_DIR) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
160 # is not in the archived name: |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
161 ( cd $(XLIBJVM_DIR) && $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) ) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
162 $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
163 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
164 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
165 endif |
4006 | 166 |
167 endif # ifneq ("${ISA}","${BUILDARCH}") | |
168 | |
169 LFLAGS_GENOFFS += -L. | |
170 | |
171 lib$(GENOFFS).dylib: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \ | |
172 $(LIBJVM.o) | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
4006
diff
changeset
|
173 $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \ |
4006 | 174 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -ljvm |
175 | |
176 $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).dylib | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
4006
diff
changeset
|
177 $(QUIETLY) $(LINK.CXX) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \ |
4006 | 178 ./lib$(GENOFFS).dylib |
179 | |
180 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs. | |
181 $(JVMOFFS).h: $(GENOFFS) | |
6845
9024b6b53ec2
8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents:
4891
diff
changeset
|
182 $(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -header > $@.tmp; touch $@; \ |
4006 | 183 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \ |
184 then rm -f $@; mv $@.tmp $@; \ | |
185 else rm -f $@.tmp; \ | |
186 fi | |
187 | |
188 $(JVMOFFS)Index.h: $(GENOFFS) | |
6845
9024b6b53ec2
8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents:
4891
diff
changeset
|
189 $(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -index > $@.tmp; touch $@; \ |
4006 | 190 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \ |
191 then rm -f $@; mv $@.tmp $@; \ | |
192 else rm -f $@.tmp; \ | |
193 fi | |
194 | |
195 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h | |
6845
9024b6b53ec2
8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents:
4891
diff
changeset
|
196 $(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -table > $@.tmp; touch $@; \ |
4006 | 197 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \ |
198 then rm -f $@; mv $@.tmp $@; \ | |
199 else rm -f $@.tmp; \ | |
200 fi | |
201 | |
202 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
4006
diff
changeset
|
203 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp |
4006 | 204 |
205 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) | |
206 @echo Making $@ | |
207 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ | |
208 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -Wall # -lc | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
209 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
210 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
211 $(DSYMUTIL) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
212 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
213 $(ZIPEXE) -q -r -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
214 $(RM) -r $(LIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
215 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
216 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
217 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
218 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
219 ifeq ($(STRIP_POLICY),all_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
220 $(QUIETLY) $(STRIP) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
221 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
222 ifeq ($(STRIP_POLICY),min_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
223 $(QUIETLY) $(STRIP) -x $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
224 # implied else here is no stripping at all |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
225 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
226 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
227 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
228 $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
229 $(RM) $(LIBJVM_DB_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
230 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
231 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
232 endif |
4006 | 233 |
234 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | |
235 @echo Making $@ | |
236 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ | |
237 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c #-lc -lthread -ldoor | |
12859
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
238 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
239 ifeq ($(OS_VENDOR), Darwin) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
240 $(DSYMUTIL) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
241 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
242 $(ZIPEXE) -q -r -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
243 $(RM) -r $(LIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
244 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
245 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
246 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
247 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
248 ifeq ($(STRIP_POLICY),all_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
249 $(QUIETLY) $(STRIP) $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
250 else |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
251 ifeq ($(STRIP_POLICY),min_strip) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
252 $(QUIETLY) $(STRIP) -x $@ |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
253 # implied else here is no stripping at all |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
254 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
255 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
256 ifeq ($(ZIP_DEBUGINFO_FILES),1) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
257 $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
258 $(RM) $(LIBJVM_DTRACE_DEBUGINFO) |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
259 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
260 endif |
f509b8f4699b
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
7951
diff
changeset
|
261 endif |
4006 | 262 |
263 #$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ | |
264 # $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d | |
265 # $(QUIETLY) cat $^ > $@ | |
266 | |
267 $(DtraceOutDir): | |
268 mkdir $(DtraceOutDir) | |
269 | |
270 $(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir) | |
271 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d | |
272 | |
273 $(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir) | |
274 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d | |
3960 | 275 |
4006 | 276 $(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir) |
277 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d | |
278 | |
279 $(DtraceOutDir)/jhelper.h: $(DTRACE_SRCDIR)/jhelper.d $(JVMOFFS).o | $(DtraceOutDir) | |
280 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/jhelper.d | |
281 | |
282 # jhelper currently disabled | |
283 dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h | |
284 | |
285 DTraced_Files = ciEnv.o \ | |
286 classLoadingService.o \ | |
287 compileBroker.o \ | |
288 hashtable.o \ | |
289 instanceKlass.o \ | |
290 java.o \ | |
291 jni.o \ | |
292 jvm.o \ | |
293 memoryManager.o \ | |
294 nmethod.o \ | |
295 objectMonitor.o \ | |
296 runtimeService.o \ | |
297 sharedRuntime.o \ | |
298 synchronizer.o \ | |
299 thread.o \ | |
300 unsafe.o \ | |
301 vmThread.o \ | |
302 vmCMSOperations.o \ | |
303 vmPSOperations.o \ | |
304 vmGCOperations.o \ | |
305 | |
306 # Dtrace is available, so we build $(DTRACE.o) | |
307 #$(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files) | |
308 # @echo Compiling $(DTRACE).d | |
309 | |
310 # $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \ | |
311 # $(DTraced_Files) ||\ | |
312 # STATUS=$$?;\ | |
313 # if [ x"$$STATUS" = x"1" -a \ | |
314 # x`uname -r` = x"5.10" -a \ | |
315 # x`uname -p` = x"sparc" ]; then\ | |
316 # echo "*****************************************************************";\ | |
317 # echo "* If you are building server compiler, and the error message is ";\ | |
318 # echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\ | |
319 # echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\ | |
320 # echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\ | |
321 # echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\ | |
322 # echo "* dtrace probes for this build.";\ | |
323 # echo "*****************************************************************";\ | |
324 # fi;\ | |
325 # exit $$STATUS | |
326 # Since some DTraced_Files are in LIBJVM.o and they are touched by this | |
327 # command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will | |
328 # think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets* | |
329 # files, but it doesn't, so we touch the necessary files to prevent later | |
330 # recompilation. Note: we only touch the necessary files if they already | |
331 # exist in order to close a race where an empty file can be created | |
332 # before the real build rule is executed. | |
333 # But, we can't touch the *.h files: This rule depends | |
334 # on them, and that would cause an infinite cycle of rebuilding. | |
335 # Neither the *.h or *.ccp files need to be touched, since they have | |
336 # rules which do not update them when the generator file has not | |
337 # changed their contents. | |
338 # $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi | |
339 # $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi | |
340 # $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi | |
341 | |
342 .PHONY: dtraceCheck | |
343 | |
344 #SYSTEM_DTRACE_H = /usr/include/dtrace.h | |
345 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace | |
346 #PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace | |
347 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG}) | |
348 #patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG}) | |
349 #systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H)) | |
350 | |
351 #ifneq ("$(systemDtraceHdrFound)", "") | |
352 #CFLAGS += -DHAVE_DTRACE_H | |
353 #endif | |
354 | |
355 #ifneq ("$(patchDtraceFound)", "") | |
356 #DTRACE_PROG=$(PATCH_DTRACE_PROG) | |
357 #DTRACE_INCL=-I/opt/SUNWdtrd/include | |
358 #else | |
359 ifneq ("$(systemDtraceFound)", "") | |
360 DTRACE_PROG=$(SYSTEM_DTRACE_PROG) | |
361 else | |
362 | |
363 endif # ifneq ("$(systemDtraceFound)", "") | |
364 #endif # ifneq ("$(patchDtraceFound)", "") | |
365 | |
366 ifneq ("${DTRACE_PROG}", "") | |
367 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") | |
368 | |
369 DTRACE_OBJS = $(DTRACE.o) #$(JVMOFFS.o) | |
370 CFLAGS += -DDTRACE_ENABLED #$(DTRACE_INCL) | |
371 #clangCFLAGS += -DDTRACE_ENABLED -fno-optimize-sibling-calls | |
372 #MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE) | |
373 | |
374 | |
375 dtraceCheck: | |
376 | |
377 dtrace_stuff: dtrace_gen_headers | |
378 $(QUIETLY) echo "dtrace headers generated" | |
379 | |
380 | |
381 else # manually disabled | |
382 | |
383 dtraceCheck: | |
384 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable" | |
385 | |
386 dtrace_stuff: | |
387 | |
388 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "") | |
389 | |
390 else # No dtrace program found | |
391 | |
392 dtraceCheck: | |
393 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system" | |
394 | |
395 dtrace_stuff: | |
396 | |
397 endif # ifneq ("${dtraceFound}", "") | |
398 | |
399 endif # ifeq ($(OS_VENDOR), Darwin) | |
400 | |
401 | |
402 else # CORE build | |
403 | |
404 dtraceCheck: | |
405 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds" | |
406 | |
407 endif # ifneq ("${TYPE}", "CORE") |