hotspot/make/gensrc/GensrcJvmti.gmk
author hseigel
Wed, 01 Mar 2017 08:00:02 -0500
changeset 46194 5596e6f63072
parent 42145 11d01e02d9c1
permissions -rw-r--r--
8172307: Remove ununsed JVM API JVM_GetModuleByPackageName() Summary: Remove get_module_by_package_name() etc., and unneeded test. Reviewed-by: sspitsyn, gtriantafill
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     1
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     2
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     4
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    10
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    15
# accompanied this code).
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    16
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    20
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    23
# questions.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    24
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    25
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    26
$(eval $(call IncludeCustomExtension, hotspot, gensrc/GensrcJvmti.gmk))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    27
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    28
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    29
# Build tools needed for the JVMTI source code generation
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    30
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    31
JVMTI_TOOLS_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/prims
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    32
JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    33
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    34
$(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    35
    JAVAC := $(JAVAC), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    36
    FLAGS := $(DISABLE_WARNINGS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    37
    SERVER_DIR := $(SJAVAC_SERVER_DIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    38
    SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    39
    DISABLE_SJAVAC := true, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    40
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    41
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    42
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    43
    SETUP := GENERATE_OLDBYTECODE, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    44
    SRC := $(JVMTI_TOOLS_SRCDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    45
    INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    46
    BIN := $(JVMTI_TOOLS_OUTPUTDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    47
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    48
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    49
TOOL_JVMTI_GEN := $(JAVA_SMALL) -cp $(JVMTI_TOOLS_OUTPUTDIR) jvmtiGen
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    50
TOOL_JVMTI_ENV_FILL := $(JAVA_SMALL) -cp $(JVMTI_TOOLS_OUTPUTDIR) jvmtiEnvFill
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    51
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    52
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    53
# Setup make rules for an xml transform for jvmti/trace file generation.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    54
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    55
# Parameter 1 is the name of the rule. This name is used as variable prefix,
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    56
# and the targets generated are listed in a variable by that name. This name is
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    57
# also used as the name of the output file.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    58
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    59
# Remaining parameters are named arguments. These include:
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    60
#   XML_FILE -- The input source file to use
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    61
#   XSL_FILE -- The xsl file to use
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    62
#   OUTPUT_DIR -- The directory to put the generated file in
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    63
#   ARGS -- Additional arguments to the jvmtiGen tool
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    64
#   DEPS -- Additional dependencies
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    65
SetupXslTransform = $(NamedParamsMacroTemplate)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    66
define SetupXslTransformBody
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    67
  $$($1_OUTPUT_DIR)/$1: $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    68
	$$(call LogInfo, Generating $$(@F))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    69
	$$(call MakeDir, $$(@D))
41301
051b61964170 8166202: Tracefile gensrc cannot handle closed src dir in different location
erikj
parents: 38097
diff changeset
    70
	$$(call ExecuteWithLog, $$@, $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
051b61964170 8166202: Tracefile gensrc cannot handle closed src dir in different location
erikj
parents: 38097
diff changeset
    71
	    -XSL $$($1_XSL_FILE) -OUT $$@ $$($1_ARGS))
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    72
        # jvmtiGen does not return error code properly on fail.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    73
        # NOTE: We should really fix jvmtiGen.java instead.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    74
	test -f $$@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    75
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    76
  TARGETS += $$($1_OUTPUT_DIR)/$1
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    77
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    78
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    79
################################################################################
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    80
# Create JVMTI files in gensrc/jvmtifiles
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    81
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    82
JVMTI_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/prims
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    83
JVMTI_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    84
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    85
# Setup rule for generating a jvmti file
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    86
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    87
# $1 is generated source file name in $(JVMTI_OUTPUTDIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    88
# $2 is XSL file to use in $(JVMTI_SRCDIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    89
# $3 is optional extra arguments to jvmtiGen
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    90
define SetupJvmtiGeneration
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    91
  $$(eval $$(call SetupXslTransform, $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    92
      XML_FILE := $$(JVMTI_SRCDIR)/jvmti.xml, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    93
      XSL_FILE := $$(JVMTI_SRCDIR)/$(strip $2), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    94
      OUTPUT_DIR := $$(JVMTI_OUTPUTDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    95
      ARGS := $3, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    96
      DEPS := $$(JVMTI_SRCDIR)/jvmtiLib.xsl, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    97
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    98
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
    99
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   100
$(eval $(call SetupJvmtiGeneration, jvmtiEnter.cpp, jvmtiEnter.xsl, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   101
    -PARAM interface jvmti))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   102
$(eval $(call SetupJvmtiGeneration, jvmtiEnterTrace.cpp, jvmtiEnter.xsl, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   103
    -PARAM interface jvmti -PARAM trace Trace))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   104
$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   105
$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   106
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   107
$(eval $(call SetupJvmtiGeneration, jvmtiEnvStub.cpp, jvmtiEnv.xsl))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   108
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   109
JVMTI_BC_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/interpreter
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   110
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   111
$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   112
    XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   113
    XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   114
    OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   115
    DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   116
))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   117
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   118
# We need $(JVMTI_OUTPUTDIR)/jvmtiEnvStub.cpp (generated above) as input
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   119
$(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp: $(JVMTI_SRCDIR)/jvmtiEnv.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   120
    $(JVMTI_OUTPUTDIR)/jvmtiEnvStub.cpp $(BUILD_JVMTI_TOOLS)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   121
	$(call LogInfo, Generating $(@F))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   122
	$(call MakeDir, $(@D))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   123
	$(call ExecuteWithLog, $@, $(TOOL_JVMTI_ENV_FILL) $(JVMTI_SRCDIR)/jvmtiEnv.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   124
	    $(JVMTI_OUTPUTDIR)/jvmtiEnvStub.cpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   125
	    $(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   126
        # jvmtiEnvFill does not necessarily return an error code on failure.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   127
        # NOTE: We should really fix jvmtiEnvFill.java instead.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   128
	test -f $@
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   129
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   130
TARGETS += $(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   131
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   132
################################################################################
41277
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 38097
diff changeset
   133
# Copy jvmti.h to include dir
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 38097
diff changeset
   134
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 38097
diff changeset
   135
# The file is the same regardless of jvm variant. Only let one do the copy.
41746
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   136
ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   137
  $(eval $(call SetupCopyFiles, COPY_JVMTI_H, \
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   138
      DEST := $(SUPPORT_OUTPUTDIR)/modules_include/java.base, \
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   139
      FILES := $(JVMTI_OUTPUTDIR)/jvmti.h, \
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   140
  ))
41277
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 38097
diff changeset
   141
41746
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   142
  TARGETS += $(COPY_JVMTI_H)
621dfac78ca1 8063154: Checked in jvmti.h not in sync with generated jvmti.h
erikj
parents: 41344
diff changeset
   143
endif
41277
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 38097
diff changeset
   144
65200988b2ee 8150736: Excessive disk space used by build system
erikj
parents: 38097
diff changeset
   145
################################################################################
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   146
# Create trace files in gensrc/tracefiles
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   147
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   148
TRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   149
TRACE_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/trace
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   150
41301
051b61964170 8166202: Tracefile gensrc cannot handle closed src dir in different location
erikj
parents: 38097
diff changeset
   151
# Append list of XSL files to search (might have been set by custom extensions)
051b61964170 8166202: Tracefile gensrc cannot handle closed src dir in different location
erikj
parents: 38097
diff changeset
   152
TRACE_XSL_FILES += $(wildcard $(TRACE_SRCDIR)/*.xsl)
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   153
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   154
TRACE_XML ?= $(TRACE_SRCDIR)/trace.xml
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   155
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   156
# Changing these will trigger a rebuild of generated trace files.
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   157
TRACE_DEPS += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   158
    $(TRACE_XML) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   159
    $(TRACE_SRCDIR)/tracetypes.xml \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   160
    $(TRACE_SRCDIR)/tracerelationdecls.xml \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   161
    $(TRACE_SRCDIR)/traceevents.xml \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   162
    $(TRACE_SRCDIR)/trace.dtd \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   163
    $(TRACE_SRCDIR)/xinclude.mod \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   164
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   165
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   166
# Setup rule for generating a trace file
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   167
#
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   168
# $1 is generated source file name in $(TRACE_OUTPUTDIR)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   169
define SetupTraceGeneration
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   170
  $$(eval $$(call SetupXslTransform, $1, \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   171
      XML_FILE := $$(TRACE_XML), \
41301
051b61964170 8166202: Tracefile gensrc cannot handle closed src dir in different location
erikj
parents: 38097
diff changeset
   172
      XSL_FILE := $$(firstword $$(filter %/$$(basename $1).xsl, $$(TRACE_XSL_FILES))), \
37437
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   173
      OUTPUT_DIR := $$(TRACE_OUTPUTDIR), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   174
      DEPS := $$(TRACE_DEPS), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   175
  ))
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   176
endef
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   177
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   178
# Append files to generated (might have been set by custom extensions)
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   179
TRACE_GENSRC_FILES += \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   180
    traceEventClasses.hpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   181
    traceEventIds.hpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   182
    traceTypes.hpp \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   183
    #
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   184
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   185
# Call SetupTraceGeneration for all trace gensrc files
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   186
$(foreach tracefile, $(TRACE_GENSRC_FILES), \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   187
  $(eval $(call SetupTraceGeneration, $(tracefile))) \
f824aabc7af8 8152666: The new Hotspot Build System
erikj
parents:
diff changeset
   188
)