make/Images.gmk
changeset 29305 4ddc6faf7842
parent 29303 7941167cec3f
child 29444 b6186ae3a799
--- a/make/Images.gmk	Mon Mar 09 10:39:16 2015 +0100
+++ b/make/Images.gmk	Tue Mar 10 14:36:56 2015 +0100
@@ -488,6 +488,42 @@
 JDK_TARGETS += $(COPY_JRTFS_JAR)
 
 ################################################################################
+# Code coverage data files
+
+ifeq ($(GCOV_ENABLED), true)
+
+  GCOV_FIND_EXPR := -type f -name "*.gcno"
+
+  ifeq ($(JVM_VARIANT_CLIENT), true)
+    $(eval $(call SetupCopyFiles,COPY_HOTSPOT_CLIENT_GCOV_GCNO, \
+        SRC := $(HOTSPOT_OUTPUTDIR), \
+        DEST := $(SYMBOLS_IMAGE_DIR)/gcov/hotspot/client, \
+        FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR)/*compiler1/ $(GCOV_FIND_EXPR)), \
+        FLATTEN := true))
+
+    SYMBOLS_TARGETS += $(COPY_HOTSPOT_CLIENT_GCOV_GCNO)
+  endif
+
+  ifeq ($(JVM_VARIANT_SERVER), true)
+    $(eval $(call SetupCopyFiles,COPY_HOTSPOT_SERVER_GCOV_GCNO, \
+        SRC := $(HOTSPOT_OUTPUTDIR), \
+        DEST := $(SYMBOLS_IMAGE_DIR)/gcov/hotspot/server, \
+        FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR)/*compiler2/ $(GCOV_FIND_EXPR)), \
+        FLATTEN := true))
+
+    SYMBOLS_TARGETS += $(COPY_HOTSPOT_SERVER_GCOV_GCNO)
+  endif
+
+  $(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \
+      SRC := $(SUPPORT_OUTPUTDIR)/native, \
+      DEST := $(SYMBOLS_IMAGE_DIR)/gcov/jdk, \
+      FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR))))
+
+  SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO)
+
+endif
+
+################################################################################
 
 # Include custom post hook here to make it possible to augment the target lists
 # before actual target prerequisites are declared.
@@ -498,7 +534,8 @@
 $(JRE_TARGETS): $(TOOL_JRE_TARGETS)
 $(JDK_TARGETS): $(TOOL_JDK_TARGETS)
 
-jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS)
+jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \
+    $(SYMBOLS_TARGETS)
 
 
 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)