7132386: makefile support for tracing/Java Flight Recorder framework phase I
Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com> Co-authored-by: Erik Gahlin <erik.gahlin@oracle.com> Co-authored-by: Nils Loodin <nils.loodin@oracle.com> Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com> Reviewed-by: ohair, dholmes, rottenha
This commit is contained in:
parent
a2cb0c3029
commit
4953b8bfa5
@ -38,8 +38,14 @@ ifndef OPENJDK
|
||||
endif
|
||||
endif
|
||||
|
||||
JFR =
|
||||
ifndef OPENJDK
|
||||
ifndef JAVASE_EMBEDDED
|
||||
JFR = jfr
|
||||
endif
|
||||
endif
|
||||
|
||||
SUBDIRS = net nio util $(UCRYPTO)
|
||||
SUBDIRS = $(JFR) net nio util $(UCRYPTO)
|
||||
|
||||
include $(BUILDDIR)/common/Subdirs.gmk
|
||||
|
||||
|
73
jdk/make/com/oracle/jfr/Makefile
Normal file
73
jdk/make/com/oracle/jfr/Makefile
Normal file
@ -0,0 +1,73 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
BUILDDIR = ../../..
|
||||
PACKAGE = oracle.jrockit.jfr
|
||||
LIBRARY = jfr
|
||||
PRODUCT = oracle
|
||||
include $(BUILDDIR)/common/Defs.gmk
|
||||
|
||||
#
|
||||
# Use mapfile
|
||||
#
|
||||
FILES_m = $(CLOSED_SHARE_SRC)/native/oracle/jfr/mapfile-vers
|
||||
include $(BUILDDIR)/common/Mapfile-vers.gmk
|
||||
|
||||
#
|
||||
# Files to compile
|
||||
#
|
||||
FILES_c = VMJFR.c
|
||||
|
||||
AUTO_FILES_JAVA_DIRS = com/oracle/jrockit/jfr oracle/jrockit/jfr
|
||||
|
||||
# Find C source files
|
||||
#
|
||||
vpath %.c $(CLOSED_SHARE_SRC)/native/oracle/jfr
|
||||
|
||||
#
|
||||
# Library to compile.
|
||||
#
|
||||
include $(BUILDDIR)/common/Library.gmk
|
||||
|
||||
JVMLIB =
|
||||
JAVALIB =
|
||||
OTHER_LDLIBS =
|
||||
|
||||
clean clobber::
|
||||
$(RM) -r $(CLASSDESTDIR)/com/oracle/jrockit/jfr
|
||||
$(RM) -r $(CLASSDESTDIR)/oracle/jrockit/jfr
|
||||
|
||||
|
||||
# Copy pre-shipped .jfs files
|
||||
JFR_LIBDIR = $(LIBDIR)/jfr
|
||||
JFR_SRCDIR = $(CLOSED_SHARE_SRC)/lib/jfr
|
||||
|
||||
$(JFR_LIBDIR)/%.jfs: $(JFR_SRCDIR)/%.jfs
|
||||
$(install-file)
|
||||
|
||||
JFS_FILES := $(subst $(JFR_SRCDIR),$(JFR_LIBDIR),$(wildcard $(JFR_SRCDIR)/*.jfs))
|
||||
|
||||
all build : $(JFS_FILES)
|
||||
|
@ -425,7 +425,12 @@ vpath %.$(OBJECT_SUFFIX) $(OBJDIR)
|
||||
# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific
|
||||
# relatives.
|
||||
#
|
||||
VPATH.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export
|
||||
VPATH0.h = $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export
|
||||
ifdef OPENJDK
|
||||
VPATH.h = $(VPATH0.h)
|
||||
else
|
||||
VPATH.h = $(CLOSED_SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(VPATH0.h)
|
||||
endif
|
||||
vpath %.h $(VPATH.h)
|
||||
|
||||
#
|
||||
|
@ -381,6 +381,22 @@ TOOLS = \
|
||||
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 @@ $(NOT_RT_JAR_LIST): FRC
|
||||
$(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 @@ $(TOTAL_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_RT_JAR_LIST)
|
||||
$(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 @@ initial-image-jre-sol64:: initial-image-jre-setup
|
||||
# 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 @@ initial-image-jre:: initial-image-jre-setup \
|
||||
$(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) \
|
||||
|
Loading…
Reference in New Issue
Block a user