Mercurial > hg > graal-jvmci-8
comparison make/solaris/makefiles/dtrace.make @ 6020:d652a62d6e03
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
Summary: Add support for ENABLE_FULL_DEBUG_SYMBOLS and ZIP_DEBUGINFO_FILES build flags. Add support for .diz files.
Reviewed-by: dholmes, ohair, sspitsyn
author | dcubed |
---|---|
date | Fri, 23 Mar 2012 11:50:33 -0700 |
parents | 719f7007c8e8 |
children | 9c1709c4c80c |
comparison
equal
deleted
inserted
replaced
4958:3b24e7e01d20 | 6020:d652a62d6e03 |
---|---|
1 # | 1 # |
2 # Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
39 | 39 |
40 JVM_DB = libjvm_db | 40 JVM_DB = libjvm_db |
41 LIBJVM_DB = libjvm_db.so | 41 LIBJVM_DB = libjvm_db.so |
42 LIBJVM_DB_G = libjvm$(G_SUFFIX)_db.so | 42 LIBJVM_DB_G = libjvm$(G_SUFFIX)_db.so |
43 | 43 |
44 LIBJVM_DB_DEBUGINFO = libjvm_db.debuginfo | 44 LIBJVM_DB_DEBUGINFO = libjvm_db.debuginfo |
45 LIBJVM_DB_DIZ = libjvm_db.diz | |
45 LIBJVM_DB_G_DEBUGINFO = libjvm$(G_SUFFIX)_db.debuginfo | 46 LIBJVM_DB_G_DEBUGINFO = libjvm$(G_SUFFIX)_db.debuginfo |
47 LIBJVM_DB_G_DIZ = libjvm$(G_SUFFIX)_db.diz | |
46 | 48 |
47 JVM_DTRACE = jvm_dtrace | 49 JVM_DTRACE = jvm_dtrace |
48 LIBJVM_DTRACE = libjvm_dtrace.so | 50 LIBJVM_DTRACE = libjvm_dtrace.so |
49 LIBJVM_DTRACE_G = libjvm$(G_SUFFIX)_dtrace.so | 51 LIBJVM_DTRACE_G = libjvm$(G_SUFFIX)_dtrace.so |
50 | 52 |
51 LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.debuginfo | 53 LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.debuginfo |
54 LIBJVM_DTRACE_DIZ = libjvm_dtrace.diz | |
52 LIBJVM_DTRACE_G_DEBUGINFO = libjvm$(G_SUFFIX)_dtrace.debuginfo | 55 LIBJVM_DTRACE_G_DEBUGINFO = libjvm$(G_SUFFIX)_dtrace.debuginfo |
56 LIBJVM_DTRACE_G_DIZ = libjvm$(G_SUFFIX)_dtrace.diz | |
53 | 57 |
54 JVMOFFS = JvmOffsets | 58 JVMOFFS = JvmOffsets |
55 JVMOFFS.o = $(JVMOFFS).o | 59 JVMOFFS.o = $(JVMOFFS).o |
56 GENOFFS = generate$(JVMOFFS) | 60 GENOFFS = generate$(JVMOFFS) |
57 | 61 |
93 XLIBJVM_DB = 64/$(LIBJVM_DB) | 97 XLIBJVM_DB = 64/$(LIBJVM_DB) |
94 XLIBJVM_DB_G = 64/$(LIBJVM_DB_G) | 98 XLIBJVM_DB_G = 64/$(LIBJVM_DB_G) |
95 XLIBJVM_DTRACE = 64/$(LIBJVM_DTRACE) | 99 XLIBJVM_DTRACE = 64/$(LIBJVM_DTRACE) |
96 XLIBJVM_DTRACE_G = 64/$(LIBJVM_DTRACE_G) | 100 XLIBJVM_DTRACE_G = 64/$(LIBJVM_DTRACE_G) |
97 | 101 |
98 XLIBJVM_DB_DEBUGINFO = 64/$(LIBJVM_DB_DEBUGINFO) | 102 XLIBJVM_DB_DEBUGINFO = 64/$(LIBJVM_DB_DEBUGINFO) |
99 XLIBJVM_DB_G_DEBUGINFO = 64/$(LIBJVM_DB_G_DEBUGINFO) | 103 XLIBJVM_DB_DIZ = 64/$(LIBJVM_DB_DIZ) |
100 XLIBJVM_DTRACE_DEBUGINFO = 64/$(LIBJVM_DTRACE_DEBUGINFO) | 104 XLIBJVM_DB_G_DEBUGINFO = 64/$(LIBJVM_DB_G_DEBUGINFO) |
105 XLIBJVM_DB_G_DIZ = 64/$(LIBJVM_DB_G_DIZ) | |
106 XLIBJVM_DTRACE_DEBUGINFO = 64/$(LIBJVM_DTRACE_DEBUGINFO) | |
107 XLIBJVM_DTRACE_DIZ = 64/$(LIBJVM_DTRACE_DIZ) | |
101 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO) | 108 XLIBJVM_DTRACE_G_DEBUGINFO = 64/$(LIBJVM_DTRACE_G_DEBUGINFO) |
109 XLIBJVM_DTRACE_G_DIZ = 64/$(LIBJVM_DTRACE_G_DIZ) | |
102 | 110 |
103 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) | 111 $(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE) |
104 @echo Making $@ | 112 @echo Making $@ |
105 $(QUIETLY) mkdir -p 64/ ; \ | 113 $(QUIETLY) mkdir -p 64/ ; \ |
106 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ | 114 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. -I$(GENERATED) \ |
107 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc | 115 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc |
108 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); } | 116 [ -f $(XLIBJVM_DB_G) ] || { ln -s $(LIBJVM_DB) $(XLIBJVM_DB_G); } |
109 ifneq ($(OBJCOPY),) | 117 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
110 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) | 118 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DB_DEBUGINFO) |
111 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@ | 119 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DB_DEBUGINFO) $@ |
112 ifeq ($(STRIP_POLICY),all_strip) | 120 ifeq ($(STRIP_POLICY),all_strip) |
113 $(QUIETLY) $(STRIP) $@ | 121 $(QUIETLY) $(STRIP) $@ |
114 else | 122 else |
115 ifeq ($(STRIP_POLICY),min_strip) | 123 ifeq ($(STRIP_POLICY),min_strip) |
116 $(QUIETLY) $(STRIP) -x $@ | 124 $(QUIETLY) $(STRIP) -x $@ |
117 # implied else here is no stripping at all | 125 # implied else here is no stripping at all |
118 endif | 126 endif |
119 endif | 127 endif |
120 [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO); } | 128 [ -f $(XLIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO); } |
129 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
130 $(ZIPEXE) -q -y $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO) | |
131 $(RM) $(XLIBJVM_DB_DEBUGINFO) $(XLIBJVM_DB_G_DEBUGINFO) | |
132 [ -f $(XLIBJVM_DB_G_DIZ) ] || { ln -s $(XLIBJVM_DB_DIZ) $(XLIBJVM_DB_G_DIZ); } | |
133 endif | |
121 endif | 134 endif |
122 | 135 |
123 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | 136 $(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
124 @echo Making $@ | 137 @echo Making $@ |
125 $(QUIETLY) mkdir -p 64/ ; \ | 138 $(QUIETLY) mkdir -p 64/ ; \ |
126 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ | 139 $(CC) $(SYMFLAG) $(ARCHFLAG/$(ISA)) -D$(TYPE) -I. \ |
127 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor | 140 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor |
128 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); } | 141 [ -f $(XLIBJVM_DTRACE_G) ] || { ln -s $(LIBJVM_DTRACE) $(XLIBJVM_DTRACE_G); } |
129 ifneq ($(OBJCOPY),) | 142 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
130 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) | 143 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(XLIBJVM_DTRACE_DEBUGINFO) |
131 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@ | 144 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(XLIBJVM_DTRACE_DEBUGINFO) $@ |
132 ifeq ($(STRIP_POLICY),all_strip) | 145 ifeq ($(STRIP_POLICY),all_strip) |
133 $(QUIETLY) $(STRIP) $@ | 146 $(QUIETLY) $(STRIP) $@ |
134 else | 147 else |
135 ifeq ($(STRIP_POLICY),min_strip) | 148 ifeq ($(STRIP_POLICY),min_strip) |
136 $(QUIETLY) $(STRIP) -x $@ | 149 $(QUIETLY) $(STRIP) -x $@ |
137 # implied else here is no stripping at all | 150 # implied else here is no stripping at all |
138 endif | 151 endif |
139 endif | 152 endif |
140 [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO); } | 153 [ -f $(XLIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO); } |
154 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
155 $(ZIPEXE) -q -y $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO) | |
156 $(RM) $(XLIBJVM_DTRACE_DEBUGINFO) $(XLIBJVM_DTRACE_G_DEBUGINFO) | |
157 [ -f $(XLIBJVM_DTRACE_G_DIZ) ] || { ln -s $(XLIBJVM_DTRACE_DIZ) $(XLIBJVM_DTRACE_G_DIZ); } | |
158 endif | |
141 endif | 159 endif |
142 | 160 |
143 endif # ifneq ("${ISA}","${BUILDARCH}") | 161 endif # ifneq ("${ISA}","${BUILDARCH}") |
144 | 162 |
145 ifdef USE_GCC | 163 ifdef USE_GCC |
183 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) | 201 $(LIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS.o) $(XLIBJVM_DB) $(LIBJVM_DB_MAPFILE) |
184 @echo Making $@ | 202 @echo Making $@ |
185 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ | 203 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. -I$(GENERATED) \ |
186 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc | 204 $(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc |
187 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); } | 205 [ -f $(LIBJVM_DB_G) ] || { ln -s $@ $(LIBJVM_DB_G); } |
188 ifneq ($(OBJCOPY),) | 206 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
189 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) | 207 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DB_DEBUGINFO) |
190 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ | 208 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DB_DEBUGINFO) $@ |
191 ifeq ($(STRIP_POLICY),all_strip) | 209 ifeq ($(STRIP_POLICY),all_strip) |
192 $(QUIETLY) $(STRIP) $@ | 210 $(QUIETLY) $(STRIP) $@ |
193 else | 211 else |
195 $(QUIETLY) $(STRIP) -x $@ | 213 $(QUIETLY) $(STRIP) -x $@ |
196 # implied else here is no stripping at all | 214 # implied else here is no stripping at all |
197 endif | 215 endif |
198 endif | 216 endif |
199 [ -f $(LIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO); } | 217 [ -f $(LIBJVM_DB_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO); } |
218 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
219 $(ZIPEXE) -q -y $(LIBJVM_DB_DIZ) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) | |
220 $(RM) $(LIBJVM_DB_DEBUGINFO) $(LIBJVM_DB_G_DEBUGINFO) | |
221 [ -f $(LIBJVM_DB_G_DIZ) ] || { ln -s $(LIBJVM_DB_DIZ) $(LIBJVM_DB_G_DIZ); } | |
222 endif | |
200 endif | 223 endif |
201 | 224 |
202 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) | 225 $(LIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(XLIBJVM_DTRACE) $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE) |
203 @echo Making $@ | 226 @echo Making $@ |
204 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ | 227 $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) -D$(TYPE) -I. \ |
205 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor | 228 $(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor |
206 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); } | 229 [ -f $(LIBJVM_DTRACE_G) ] || { ln -s $@ $(LIBJVM_DTRACE_G); } |
207 ifneq ($(OBJCOPY),) | 230 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
208 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) | 231 $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DTRACE_DEBUGINFO) |
209 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ | 232 $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DTRACE_DEBUGINFO) $@ |
210 ifeq ($(STRIP_POLICY),all_strip) | 233 ifeq ($(STRIP_POLICY),all_strip) |
211 $(QUIETLY) $(STRIP) $@ | 234 $(QUIETLY) $(STRIP) $@ |
212 else | 235 else |
214 $(QUIETLY) $(STRIP) -x $@ | 237 $(QUIETLY) $(STRIP) -x $@ |
215 # implied else here is no stripping at all | 238 # implied else here is no stripping at all |
216 endif | 239 endif |
217 endif | 240 endif |
218 [ -f $(LIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO); } | 241 [ -f $(LIBJVM_DTRACE_G_DEBUGINFO) ] || { ln -s $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO); } |
242 ifeq ($(ZIP_DEBUGINFO_FILES),1) | |
243 $(ZIPEXE) -q -y $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO) | |
244 $(RM) $(LIBJVM_DTRACE_DEBUGINFO) $(LIBJVM_DTRACE_G_DEBUGINFO) | |
245 [ -f $(LIBJVM_DTRACE_G_DIZ) ] || { ln -s $(LIBJVM_DTRACE_DIZ) $(LIBJVM_DTRACE_G_DIZ); } | |
246 endif | |
219 endif | 247 endif |
220 | 248 |
221 $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ | 249 $(DTRACE).d: $(DTRACE_SRCDIR)/hotspot.d $(DTRACE_SRCDIR)/hotspot_jni.d \ |
222 $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d | 250 $(DTRACE_SRCDIR)/hs_private.d $(DTRACE_SRCDIR)/jhelper.d |
223 $(QUIETLY) cat $^ > $@ | 251 $(QUIETLY) cat $^ > $@ |