annotate make/solaris/makefiles/dtrace.make @ 3762:5c0a3c1858b1

7048782: CMS: assert(last_chunk_index_to_check<= last_chunk_index) failed: parCardTableModRefBS.cpp:359 Summary: The LNC array is sized before the start of a scavenge, while the heap may expand during a scavenge. With CMS, the last block of an arbitrary suffice of the LNC array may expand due to coalition with the expansion delta. We now take care not to attempt access past the end of the LNC array. LNC array code will be cleaned up and suitably encapsulated as part of the forthcoming performance RFE 7043675. Reviewed-by: brutisso
author ysr
date Thu, 02 Jun 2011 10:23:36 -0700
parents f95d63e2154a
children da0999c4b733
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
2 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 #
a61af66fc99e Initial load
duke
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 #
a61af66fc99e Initial load
duke
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 #
a61af66fc99e Initial load
duke
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # Rules to build jvm_db/dtrace, used by vm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 ifneq ("${TYPE}", "CORE")
a61af66fc99e Initial load
duke
parents:
diff changeset
31 ifneq ("${TYPE}", "KERNEL")
a61af66fc99e Initial load
duke
parents:
diff changeset
32
a61af66fc99e Initial load
duke
parents:
diff changeset
33 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
36 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for gcc builds"
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 else
a61af66fc99e Initial load
duke
parents:
diff changeset
39
a61af66fc99e Initial load
duke
parents:
diff changeset
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
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 JVM_DTRACE = jvm_dtrace
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
45 LIBJVM_DTRACE = libjvm_dtrace.so
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
46 LIBJVM_DTRACE_G = libjvm$(G_SUFFIX)_dtrace.so
0
a61af66fc99e Initial load
duke
parents:
diff changeset
47
a61af66fc99e Initial load
duke
parents:
diff changeset
48 JVMOFFS = JvmOffsets
a61af66fc99e Initial load
duke
parents:
diff changeset
49 JVMOFFS.o = $(JVMOFFS).o
a61af66fc99e Initial load
duke
parents:
diff changeset
50 GENOFFS = generate$(JVMOFFS)
a61af66fc99e Initial load
duke
parents:
diff changeset
51
a61af66fc99e Initial load
duke
parents:
diff changeset
52 DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
53 DTRACE = dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
54 DTRACE.o = $(DTRACE).o
a61af66fc99e Initial load
duke
parents:
diff changeset
55
a61af66fc99e Initial load
duke
parents:
diff changeset
56 # to remove '-g' option which causes link problems
a61af66fc99e Initial load
duke
parents:
diff changeset
57 # also '-z nodefs' is used as workaround
a61af66fc99e Initial load
duke
parents:
diff changeset
58 GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';)
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 ifdef LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
61 DTRACE_OPTS = -64 -D_LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
62 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64 # making libjvm_db
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 # Use mapfile with libjvm_db.so
a61af66fc99e Initial load
duke
parents:
diff changeset
67 LIBJVM_DB_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_db
a61af66fc99e Initial load
duke
parents:
diff changeset
68 LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
69
a61af66fc99e Initial load
duke
parents:
diff changeset
70 # Use mapfile with libjvm_dtrace.so
a61af66fc99e Initial load
duke
parents:
diff changeset
71 LIBJVM_DTRACE_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
72 LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE))
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
75 LFLAGS_JVM_DB += -D_REENTRANT $(PICFLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
76 LFLAGS_JVM_DTRACE += -D_REENTRANT $(PICFLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
77 else
a61af66fc99e Initial load
duke
parents:
diff changeset
78 LFLAGS_JVM_DB += -mt $(PICFLAG) -xnolib
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
79 LFLAGS_JVM_DTRACE += -mt $(PICFLAG) -xnolib -ldl
0
a61af66fc99e Initial load
duke
parents:
diff changeset
80 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
81
a61af66fc99e Initial load
duke
parents:
diff changeset
82 ISA = $(subst i386,i486,$(shell isainfo -n))
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 # Making 64/libjvm_db.so: 64-bit version of libjvm_db.so which handles 32-bit libjvm.so
a61af66fc99e Initial load
duke
parents:
diff changeset
85 ifneq ("${ISA}","${BUILDARCH}")
a61af66fc99e Initial load
duke
parents:
diff changeset
86
a61af66fc99e Initial load
duke
parents:
diff changeset
87 XLIBJVM_DB = 64/$(LIBJVM_DB)
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
88 XLIBJVM_DB_G = 64/$(LIBJVM_DB_G)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
89 XLIBJVM_DTRACE = 64/$(LIBJVM_DTRACE)
1123
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
90 XLIBJVM_DTRACE_G = 64/$(LIBJVM_DTRACE_G)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
91
a61af66fc99e Initial load
duke
parents:
diff changeset
92 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
93 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
94 $(QUIETLY) mkdir -p 64/ ; \
433
c1345e85f901 6767659: Conversion from i486 to x86 missed some entries in makefiles
kvn
parents: 196
diff changeset
95 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
96 $(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
97 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); }
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
98
0
a61af66fc99e Initial load
duke
parents:
diff changeset
99 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
100 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
101 $(QUIETLY) mkdir -p 64/ ; \
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. \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
103 $(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
104 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); }
167c2986d91b 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 443
diff changeset
105
0
a61af66fc99e Initial load
duke
parents:
diff changeset
106 endif # ifneq ("${ISA}","${BUILDARCH}")
a61af66fc99e Initial load
duke
parents:
diff changeset
107
a61af66fc99e Initial load
duke
parents:
diff changeset
108 ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
109 LFLAGS_GENOFFS += -D_REENTRANT
a61af66fc99e Initial load
duke
parents:
diff changeset
110 else
a61af66fc99e Initial load
duke
parents:
diff changeset
111 LFLAGS_GENOFFS += -mt -xnolib -norunpath
a61af66fc99e Initial load
duke
parents:
diff changeset
112 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 lib$(GENOFFS).so: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
115 $(LIBJVM.o)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
116 $(QUIETLY) $(CCC) $(CPPFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
a61af66fc99e Initial load
duke
parents:
diff changeset
117 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -lc
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).so
a61af66fc99e Initial load
duke
parents:
diff changeset
120 $(QUIETLY) $(LINK.CC) -z nodefs -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \
a61af66fc99e Initial load
duke
parents:
diff changeset
121 ./lib$(GENOFFS).so
a61af66fc99e Initial load
duke
parents:
diff changeset
122
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
123 CONDITIONALLY_UPDATE_JVMOFFS_TARGET = \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
124 cmp -s $@ $@.tmp; \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
125 case $$? in \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
126 0) rm -f $@.tmp;; \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
127 *) rm -f $@ && mv $@.tmp $@ && echo Updated $@;; \
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
128 esac
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
129
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
130 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
131 $(JVMOFFS).h: $(GENOFFS)
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
132 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -header > $@.tmp
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
133 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
134
a61af66fc99e Initial load
duke
parents:
diff changeset
135 $(JVMOFFS)Index.h: $(GENOFFS)
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
136 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -index > $@.tmp
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
137 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
138
a61af66fc99e Initial load
duke
parents:
diff changeset
139 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h
440
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
140 $(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -table > $@.tmp
96c6da8f095c 6769128: failure to run generateJvmOffsets is ignored
jcoomes
parents: 196
diff changeset
141 $(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
0
a61af66fc99e Initial load
duke
parents:
diff changeset
142
a61af66fc99e Initial load
duke
parents:
diff changeset
143 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
144 $(QUIETLY) $(CCC) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
145
a61af66fc99e Initial load
duke
parents:
diff changeset
146 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
147 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
148 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \
a61af66fc99e Initial load
duke
parents:
diff changeset
149 $(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
150 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
151
a61af66fc99e Initial load
duke
parents:
diff changeset
152 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
a61af66fc99e Initial load
duke
parents:
diff changeset
153 @echo Making $@
a61af66fc99e Initial load
duke
parents:
diff changeset
154 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \
a61af66fc99e Initial load
duke
parents:
diff changeset
155 $(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
156 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
157
a61af66fc99e Initial load
duke
parents:
diff changeset
158 $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
a61af66fc99e Initial load
duke
parents:
diff changeset
159 $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
a61af66fc99e Initial load
duke
parents:
diff changeset
160 $(QUIETLY) cat $^ > $@
a61af66fc99e Initial load
duke
parents:
diff changeset
161
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
162 DTraced_Files = ciEnv.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
163 classLoadingService.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
164 compileBroker.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
165 hashtable.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
166 instanceKlass.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
167 java.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
168 jni.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
169 jvm.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
170 memoryManager.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
171 nmethod.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
172 objectMonitor.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
173 runtimeService.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
174 sharedRuntime.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
175 synchronizer.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
176 thread.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
177 unsafe.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
178 vmThread.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
179 vmCMSOperations.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
180 vmPSOperations.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
181 vmGCOperations.o \
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1799
diff changeset
182
0
a61af66fc99e Initial load
duke
parents:
diff changeset
183 # Dtrace is available, so we build $(DTRACE.o)
a61af66fc99e Initial load
duke
parents:
diff changeset
184 $(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
a61af66fc99e Initial load
duke
parents:
diff changeset
185 @echo Compiling $(DTRACE).d
a61af66fc99e Initial load
duke
parents:
diff changeset
186
1799
4094f07967ca 6974813: JVM needs to use demand loading for its DTrace probes
kamg
parents: 1552
diff changeset
187 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
0
a61af66fc99e Initial load
duke
parents:
diff changeset
188 $(DTraced_Files) ||\
a61af66fc99e Initial load
duke
parents:
diff changeset
189 STATUS=$$?;\
a61af66fc99e Initial load
duke
parents:
diff changeset
190 if [ x"$$STATUS" = x"1" -a \
a61af66fc99e Initial load
duke
parents:
diff changeset
191 x`uname -r` = x"5.10" -a \
a61af66fc99e Initial load
duke
parents:
diff changeset
192 x`uname -p` = x"sparc" ]; then\
a61af66fc99e Initial load
duke
parents:
diff changeset
193 echo "*****************************************************************";\
a61af66fc99e Initial load
duke
parents:
diff changeset
194 echo "* If you are building server compiler, and the error message is ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
195 echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
196 echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\
a61af66fc99e Initial load
duke
parents:
diff changeset
197 echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
198 echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\
a61af66fc99e Initial load
duke
parents:
diff changeset
199 echo "* dtrace probes for this build.";\
a61af66fc99e Initial load
duke
parents:
diff changeset
200 echo "*****************************************************************";\
a61af66fc99e Initial load
duke
parents:
diff changeset
201 fi;\
a61af66fc99e Initial load
duke
parents:
diff changeset
202 exit $$STATUS
a61af66fc99e Initial load
duke
parents:
diff changeset
203 # Since some DTraced_Files are in LIBJVM.o and they are touched by this
a61af66fc99e Initial load
duke
parents:
diff changeset
204 # command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will
a61af66fc99e Initial load
duke
parents:
diff changeset
205 # think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets*
a61af66fc99e Initial load
duke
parents:
diff changeset
206 # files, but it doesn't, so we touch the necessary files to prevent later
a61af66fc99e Initial load
duke
parents:
diff changeset
207 # recompilation. Note: we only touch the necessary files if they already
a61af66fc99e Initial load
duke
parents:
diff changeset
208 # exist in order to close a race where an empty file can be created
a61af66fc99e Initial load
duke
parents:
diff changeset
209 # before the real build rule is executed.
a61af66fc99e Initial load
duke
parents:
diff changeset
210 # But, we can't touch the *.h files: This rule depends
a61af66fc99e Initial load
duke
parents:
diff changeset
211 # on them, and that would cause an infinite cycle of rebuilding.
a61af66fc99e Initial load
duke
parents:
diff changeset
212 # Neither the *.h or *.ccp files need to be touched, since they have
a61af66fc99e Initial load
duke
parents:
diff changeset
213 # rules which do not update them when the generator file has not
a61af66fc99e Initial load
duke
parents:
diff changeset
214 # changed their contents.
a61af66fc99e Initial load
duke
parents:
diff changeset
215 $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi
a61af66fc99e Initial load
duke
parents:
diff changeset
216 $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi
a61af66fc99e Initial load
duke
parents:
diff changeset
217 $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi
a61af66fc99e Initial load
duke
parents:
diff changeset
218
a61af66fc99e Initial load
duke
parents:
diff changeset
219 .PHONY: dtraceCheck
a61af66fc99e Initial load
duke
parents:
diff changeset
220
116
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
221 SYSTEM_DTRACE_H = /usr/include/dtrace.h
0
a61af66fc99e Initial load
duke
parents:
diff changeset
222 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
223 PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace
a61af66fc99e Initial load
duke
parents:
diff changeset
224 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG})
a61af66fc99e Initial load
duke
parents:
diff changeset
225 patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG})
116
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
226 systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H))
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
227
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
228 ifneq ("$(systemDtraceHdrFound)", "")
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
229 CFLAGS += -DHAVE_DTRACE_H
018d5b58dd4f 6537506: Provide a mechanism for specifying Java-level USDT-like dtrace probes
kamg
parents: 91
diff changeset
230 endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
231
a61af66fc99e Initial load
duke
parents:
diff changeset
232 ifneq ("$(patchDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
233 DTRACE_PROG=$(PATCH_DTRACE_PROG)
a61af66fc99e Initial load
duke
parents:
diff changeset
234 DTRACE_INCL=-I/opt/SUNWdtrd/include
a61af66fc99e Initial load
duke
parents:
diff changeset
235 else
a61af66fc99e Initial load
duke
parents:
diff changeset
236 ifneq ("$(systemDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
237 DTRACE_PROG=$(SYSTEM_DTRACE_PROG)
a61af66fc99e Initial load
duke
parents:
diff changeset
238 else
a61af66fc99e Initial load
duke
parents:
diff changeset
239
a61af66fc99e Initial load
duke
parents:
diff changeset
240 endif # ifneq ("$(systemDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
241 endif # ifneq ("$(patchDtraceFound)", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
242
a61af66fc99e Initial load
duke
parents:
diff changeset
243 ifneq ("${DTRACE_PROG}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
244 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 DTRACE_OBJS = $(DTRACE.o) $(JVMOFFS.o)
a61af66fc99e Initial load
duke
parents:
diff changeset
247 CFLAGS += $(DTRACE_INCL) -DDTRACE_ENABLED
a61af66fc99e Initial load
duke
parents:
diff changeset
248 MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE)
a61af66fc99e Initial load
duke
parents:
diff changeset
249
a61af66fc99e Initial load
duke
parents:
diff changeset
250 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
251
a61af66fc99e Initial load
duke
parents:
diff changeset
252 else # manually disabled
a61af66fc99e Initial load
duke
parents:
diff changeset
253
a61af66fc99e Initial load
duke
parents:
diff changeset
254 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
255 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable"
a61af66fc99e Initial load
duke
parents:
diff changeset
256
a61af66fc99e Initial load
duke
parents:
diff changeset
257 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
258
a61af66fc99e Initial load
duke
parents:
diff changeset
259 else # No dtrace program found
a61af66fc99e Initial load
duke
parents:
diff changeset
260
a61af66fc99e Initial load
duke
parents:
diff changeset
261 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
262 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system"
a61af66fc99e Initial load
duke
parents:
diff changeset
263
a61af66fc99e Initial load
duke
parents:
diff changeset
264 endif # ifneq ("${dtraceFound}", "")
a61af66fc99e Initial load
duke
parents:
diff changeset
265
a61af66fc99e Initial load
duke
parents:
diff changeset
266 endif # ifdef USE_GCC
a61af66fc99e Initial load
duke
parents:
diff changeset
267
a61af66fc99e Initial load
duke
parents:
diff changeset
268 else # KERNEL build
a61af66fc99e Initial load
duke
parents:
diff changeset
269
a61af66fc99e Initial load
duke
parents:
diff changeset
270 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
271 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for KERNEL builds"
a61af66fc99e Initial load
duke
parents:
diff changeset
272
a61af66fc99e Initial load
duke
parents:
diff changeset
273 endif # ifneq ("${TYPE}", "KERNEL")
a61af66fc99e Initial load
duke
parents:
diff changeset
274
a61af66fc99e Initial load
duke
parents:
diff changeset
275 else # CORE build
a61af66fc99e Initial load
duke
parents:
diff changeset
276
a61af66fc99e Initial load
duke
parents:
diff changeset
277 dtraceCheck:
a61af66fc99e Initial load
duke
parents:
diff changeset
278 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds"
a61af66fc99e Initial load
duke
parents:
diff changeset
279
a61af66fc99e Initial load
duke
parents:
diff changeset
280 endif # ifneq ("${TYPE}", "CORE")