annotate make/bsd/makefiles/dtrace.make @ 14319:a00b8f42c4c4

8032462: Change the linux SDT implementation to use USDT2 instead of USDT1 Reviewed-by: coleenp, sspitsyn, kamg
author sla
date Mon, 03 Feb 2014 13:41:26 +0100
parents a3ba776d6ab6
children 4ca6dc0799b6
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
14319
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
56 DTRACE_COMMON_SRCDIR = $(GAMMADIR)/src/os/posix/dtrace
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
57 DTRACE = dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
58 DTRACE.o = $(DTRACE).o
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
59
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
60 # to remove '-g' option which causes link problems
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
61 # also '-z nodefs' is used as workaround
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
62 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
63
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
64 ifdef LP64
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
65 DTRACE_OPTS = -D_LP64
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
66 endif
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
67
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
68 # making libjvm_db
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
69
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
70 # Use mapfile with libjvm_db.so
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
71 LIBJVM_DB_MAPFILE = # no mapfile for usdt2 # $(MAKEFILES_DIR)/mapfile-vers-jvm_db
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
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
76 LFLAGS_JVM_DB += $(PICFLAG) # -D_REENTRANT
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
77 LFLAGS_JVM_DTRACE += $(PICFLAG) # -D_REENTRANT
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
78
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
79 ISA = $(subst i386,i486,$(BUILDARCH))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
80
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
81 # 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
82 ifneq ("${ISA}","${BUILDARCH}")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
83
12859
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
84 XLIBJVM_DIR = 64
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
85 XLIBJVM_DB = $(XLIBJVM_DIR)/$(LIBJVM_DB)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
86 XLIBJVM_DTRACE = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE)
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
87 XARCH = $(subst sparcv9,v9,$(shell echo $(ISA)))
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
88
12859
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
89 XLIBJVM_DB_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
90 XLIBJVM_DB_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DB_DIZ)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
91 XLIBJVM_DTRACE_DEBUGINFO = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
92 XLIBJVM_DTRACE_DIZ = $(XLIBJVM_DIR)/$(LIBJVM_DTRACE_DIZ)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
93
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
94 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
95 @echo Making $@
12859
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
96 $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
97 $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
98 $(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
99 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
100 ifeq ($(OS_VENDOR), Darwin)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
101 $(DSYMUTIL) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
102 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
103 # 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
104 # is not in the archived name:
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
105 ( 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
106 $(RM) -r $(XLIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
107 endif
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
108 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
109 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
110 # 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
111 # is not in the link name:
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
112 $(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
113 ifeq ($(STRIP_POLICY),all_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
114 $(QUIETLY) $(STRIP) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
115 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
116 ifeq ($(STRIP_POLICY),min_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
117 $(QUIETLY) $(STRIP) -x $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
118 # implied else here is no stripping at all
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
119 endif
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 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
122 # 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
123 # is not in the archived name:
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
124 ( 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
125 $(RM) $(XLIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
126 endif
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
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
129
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
130 $(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
131 @echo Making $@
12859
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
132 $(QUIETLY) mkdir -p $(XLIBJVM_DIR) ; \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
133 $(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
134 $(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
135 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
136 ifeq ($(OS_VENDOR), Darwin)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
137 $(DSYMUTIL) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
138 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
139 # 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
140 # is not in the archived name:
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
141 ( 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
142 $(RM) -r $(XLIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
143 endif
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
144 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
145 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
146 # 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
147 # is not in the link name:
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
148 ( 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
149 ifeq ($(STRIP_POLICY),all_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
150 $(QUIETLY) $(STRIP) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
151 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
152 ifeq ($(STRIP_POLICY),min_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
153 $(QUIETLY) $(STRIP) -x $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
154 # implied else here is no stripping at all
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
155 endif
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 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
158 # 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
159 # is not in the archived name:
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
160 ( 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
161 $(RM) $(XLIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
162 endif
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
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
165
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
166 endif # ifneq ("${ISA}","${BUILDARCH}")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
167
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
168 LFLAGS_GENOFFS += -L.
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
169
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
170 lib$(GENOFFS).dylib: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
171 $(LIBJVM.o)
4891
719f7007c8e8 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 4006
diff changeset
172 $(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
173 $(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -ljvm
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
174
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
175 $(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
176 $(QUIETLY) $(LINK.CXX) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
177 ./lib$(GENOFFS).dylib
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
178
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
179 # $@.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
180 $(JVMOFFS).h: $(GENOFFS)
6845
9024b6b53ec2 8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents: 4891
diff changeset
181 $(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -header > $@.tmp; touch $@; \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
182 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
183 then rm -f $@; mv $@.tmp $@; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
184 else rm -f $@.tmp; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
185 fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
186
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
187 $(JVMOFFS)Index.h: $(GENOFFS)
6845
9024b6b53ec2 8000485: Hotspot build fails in Solaris Studio IDE when building dtrace
vlivanov
parents: 4891
diff changeset
188 $(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -index > $@.tmp; touch $@; \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
189 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
190 then rm -f $@; mv $@.tmp $@; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
191 else rm -f $@.tmp; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
192 fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
193
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
194 $(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
195 $(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -table > $@.tmp; touch $@; \
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
196 if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
197 then rm -f $@; mv $@.tmp $@; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
198 else rm -f $@.tmp; \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
199 fi
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
200
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
201 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp
4891
719f7007c8e8 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 4006
diff changeset
202 $(QUIETLY) $(CXX) -c -I. -o $@ $(ARCHFLAG) -D$(TYPE) $(JVMOFFS).cpp
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
203
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
204 $(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
205 @echo Making $@
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
206 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
207 $(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
208 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
209 ifeq ($(OS_VENDOR), Darwin)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
210 $(DSYMUTIL) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
211 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
212 $(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
213 $(RM) -r $(LIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
214 endif
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
215 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
216 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
217 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
218 ifeq ($(STRIP_POLICY),all_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
219 $(QUIETLY) $(STRIP) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
220 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
221 ifeq ($(STRIP_POLICY),min_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
222 $(QUIETLY) $(STRIP) -x $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
223 # implied else here is no stripping at all
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
224 endif
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 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
227 $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
228 $(RM) $(LIBJVM_DB_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
229 endif
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
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
232
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
233 $(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
234 @echo Making $@
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
235 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
236 $(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
237 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
238 ifeq ($(OS_VENDOR), Darwin)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
239 $(DSYMUTIL) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
240 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
241 $(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
242 $(RM) -r $(LIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
243 endif
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
244 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
245 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
246 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
247 ifeq ($(STRIP_POLICY),all_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
248 $(QUIETLY) $(STRIP) $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
249 else
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
250 ifeq ($(STRIP_POLICY),min_strip)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
251 $(QUIETLY) $(STRIP) -x $@
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
252 # implied else here is no stripping at all
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
253 endif
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 ifeq ($(ZIP_DEBUGINFO_FILES),1)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
256 $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
257 $(RM) $(LIBJVM_DTRACE_DEBUGINFO)
f509b8f4699b 7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents: 7951
diff changeset
258 endif
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
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
261
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
262
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
263 $(DtraceOutDir):
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
264 mkdir $(DtraceOutDir)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
265
14319
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
266 $(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d | $(DtraceOutDir)
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
267 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot.d
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
268
14319
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
269 $(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d | $(DtraceOutDir)
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
270 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
3960
f08d439fab8c 7089790: integrate bsd-port changes
never
parents:
diff changeset
271
14319
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
272 $(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d | $(DtraceOutDir)
a00b8f42c4c4 8032462: Change the linux SDT implementation to use USDT2 instead of USDT1
sla
parents: 14278
diff changeset
273 $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s $(DTRACE_COMMON_SRCDIR)/hs_private.d
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
274
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
275 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
276
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
277
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
278 .PHONY: dtraceCheck
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
279
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
280 SYSTEM_DTRACE_PROG = /usr/sbin/dtrace
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
281 systemDtraceFound := $(wildcard ${SYSTEM_DTRACE_PROG})
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
282
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
283 ifneq ("$(systemDtraceFound)", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
284 DTRACE_PROG=$(SYSTEM_DTRACE_PROG)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
285 else
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
286
14278
a3ba776d6ab6 8030812: Change the solaris DTrace implementation to use USDT2 instead of USDT1
sla
parents: 12859
diff changeset
287 endif
4006
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
288
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
289 ifneq ("${DTRACE_PROG}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
290 ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
291
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
292 DTRACE_OBJS = $(DTRACE.o) #$(JVMOFFS.o)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
293 CFLAGS += -DDTRACE_ENABLED #$(DTRACE_INCL)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
294
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
295
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
296 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
297
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
298 dtrace_stuff: dtrace_gen_headers
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
299 $(QUIETLY) echo "dtrace headers generated"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
300
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
301
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
302 else # manually disabled
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
303
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
304 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
305 $(QUIETLY) echo "**NOTICE** Dtrace support disabled via environment variable"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
306
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
307 dtrace_stuff:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
308
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
309 endif # ifeq ("${HOTSPOT_DISABLE_DTRACE_PROBES}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
310
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
311 else # No dtrace program found
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
312
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
313 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
314 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: not supported by system"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
315
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
316 dtrace_stuff:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
317
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
318 endif # ifneq ("${dtraceFound}", "")
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
319
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
320 endif # ifeq ($(OS_VENDOR), Darwin)
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
321
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
322
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
323 else # CORE build
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
324
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
325 dtraceCheck:
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
326 $(QUIETLY) echo "**NOTICE** Dtrace support disabled for CORE builds"
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
327
436b4a3231bf 7098194: integrate macosx-port changes
dcubed
parents: 3960
diff changeset
328 endif # ifneq ("${TYPE}", "CORE")