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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3960
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
1 #
7951
8b46b0196eb0 8000692: Remove old KERNEL code
zgu
parents: 7408
diff changeset
2 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
3960
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
4 #
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
7 # published by the Free Software Foundation.
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
8 #
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
13 # accompanied this code).
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
14 #
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
15 # You should have received a copy of the GNU General Public License version
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
18 #
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
20 # or visit www.oracle.com if you need additional information or have any
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
21 # questions.
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
22 #
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
23 #
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
24
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
25 # Rules to build jvm_db/dtrace, used by vm.make
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
26
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
27 # We build libjvm_dtrace/libjvm_db/dtrace for COMPILER1 and COMPILER2
7951
8b46b0196eb0 8000692: Remove old KERNEL code
zgu
parents: 7408
diff changeset
28 # but not for CORE configuration.
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
29
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
30 ifneq ("${TYPE}", "CORE")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
31
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
32 ifeq ($(OS_VENDOR), Darwin)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
33 # we build dtrace for macosx using USDT2 probes
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
34
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
35 DtraceOutDir = $(GENERATED)/dtracefiles
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
36
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
37 # Bsd does not build libjvm_db, does not compile on macosx
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
38 # disabled in build: rule in vm.make
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
51 JVMOFFS = JvmOffsets
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
52 JVMOFFS.o = $(JVMOFFS).o
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
53 GENOFFS = generate$(JVMOFFS)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
54
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
55 DTRACE_SRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
56 DTRACE = dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
57 DTRACE.o = $(DTRACE).o
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
58
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
59 # to remove '-g' option which causes link problems
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
60 # also '-z nodefs' is used as workaround
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
61 GENOFFS_CFLAGS = $(shell echo $(CFLAGS) | sed -e 's/ -g / /g' -e 's/ -g0 / /g';)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
62
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
63 ifdef LP64
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
64 DTRACE_OPTS = -D_LP64
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
65 endif
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
66
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
67 # making libjvm_db
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
68
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
69 # Use mapfile with libjvm_db.so
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
70 LIBJVM_DB_MAPFILE = # no mapfile for usdt2 # $(MAKEFILES_DIR)/mapfile-vers-jvm_db
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
71 #LFLAGS_JVM_DB += $(MAPFLAG:FILENAME=$(LIBJVM_DB_MAPFILE))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
72
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
73 # Use mapfile with libjvm_dtrace.so
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
74 LIBJVM_DTRACE_MAPFILE = # no mapfile for usdt2 # $(MAKEFILES_DIR)/mapfile-vers-jvm_dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
75 #LFLAGS_JVM_DTRACE += $(MAPFLAG:FILENAME=$(LIBJVM_DTRACE_MAPFILE))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
76
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
77 LFLAGS_JVM_DB += $(PICFLAG) # -D_REENTRANT
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
78 LFLAGS_JVM_DTRACE += $(PICFLAG) # -D_REENTRANT
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
79
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
80 ISA = $(subst i386,i486,$(BUILDARCH))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
81
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
82 # Making 64/libjvm_db.so: 64-bit version of libjvm_db.so which handles 32-bit libjvm.so
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
83 ifneq ("${ISA}","${BUILDARCH}")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
88 XARCH = $(subst sparcv9,v9,$(shell echo $(ISA)))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
95 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
98 $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
130
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
131 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
134 $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
166
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
167 endif # ifneq ("${ISA}","${BUILDARCH}")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
168
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
169 LFLAGS_GENOFFS += -L.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
170
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
171 lib$(GENOFFS).dylib: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
174 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -ljvm
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
175
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
178 ./lib$(GENOFFS).dylib
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
179
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
180 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
183 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
184 then rm -f $@; mv $@.tmp $@; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
185 else rm -f $@.tmp; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
186 fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
187
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
190 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
191 then rm -f $@; mv $@.tmp $@; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
192 else rm -f $@.tmp; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
193 fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
194
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
197 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
198 then rm -f $@; mv $@.tmp $@; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
199 else rm -f $@.tmp; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
200 fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
201
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
204
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
205 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
206 @echo Making $@
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
207 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
233
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
234 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
235 @echo Making $@
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
236 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
262
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
263 #$(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
264 # $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
265 # $(QUIETLY) cat $^ > $@
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
266
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
267 $(DtraceOutDir):
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
268 mkdir $(DtraceOutDir)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
269
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
270 $(DtraceOutDir)/hotspot.h: $(DTRACE_SRCDIR)/hotspot.d | $(DtraceOutDir)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
271 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot.d
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
272
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
273 $(DtraceOutDir)/hotspot_jni.h: $(DTRACE_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
274 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hotspot_jni.d
3960
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
275
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
276 $(DtraceOutDir)/hs_private.h: $(DTRACE_SRCDIR)/hs_private.d | $(DtraceOutDir)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
277 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/hs_private.d
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
278
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
279 $(DtraceOutDir)/jhelper.h: $(DTRACE_SRCDIR)/jhelper.d $(JVMOFFS).o | $(DtraceOutDir)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
280 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_SRCDIR)/jhelper.d
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
281
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
282 # jhelper currently disabled
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
283 dtrace_gen_headers: $(DtraceOutDir)/hotspot.h $(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
284
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
285 DTraced_Files = ciEnv.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
286 classLoadingService.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
287 compileBroker.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
288 hashtable.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
289 instanceKlass.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
290 java.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
291 jni.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
292 jvm.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
293 memoryManager.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
294 nmethod.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
295 objectMonitor.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
296 runtimeService.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
297 sharedRuntime.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
298 synchronizer.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
299 thread.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
300 unsafe.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
301 vmThread.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
302 vmCMSOperations.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
303 vmPSOperations.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
304 vmGCOperations.o \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
305
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
306 # Dtrace is available, so we build $(DTRACE.o)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
307 #$(DTRACE.o): $(DTRACE).d $(JVMOFFS).h $(JVMOFFS)Index.h $(DTraced_Files)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
308 # @echo Compiling $(DTRACE).d
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
309
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
310 # $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
311 # $(DTraced_Files) ||\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
312 # STATUS=$$?;\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
313 # if [ x"$$STATUS" = x"1" -a \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
314 # x`uname -r` = x"5.10" -a \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
315 # x`uname -p` = x"sparc" ]; then\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
316 # echo "*****************************************************************";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
317 # echo "* If you are building server compiler, and the error message is ";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
318 # echo "* \"incorrect ELF machine type...\", you have run into solaris bug ";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
319 # echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
320 # echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
321 # echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
322 # echo "* dtrace probes for this build.";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
323 # echo "*****************************************************************";\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
324 # fi;\
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
325 # exit $$STATUS
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
326 # Since some DTraced_Files are in LIBJVM.o and they are touched by this
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
327 # command, and libgenerateJvmOffsets.so depends on LIBJVM.o, 'make' will
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
328 # think it needs to rebuild libgenerateJvmOffsets.so and thus JvmOffsets*
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
329 # files, but it doesn't, so we touch the necessary files to prevent later
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
330 # recompilation. Note: we only touch the necessary files if they already
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
331 # exist in order to close a race where an empty file can be created
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
332 # before the real build rule is executed.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
333 # But, we can't touch the *.h files: This rule depends
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
334 # on them, and that would cause an infinite cycle of rebuilding.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
335 # Neither the *.h or *.ccp files need to be touched, since they have
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
336 # rules which do not update them when the generator file has not
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
337 # changed their contents.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
338 # $(QUIETLY) if [ -f lib$(GENOFFS).so ]; then touch lib$(GENOFFS).so; fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
339 # $(QUIETLY) if [ -f $(GENOFFS) ]; then touch $(GENOFFS); fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
340 # $(QUIETLY) if [ -f $(JVMOFFS.o) ]; then touch $(JVMOFFS.o); fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
341
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
342 .PHONY: dtraceCheck
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
343
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
344 #SYSTEM_DTRACE_H = /usr/include/dtrace.h
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
345 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
346 #PATCH_DTRACE_PROG = /opt/SUNWdtrd/sbin/dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
347 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG})
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
348 #patchDtraceFound := $(wildcard ${PATCH_DTRACE_PROG})
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
349 #systemDtraceHdrFound := $(wildcard $(SYSTEM_DTRACE_H))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
350
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
351 #ifneq ("$(systemDtraceHdrFound)", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
352 #CFLAGS += -DHAVE_DTRACE_H
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
353 #endif
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
354
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
355 #ifneq ("$(patchDtraceFound)", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
356 #DTRACE_PROG=$(PATCH_DTRACE_PROG)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
357 #DTRACE_INCL=-I/opt/SUNWdtrd/include
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
358 #else
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
359 ifneq ("$(systemDtraceFound)", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
360 DTRACE_PROG=$(SYSTEM_DTRACE_PROG)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
361 else
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
362
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
363 endif # ifneq ("$(systemDtraceFound)", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
364 #endif # ifneq ("$(patchDtraceFound)", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
365
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
366 ifneq ("${DTRACE_PROG}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
367 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
368
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
369 DTRACE_OBJS = $(DTRACE.o) #$(JVMOFFS.o)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
370 CFLAGS += -DDTRACE_ENABLED #$(DTRACE_INCL)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
371 #clangCFLAGS += -DDTRACE_ENABLED -fno-optimize-sibling-calls
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
372 #MAPFILE_DTRACE_OPT = $(MAPFILE_DTRACE)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
373
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
374
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
375 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
376
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
377 dtrace_stuff: dtrace_gen_headers
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
378 $(QUIETLY) echo "dtrace headers generated"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
379
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
380
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
381 else # manually disabled
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
382
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
383 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
384 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
385
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
386 dtrace_stuff:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
387
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
388 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
389
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
390 else # No dtrace program found
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
391
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
392 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
393 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
394
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
395 dtrace_stuff:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
396
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
397 endif # ifneq ("${dtraceFound}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
398
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
399 endif # ifeq ($(OS_VENDOR), Darwin)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
400
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
401
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
402 else # CORE build
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
403
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
404 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
405 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
406
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
407 endif # ifneq ("${TYPE}", "CORE")