diff make/common/Release.gmk @ 4969:718bca4e685f

7132386: makefile support for tracing/Java Flight Recorder framework phase I Reviewed-by: ohair, dholmes, rottenha Contributed-by: Markus Gronlund <markus.gronlund@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>
author rbackman
date Tue, 17 Jan 2012 16:20:52 +0100
parents 38a318502e19
children 350971f50949
line wrap: on
line diff
--- a/make/common/Release.gmk	Tue Jan 24 09:09:08 2012 +0000
+++ b/make/common/Release.gmk	Tue Jan 17 16:20:52 2012 +0100
@@ -381,6 +381,22 @@
 	sun/tools/jinfo         \
 	sun/tools/jmap
 
+# classes that go into jfr.jar
+JFR_CLASSES_DIRS= \
+	com/oracle/jrockit/jfr \
+	com/oracle/jrockit/jfr/client \
+	com/oracle/jrockit/jfr/management \
+	oracle/jrockit/jfr \
+	oracle/jrockit/jfr/events \
+	oracle/jrockit/jfr/openmbean \
+	oracle/jrockit/jfr/parser \
+	oracle/jrockit/jfr/settings \
+	oracle/jrockit/jfr/tools \
+	oracle/jrockit/jfr/util \
+	oracle/jrockit/jfr/util/log \
+	oracle/jrockit/jfr/util/os \
+	oracle/jrockit/jfr/util/text
+
 # classes that go into jsse.jar
 JSSE_CLASSES_DIRS = \
 	sun/security/provider/Sun.class \
@@ -583,6 +599,23 @@
 	$(ECHO) "sun/tools/jstack/" >> $@
 	$(ECHO) "sun/tools/jinfo/" >> $@
 	$(ECHO) "sun/tools/jmap/" >> $@
+ifndef OPENJDK
+ifndef JAVASE_EMBEDDED
+	$(ECHO) "com/oracle/jrockit/jfr/" >> $@
+	$(ECHO) "com/oracle/jrockit/jfr/client/" >> $@
+	$(ECHO) "com/oracle/jrockit/jfr/management/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/events/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/openmbean/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/parser/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/settings/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/tools/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/util/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/util/log/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/util/os/" >> $@
+	$(ECHO) "oracle/jrockit/jfr/util/text/" >> $@
+endif
+endif
 
 
 # File order list for rt.jar
@@ -607,6 +640,20 @@
 	$(MV) $@.temp $@
 	@($(CD) $(CLASSBINDIR) && $(java-vm-cleanup))
 
+# Create the jfr.jar containing Java Flight Recorder implementation
+JFR_JAR=
+ifndef OPENJDK
+ifndef JAVASE_EMBEDDED
+JFR_JAR=$(ABS_TEMPDIR)/jfr-orig.jar
+$(JFR_JAR): $(OTHER_JAR_MANIFEST_FILE)
+	$(prep-target)
+	$(CD) $(CLASSBINDIR) && \
+	    $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(OTHER_JAR_MANIFEST_FILE) $@ \
+		$(JFR_CLASSES_DIRS) $(BOOT_JAR_JFLAGS)
+	@$(CD) $(CLASSBINDIR) && $(java-vm-cleanup)
+endif
+endif
+
 # Create the rt.jar file list & non-class files list
 
 JARSPLIT_JARFILE = $(BUILDTOOLJARDIR)/jarsplit.jar
@@ -741,7 +788,7 @@
 # drive names like C:
 initial-image-jre:: initial-image-jre-setup \
 		    $(JRE_DOCFILES) \
-		    $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) \
+		    $(RT_JAR) $(RESOURCES_JAR) $(JSSE_JAR) $(JFR_JAR) \
 		    $(BUILDMETAINDEX_JARFILE)
 	@# Copy in bin directory
 	$(CD) $(OUTPUTDIR) && $(FIND) bin -depth | $(CPIO) -pdum $(JRE_IMAGE_DIR)
@@ -769,6 +816,9 @@
 	$(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar
 	$(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar
 	$(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar
+ifneq ($(JFR_JAR),)
+	$(CP) $(JFR_JAR) $(JRE_IMAGE_DIR)/lib/jfr.jar
+endif
 	@# Generate meta-index to make boot and extension class loaders lazier
 	$(CD) $(JRE_IMAGE_DIR)/lib && \
 	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \