< prev index next >

make/linux/makefiles/trace.make

Print this page
rev 8910 : full patch for jfr
   1 #
   2 # Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #


  34 
  35 HAS_ALT_SRC:=$(shell if [ -d $(HS_ALT_SRC)/share/vm/trace ]; then \
  36   echo "true"; else echo "false";\
  37   fi)
  38 
  39 TOPDIR      = $(shell echo `pwd`)
  40 GENERATED   = $(TOPDIR)/../generated
  41 JvmtiOutDir = $(GENERATED)/jvmtifiles
  42 TraceOutDir   = $(GENERATED)/tracefiles
  43 
  44 TraceAltSrcDir = $(HS_ALT_SRC)/share/vm/trace
  45 TraceSrcDir = $(HS_COMMON_SRC)/share/vm/trace
  46 
  47 # set VPATH so make knows where to look for source files
  48 Src_Dirs_V += $(TraceSrcDir) $(TraceAltSrcDir)
  49 VPATH += $(Src_Dirs_V:%=%:)
  50 
  51 TraceGeneratedNames =     \
  52     traceEventClasses.hpp \
  53         traceEventIds.hpp     \
  54         traceTypes.hpp


  55 
  56 ifeq ($(HAS_ALT_SRC), true)
  57 TraceGeneratedNames +=  \
  58         traceRequestables.hpp \
  59     traceEventControl.hpp
  60 
  61 ifneq ($(INCLUDE_TRACE), false)
  62 TraceGeneratedNames += traceProducer.cpp
  63 endif
  64 
  65 endif
  66 
  67 TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
  68 
  69 XSLT = $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
  70 
  71 XML_DEPS =  $(TraceSrcDir)/trace.xml  $(TraceSrcDir)/tracetypes.xml \


  72         $(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod
  73 ifeq ($(HAS_ALT_SRC), true)
  74         XML_DEPS += $(TraceAltSrcDir)/traceevents.xml
  75 endif
  76 
  77 .PHONY: all clean cleanall
  78 
  79 # #########################################################################
  80 
  81 all: $(TraceGeneratedFiles)
  82 
  83 GENERATE_CODE= \
  84   $(QUIETLY) echo Generating $@; \
  85   $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
  86   test -f $@
  87 
  88 $(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventIds.xsl $(XML_DEPS)
  89         $(GENERATE_CODE)
  90 
  91 $(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS)
  92         $(GENERATE_CODE)
  93 
  94 ifeq ($(HAS_ALT_SRC), false)
  95 
  96 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
  97         $(GENERATE_CODE)
  98 






  99 else
 100 
 101 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 102         $(GENERATE_CODE)
 103 
 104 $(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
 105         $(GENERATE_CODE)
 106 
 107 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 108         $(GENERATE_CODE)
 109 
 110 $(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS)
 111         $(GENERATE_CODE)
 112 
 113 endif
 114 
 115 # #########################################################################
 116 
 117 clean cleanall:
 118         rm $(TraceGeneratedFiles)
   1 #
   2 # Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.
   8 #
   9 # This code is distributed in the hope that it will be useful, but WITHOUT
  10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 # version 2 for more details (a copy is included in the LICENSE file that
  13 # accompanied this code).
  14 #
  15 # You should have received a copy of the GNU General Public License version
  16 # 2 along with this work; if not, write to the Free Software Foundation,
  17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18 #
  19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20 # or visit www.oracle.com if you need additional information or have any
  21 # questions.
  22 #


  34 
  35 HAS_ALT_SRC:=$(shell if [ -d $(HS_ALT_SRC)/share/vm/trace ]; then \
  36   echo "true"; else echo "false";\
  37   fi)
  38 
  39 TOPDIR      = $(shell echo `pwd`)
  40 GENERATED   = $(TOPDIR)/../generated
  41 JvmtiOutDir = $(GENERATED)/jvmtifiles
  42 TraceOutDir   = $(GENERATED)/tracefiles
  43 
  44 TraceAltSrcDir = $(HS_ALT_SRC)/share/vm/trace
  45 TraceSrcDir = $(HS_COMMON_SRC)/share/vm/trace
  46 
  47 # set VPATH so make knows where to look for source files
  48 Src_Dirs_V += $(TraceSrcDir) $(TraceAltSrcDir)
  49 VPATH += $(Src_Dirs_V:%=%:)
  50 
  51 TraceGeneratedNames =     \
  52     traceEventClasses.hpp \
  53     traceEventIds.hpp     \
  54     traceTypes.hpp        \
  55     traceEventControl.hpp \
  56     tracePeriodic.hpp
  57 
  58 ifeq ($(HAS_ALT_SRC), true)
  59 TraceGeneratedNames +=  \
  60         traceRequestables.hpp \
  61     traceEventControl.hpp
  62 
  63 ifneq ($(INCLUDE_TRACE), false)
  64 TraceGeneratedNames += traceProducer.cpp
  65 endif
  66 
  67 endif
  68 
  69 TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
  70 
  71 XSLT = $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
  72 
  73 XML_DEPS =  $(TraceSrcDir)/trace.xml  $(TraceSrcDir)/tracetypes.xml \
  74         $(TraceSrcDir)/tracerelationdecls.xml \
  75         $(TraceSrcDir)/traceevents.xml \
  76         $(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod
  77 ifeq ($(HAS_ALT_SRC), true)
  78         XML_DEPS += $(TraceAltSrcDir)/traceevents.xml
  79 endif
  80 
  81 .PHONY: all clean cleanall
  82 
  83 # #########################################################################
  84 
  85 all: $(TraceGeneratedFiles)
  86 
  87 GENERATE_CODE= \
  88   $(QUIETLY) echo Generating $@; \
  89   $(XSLT) -IN $(word 1,$^) -XSL $(word 2,$^) -OUT $@; \
  90   test -f $@
  91 
  92 $(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventIds.xsl $(XML_DEPS)
  93         $(GENERATE_CODE)
  94 
  95 $(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS)
  96         $(GENERATE_CODE)
  97 
  98 ifeq ($(HAS_ALT_SRC), false)
  99 
 100 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 101         $(GENERATE_CODE)
 102 
 103 $(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventControl.xsl $(XML_DEPS)
 104         $(GENERATE_CODE)
 105 
 106 $(TraceOutDir)/tracePeriodic.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracePeriodic.xsl $(XML_DEPS)
 107         $(GENERATE_CODE)
 108 
 109 else
 110 
 111 $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
 112         $(GENERATE_CODE)
 113 
 114 $(TraceOutDir)/traceProducer.cpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceProducer.xsl $(XML_DEPS)
 115         $(GENERATE_CODE)
 116 
 117 $(TraceOutDir)/traceRequestables.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceRequestables.xsl $(XML_DEPS)
 118         $(GENERATE_CODE)
 119 
 120 $(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventControl.xsl $(XML_DEPS)
 121         $(GENERATE_CODE)
 122 
 123 endif
 124 
 125 # #########################################################################
 126 
 127 clean cleanall:
 128         rm $(TraceGeneratedFiles)
< prev index next >