8005008: Add Java Flight Recorder Phase II
authorsla
Mon, 10 Jun 2013 11:33:50 +0200
changeset 18030 2d12a524f3cc
parent 17886 22e253008eaf
child 18031 5e467681e781
8005008: Add Java Flight Recorder Phase II Reviewed-by: erikj Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
jdk/make/com/oracle/jfr/Makefile
jdk/makefiles/CompileNativeLibraries.gmk
jdk/makefiles/CopyFiles.gmk
jdk/makefiles/CopyIntoClasses.gmk
jdk/makefiles/CreateJars.gmk
jdk/makefiles/mapfiles/libjfr/mapfile-vers
jdk/makefiles/mapfiles/libjli/mapfile-vers
jdk/src/share/lib/security/java.security-linux
jdk/src/share/lib/security/java.security-macosx
jdk/src/share/lib/security/java.security-solaris
jdk/src/share/lib/security/java.security-windows
--- a/jdk/make/com/oracle/jfr/Makefile	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/make/com/oracle/jfr/Makefile	Mon Jun 10 11:33:50 2013 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -42,6 +42,11 @@
 
 AUTO_FILES_JAVA_DIRS = com/oracle/jrockit/jfr oracle/jrockit/jfr
 
+JFC_XSD = oracle/jrockit/jfr/settings/jfc.xsd
+JFC_XSD_SRC = $(CLOSED_SHARE_SRC)/classes/$(JFC_XSD)
+JFC_XSD_FILE = $(CLASSDESTDIR)/$(JFC_XSD)
+
+
 # Find C source files
 #
 vpath %.c $(CLOSED_SHARE_SRC)/native/oracle/jfr
@@ -59,15 +64,17 @@
 	$(RM) -r $(CLASSDESTDIR)/com/oracle/jrockit/jfr
 	$(RM) -r $(CLASSDESTDIR)/oracle/jrockit/jfr
 
-
-# Copy pre-shipped .jfs files
+# Copy pre-shipped .jfc files
 JFR_LIBDIR = $(LIBDIR)/jfr
-JFR_SRCDIR = $(CLOSED_SHARE_SRC)/lib/jfr
+JFC_SRCDIR = $(CLOSED_SHARE_SRC)/classes/oracle/jrockit/jfr/settings
 
-$(JFR_LIBDIR)/%.jfs: $(JFR_SRCDIR)/%.jfs
+$(JFR_LIBDIR)/%.jfc: $(JFC_SRCDIR)/%.jfc
 	$(install-file)
 
