8005008: Add Java Flight Recorder Phase II

Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Bengt Rutisson <bengt.rutisson@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Erik Gahlin <erik.gahlin@oracle.com>
Co-authored-by: Erik Helin <erik.helin@oracle.com>
Co-authored-by: Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>
Co-authored-by: Keith McGuigan <keith.mcguigan@oracle.com>
Co-authored-by: Mattias Tobiasson <mattias.tobiasson@oracle.com>
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com>
Co-authored-by: Mikael Auno <mikael.auno@oracle.com>
Co-authored-by: Nils Eliasson <nils.eliasson@oracle.com>
Co-authored-by: Nils Loodin <nils.loodin@oracle.com>
Co-authored-by: Rickard Backman <rickard.backman@oracle.com>
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Reviewed-by: erikj
diff --git a/jdk/makefiles/CopyFiles.gmk b/jdk/makefiles/CopyFiles.gmk
index 272fd1f..82d3d4b 100644
--- a/jdk/makefiles/CopyFiles.gmk
+++ b/jdk/makefiles/CopyFiles.gmk
@@ -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
+
+##########################################################################################