annotate make/solaris/makefiles/trace.make @ 4403:bb74dc5ddf07

8005849: JEP 167: Event-Based JVM Tracing Reviewed-by: acorn, coleenp 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>
author sla
date Tue, 15 Jan 2013 09:07:30 +0100
parents
children
rev   line source
sla@4403 1 #
sla@4403 2 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
sla@4403 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
sla@4403 4 #
sla@4403 5 # This code is free software; you can redistribute it and/or modify it
sla@4403 6 # under the terms of the GNU General Public License version 2 only, as
sla@4403 7 # published by the Free Software Foundation.
sla@4403 8 #
sla@4403 9 # This code is distributed in the hope that it will be useful, but WITHOUT
sla@4403 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
sla@4403 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
sla@4403 12 # version 2 for more details (a copy is included in the LICENSE file that
sla@4403 13 # accompanied this code).
sla@4403 14 #
sla@4403 15 # You should have received a copy of the GNU General Public License version
sla@4403 16 # 2 along with this work; if not, write to the Free Software Foundation,
sla@4403 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
sla@4403 18 #
sla@4403 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
sla@4403 20 # or visit www.oracle.com if you need additional information or have any
sla@4403 21 # questions.
sla@4403 22 #
sla@4403 23 #
sla@4403 24
sla@4403 25 # This makefile (trace.make) is included from the trace.make in the
sla@4403 26 # build directories.
sla@4403 27 #
sla@4403 28 # It knows how to build and run the tools to generate trace files.
sla@4403 29
sla@4403 30 include $(GAMMADIR)/make/solaris/makefiles/rules.make
sla@4403 31 include $(GAMMADIR)/make/altsrc.make
sla@4403 32
sla@4403 33 # #########################################################################
sla@4403 34
sla@4403 35 HAS_ALT_SRC:=$(shell if [ -d $(HS_ALT_SRC)/share/vm/trace ]; then \
sla@4403 36 echo "true"; else echo "false";\
sla@4403 37 fi)
sla@4403 38
sla@4403 39 TOPDIR = $(shell echo `pwd`)
sla@4403 40 GENERATED = $(TOPDIR)/../generated
sla@4403 41 JvmtiOutDir = $(GENERATED)/jvmtifiles
sla@4403 42 TraceOutDir = $(GENERATED)/tracefiles
sla@4403 43
sla@4403 44 TraceAltSrcDir = $(HS_ALT_SRC)/share/vm/trace
sla@4403 45 TraceSrcDir = $(HS_COMMON_SRC)/share/vm/trace
sla@4403 46
sla@4403 47 # set VPATH so make knows where to look for source files
sla@4403 48 Src_Dirs_V += $(TraceSrcDir) $(TraceAltSrcDir)
sla@4403 49 VPATH += $(Src_Dirs_V:%=%:)
sla@4403 50
sla@4403 51 TraceGeneratedNames = \
sla@4403 52 traceEventClasses.hpp \
sla@4403 53 traceEventIds.hpp \
sla@4403 54 traceTypes.hpp
sla@4403 55
sla@4403 56 ifeq ($(HAS_ALT_SRC), true)
sla@4403 57 TraceGeneratedNames += \
sla@4403 58 traceRequestables.hpp \
sla@4403 59 traceEventControl.hpp
sla@4403 60
sla@4403 61 ifeq ($(INCLUDE_TRACE), 1)
sla@4403 62 TraceGeneratedNames += traceProducer.cpp
sla@4403 63 endif
sla@4403 64
sla@4403 65 endif
sla@4403 66
sla@4403 67 TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
sla@4403 68
sla@4403 69 XSLT = $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
sla@4403 70
sla@4403 71 XML_DEPS = $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracetypes.xml \
sla@4403 72 $(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod
sla@4403 73 ifeq ($(HAS_ALT_SRC), true)
sla@4403 74 XML_DEPS += $(TraceAltSrcDir)/traceevents.xml
sla@4403 75 endif
sla@4403 76
sla@4403 77 .PHONY: all clean cleanall
sla@4403 78
sla@4403 79 # #########################################################################
sla@4403 80
sla@4403 81 all: $(TraceGeneratedFiles)
sla@4403 82
sla@4403 83 GENERATE_CODE= \
sla@4403 84 $(QUIETLY) echo Generating $@; \
sla@4403 85 $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
sla@4403 86 test -f $@
sla@4403 87
sla@4403 88 $(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventIds.xsl $(XML_DEPS)
sla@4403 89 $(GENERATE_CODE)
sla@4403 90
sla@4403 91 $(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS)
sla@4403 92 $(GENERATE_CODE)
sla@4403 93
sla@4403 94 ifeq ($(HAS_ALT_SRC), false)
sla@4403 95
sla@4403 96 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
sla@4403 97 $(GENERATE_CODE)
sla@4403 98
sla@4403 99 else
sla@4403 100
sla@4403 101 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
sla@4403 102 $(GENERATE_CODE)
sla@4403 103
sla@4403 104 $(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
sla@4403 105 $(GENERATE_CODE)
sla@4403 106
sla@4403 107 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
sla@4403 108 $(GENERATE_CODE)
sla@4403 109
sla@4403 110 $(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS)
sla@4403 111 $(GENERATE_CODE)
sla@4403 112
sla@4403 113 endif
sla@4403 114
sla@4403 115 # #########################################################################
sla@4403 116
sla@4403 117 clean cleanall:
sla@4403 118 rm $(TraceGeneratedFiles)
sla@4403 119
sla@4403 120