-JFS_FILES := $(subst $(JFR_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFR_SRCDIR)/*.jfs))
+JFC_FILES := $(subst $(JFC_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFC_SRCDIR)/*.jfc))
 
-all build : $(JFS_FILES)
+$(JFC_XSD_FILE) : $(JFC_XSD_SRC)
+	$(install-file)
 
+all build : $(JFC_FILES) $(JFC_XSD_FILE)
+
--- a/jdk/makefiles/CompileNativeLibraries.gmk	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/makefiles/CompileNativeLibraries.gmk	Mon Jun 10 11:33:50 2013 +0200
@@ -2055,7 +2055,7 @@
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
 	BUILD_LIBJLI_FILES += java_md.c \
-			      cmdtoargs.c
+			      cmdtoargs.c	
         # Staticically link with c runtime on windows.
 	LIBJLI_CFLAGS:=$(filter-out -MD,$(LIBJLI_CFLAGS))
 else ifneq ($(OPENJDK_TARGET_OS), macosx)
--- a/jdk/makefiles/CopyFiles.gmk	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/makefiles/CopyFiles.gmk	Mon Jun 10 11:33:50 2013 +0200
@@ -200,7 +200,7 @@
 
 ifdef OPENJDK
     ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
-else 
+else
     ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
 endif
 
@@ -217,29 +217,29 @@
 
 #make sure freetype dll will be available at runtime as well as link time
 #
-#NB: Default freetype build system uses -h linker option and 
-#   result .so contains hardcoded library name that is later 
-#   used for adding dependencies to other objects 
+#NB: Default freetype build system uses -h linker option and
+#   result .so contains hardcoded library name that is later
+#   used for adding dependencies to other objects
 #   (e.g. libfontmanager.so).
-#   
+#
 #   It is not obvious how to extract that hardcoded name (libfreetype.so.6)
 #   without overcomplicating logic here.
 #   To workaround this we hardcode .6 suffix for now.
 #
 #   Note that .so.6 library will not be found by System.loadLibrary()
-#        but fortunately we need to load FreeType library explicitly 
-#        on windows only  
+#        but fortunately we need to load FreeType library explicitly
+#        on windows only
 #
 #TODO: rework this to avoid hardcoding library name in the makefile
 #
 ifdef OPENJDK
     ifeq ($(OPENJDK_TARGET_OS), windows)
         FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
-    else 
+    else
         ifeq ($(USING_SYSTEM_FT_LIB), false)
             FREETYPE_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
         endif
-    endif 
+    endif
 
     $(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
 	$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
@@ -537,3 +537,22 @@
 COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
 
 ##########################################################################################
+
+ifndef OPENJDK
+ifeq ($(ENABLE_JFR), true)
+
+JFR_CONFIGURATION_DIR_SRC := $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings/
+JFR_CONFIGURATION_DIR_DST := $(LIBDIR)/jfr/
+
+JFR_SRC_FILES = $(wildcard $(JFR_CONFIGURATION_DIR_SRC)/*.jfc)
+JFR_TARGET_FILES = $(subst $(JFR_CONFIGURATION_DIR_SRC),$(JFR_CONFIGURATION_DIR_DST),$(JFR_SRC_FILES))
+
+$(JFR_CONFIGURATION_DIR_DST)/%.jfc : $(JFR_CONFIGURATION_DIR_SRC)/%.jfc
+	$(call install-file)
+
+COPY_FILES += $(JFR_TARGET_FILES)
+
+endif
+endif
+
+##########################################################################################
--- a/jdk/makefiles/CopyIntoClasses.gmk	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/makefiles/CopyIntoClasses.gmk	Mon Jun 10 11:33:50 2013 +0200
@@ -42,7 +42,7 @@
   $(JSTAT_RESOURCEDIR)/jstat_options \
   $(JSTAT_RESOURCEDIR)/jstat_unsupported_options
 
-# Extra jhat files 
+# Extra jhat files
 JHAT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/hat/resources
 COPY_FILES += \
   $(JHAT_RESOURCEDIR)/hat.js \
@@ -53,7 +53,7 @@
 JRUNSCRIPT_RESOURCEDIR = $(JDK_TOPDIR)/src/share/classes/com/sun/tools/script/shell
 COPY_FILES += \
   $(JRUNSCRIPT_RESOURCEDIR)/init.js \
-  $(JRUNSCRIPT_RESOURCEDIR)/messages.properties 
+  $(JRUNSCRIPT_RESOURCEDIR)/messages.properties
 
 # Extra jvmstat files
 COPY_FILES += \
@@ -91,6 +91,12 @@
     $(SWING_PLAF_WINDOWS_RESOURCES_DIR_CLOSED)/icons/JavaCup32.png
 endif
 
+ifndef OPENJDK
+  JFR_CONFIGURATION_DIR_CLOSED = $(JDK_TOPDIR)/src/closed/share/classes/oracle/jrockit/jfr/settings
+  COPY_FILES += \
+    $(JFR_CONFIGURATION_DIR_CLOSED)/jfc.xsd
+endif
+
 SWING_PLAF_BASIC_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/basic
 COPY_FILES += \
   $(wildcard $(SWING_PLAF_BASIC_RESOURCES_DIR)/icons/*.png)
@@ -154,7 +160,7 @@
 # Copy the META-INF/services configuration files that are scattered around the source tree
 # into classes/META-INF/services. Be aware that META-INF directories that are located at a
 # source root (.../classes/META-INF) are automatically copied verbatim by the
-# SetupJavaCompilation macro. 
+# SetupJavaCompilation macro.
 #
 # Any other META-INF/services configuration file is found here and platform specific comments
 # are uncommented and the configuration file is stored in the output META-INF directory.
@@ -207,7 +213,7 @@
 # Eval the newly created rules to incorporate them into the make tree.
 define addto_meta-inf_services
 $1
-	echo $(LOG_INFO) Installing META-INF/services/$$(@F) 
+	echo $(LOG_INFO) Installing META-INF/services/$$(@F)
 	$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
 endef
 $(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
--- a/jdk/makefiles/CreateJars.gmk	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/makefiles/CreateJars.gmk	Mon Jun 10 11:33:50 2013 +0200
@@ -426,6 +426,7 @@
 ifeq ($(ENABLE_JFR), true)
     $(eval $(call SetupArchive,BUILD_JFR_JAR,,\
 		SRCS:=$(JDK_OUTPUTDIR)/classes,\
+		SUFFIXES:=.class .jfc .xsd,\
 		INCLUDES:=com/oracle/jrockit/jfr \
 			  oracle/jrockit/jfr,\
 		JAR:=$(IMAGES_OUTPUTDIR)/lib/jfr.jar,\
--- a/jdk/makefiles/mapfiles/libjfr/mapfile-vers	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/makefiles/mapfiles/libjfr/mapfile-vers	Mon Jun 10 11:33:50 2013 +0200
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 # ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 #
 
@@ -17,7 +17,7 @@
       Java_oracle_jrockit_jfr_VMJFR_addConstPool;
       Java_oracle_jrockit_jfr_VMJFR_removeConstPool;
       Java_oracle_jrockit_jfr_VMJFR_storeConstPool;
-      Java_oracle_jrockit_jfr_VMJFR_classID;
+      Java_oracle_jrockit_jfr_VMJFR_classID0;
       Java_oracle_jrockit_jfr_VMJFR_stackTraceID;
       Java_oracle_jrockit_jfr_VMJFR_threadID;
       Java_oracle_jrockit_jfr_VMJFR_rotate;
@@ -33,7 +33,8 @@
       Java_oracle_jrockit_jfr_VMJFR_setPeriod;
       Java_oracle_jrockit_jfr_VMJFR_getPeriod;
       Java_oracle_jrockit_jfr_VMJFR_descriptors;
-            JNI_OnLoad;
+      Java_oracle_jrockit_jfr_VMJFR_redefineClass0;
+      JNI_OnLoad;
   local:
       *;
 };
--- a/jdk/makefiles/mapfiles/libjli/mapfile-vers	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/makefiles/mapfiles/libjli/mapfile-vers	Mon Jun 10 11:33:50 2013 +0200
@@ -36,6 +36,7 @@
 		JLI_ReportExceptionDescription;
 		JLI_GetStdArgs;
 		JLI_GetStdArgc;
+		
 	local:
 		*;
 };
--- a/jdk/src/share/lib/security/java.security-linux	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/src/share/lib/security/java.security-linux	Mon Jun 10 11:33:50 2013 +0200
@@ -202,6 +202,7 @@
                com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
+	       oracle.jrockit.jfr.,\
                jdk.internal.,\
                jdk.nashorn.internal.,\
                jdk.nashorn.tools.
@@ -243,6 +244,7 @@
                    com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
+		   oracle.jrockit.jfr.,\
                    jdk.internal.,\
                    jdk.nashorn.internal.,\
                    jdk.nashorn.tools.
--- a/jdk/src/share/lib/security/java.security-macosx	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/src/share/lib/security/java.security-macosx	Mon Jun 10 11:33:50 2013 +0200
@@ -206,7 +206,8 @@
                jdk.internal.,\
                jdk.nashorn.internal.,\
                jdk.nashorn.tools.,\
-               apple.
+               apple.,\
+               oracle.jrockit.jfr.
 
 #
 # List of comma-separated packages that start with or equal this string
@@ -247,7 +248,8 @@
                    jdk.internal.,\
                    jdk.nashorn.internal.,\
                    jdk.nashorn.tools.,\
-                   apple.
+                   apple.,\
+                   oracle.jrockit.jfr.
 
 #
 # Determines whether this properties file can be appended to
--- a/jdk/src/share/lib/security/java.security-solaris	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/src/share/lib/security/java.security-solaris	Mon Jun 10 11:33:50 2013 +0200
@@ -204,6 +204,7 @@
                com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
+	       oracle.jrockit.jfr.,\
                jdk.internal.,\
                jdk.nashorn.internal.,\
                jdk.nashorn.tools.
@@ -244,6 +245,7 @@
                    com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
+		   oracle.jrockit.jfr.,\
                    jdk.internal.,\
                    jdk.nashorn.internal.,\
                    jdk.nashorn.tools.
--- a/jdk/src/share/lib/security/java.security-windows	Thu Jun 06 09:55:00 2013 -0700
+++ b/jdk/src/share/lib/security/java.security-windows	Mon Jun 10 11:33:50 2013 +0200
@@ -203,6 +203,7 @@
                com.sun.org.glassfish.,\
                com.oracle.xmlns.internal.,\
                com.oracle.webservices.internal.,\
+	       oracle.jrockit.jfr.,\
                jdk.internal.,\
                jdk.nashorn.internal.,\
                jdk.nashorn.tools.,\
@@ -244,6 +245,7 @@
                    com.sun.org.glassfish.,\
                    com.oracle.xmlns.internal.,\
                    com.oracle.webservices.internal.,\
+		   oracle.jrockit.jfr.,\
                    jdk.internal.,\
                    jdk.nashorn.internal.,\
                    jdk.nashorn.tools.,\