提交 174fa73f 编写于 作者: 卓昂 提交者: 云矅

Summary: Disable JFR support in windows/mac build

Test Plan: existing test cases

Reviewed-by: shiyue, kuaiwei

Issue: https://github.com/alibaba/dragonwell8/issues/52
上级 7be3d281
...@@ -102,6 +102,8 @@ endif ...@@ -102,6 +102,8 @@ endif
ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS) ALWAYS_EXCLUDE_DIRS = $(SCM_DIRS)
ALWAYS_EXCLUDE_DIRS += -o -name jfr
ifeq ($(VARIANT),tiered) ifeq ($(VARIANT),tiered)
TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent TOPLEVEL_EXCLUDE_DIRS = $(ALWAYS_EXCLUDE_DIRS) -o -name adlc -o -name agent
else else
......
...@@ -51,7 +51,9 @@ VPATH += $(Src_Dirs_V:%=%:) ...@@ -51,7 +51,9 @@ VPATH += $(Src_Dirs_V:%=%:)
TraceGeneratedNames = \ TraceGeneratedNames = \
traceEventClasses.hpp \ traceEventClasses.hpp \
traceEventIds.hpp \ traceEventIds.hpp \
traceTypes.hpp traceTypes.hpp \
traceEventControl.hpp \
tracePeriodic.hpp
ifeq ($(HAS_ALT_SRC), true) ifeq ($(HAS_ALT_SRC), true)
TraceGeneratedNames += \ TraceGeneratedNames += \
...@@ -92,6 +94,12 @@ $(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceE ...@@ -92,6 +94,12 @@ $(TraceOutDir)/traceEventIds.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceE
$(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS) $(TraceOutDir)/traceTypes.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceTypes.xsl $(XML_DEPS)
$(GENERATE_CODE) $(GENERATE_CODE)
$(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventControl.xsl $(XML_DEPS)
$(GENERATE_CODE)
$(TraceOutDir)/tracePeriodic.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracePeriodic.xsl $(XML_DEPS)
$(GENERATE_CODE)
ifeq ($(HAS_ALT_SRC), false) ifeq ($(HAS_ALT_SRC), false)
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS) $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
......
...@@ -38,6 +38,8 @@ default: build ...@@ -38,6 +38,8 @@ default: build
GENERATED = ../generated GENERATED = ../generated
DEP_DIR = $(GENERATED)/dependencies DEP_DIR = $(GENERATED)/dependencies
EXCLUDE_JFR_PATHS:= -o -name jfr -prune
# reads the generated files defining the set of .o's and the .o .h dependencies # reads the generated files defining the set of .o's and the .o .h dependencies
-include $(DEP_DIR)/*.d -include $(DEP_DIR)/*.d
...@@ -48,6 +50,7 @@ else ...@@ -48,6 +50,7 @@ else
include $(MAKEFILES_DIR)/$(BUILDARCH).make include $(MAKEFILES_DIR)/$(BUILDARCH).make
endif endif
# set VPATH so make knows where to look for source files # set VPATH so make knows where to look for source files
# Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm # Src_Dirs_V is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
# The adfiles directory contains ad_<arch>.[ch]pp. # The adfiles directory contains ad_<arch>.[ch]pp.
...@@ -168,7 +171,7 @@ SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt ...@@ -168,7 +171,7 @@ SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
SOURCE_PATHS=\ SOURCE_PATHS=\
$(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \ $(shell find $(HS_COMMON_SRC)/share/vm/* -type d \! \
\( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) \)) \( -name DUMMY $(foreach dir,$(SPECIAL_PATHS),-o -name $(dir)) $(EXCLUDE_JFR_PATHS) \))
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm SOURCE_PATHS+=$(HS_COMMON_SRC)/os/$(Platform_os_family)/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm SOURCE_PATHS+=$(HS_COMMON_SRC)/os/posix/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
...@@ -177,12 +180,6 @@ SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm ...@@ -177,12 +180,6 @@ SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path)) CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles CORE_PATHS+=$(GENERATED)/jvmtifiles $(GENERATED)/tracefiles
ifneq ($(INCLUDE_TRACE), false)
CORE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
find $(HS_ALT_SRC)/share/vm/jfr -type d; \
fi)
endif
COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1) COMPILER1_PATHS := $(call altsrc,$(HS_COMMON_SRC)/share/vm/c1)
COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1 COMPILER1_PATHS += $(HS_COMMON_SRC)/share/vm/c1
......
...@@ -58,7 +58,7 @@ COMMONSRC=${WorkSpace}/${COMMONSRC_REL} ...@@ -58,7 +58,7 @@ COMMONSRC=${WorkSpace}/${COMMONSRC_REL}
ALTSRC=${WorkSpace}/${ALTSRC_REL} ALTSRC=${WorkSpace}/${ALTSRC_REL}
BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \); fi`" BASE_PATHS="`if [ -d ${ALTSRC}/share/vm ]; then $FIND ${ALTSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \); fi`"
BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt \)`" BASE_PATHS="${BASE_PATHS} ` $FIND ${COMMONSRC}/share/vm ! -name vm -prune -type d \! \( -name adlc -o -name c1 -o -name gc_implementation -o -name opto -o -name shark -o -name libadt -o -name jfr \)`"
for sd in \ for sd in \
share/vm/gc_implementation/shared \ share/vm/gc_implementation/shared \
......
...@@ -38,7 +38,9 @@ TraceSrcDir = $(WorkSpace)/src/share/vm/trace ...@@ -38,7 +38,9 @@ TraceSrcDir = $(WorkSpace)/src/share/vm/trace
TraceGeneratedNames = \ TraceGeneratedNames = \
traceEventClasses.hpp \ traceEventClasses.hpp \
traceEventIds.hpp \ traceEventIds.hpp \
traceTypes.hpp traceTypes.hpp \
traceEventControl.hpp \
tracePeriodic.hpp
!if EXISTS($(TraceAltSrcDir)) !if EXISTS($(TraceAltSrcDir))
TraceGeneratedNames = $(TraceGeneratedNames) \ TraceGeneratedNames = $(TraceGeneratedNames) \
...@@ -53,7 +55,9 @@ TraceGeneratedNames = $(TraceGeneratedNames) \ ...@@ -53,7 +55,9 @@ TraceGeneratedNames = $(TraceGeneratedNames) \
TraceGeneratedFiles = \ TraceGeneratedFiles = \
$(TraceOutDir)/traceEventClasses.hpp \ $(TraceOutDir)/traceEventClasses.hpp \
$(TraceOutDir)/traceEventIds.hpp \ $(TraceOutDir)/traceEventIds.hpp \
$(TraceOutDir)/traceTypes.hpp $(TraceOutDir)/traceTypes.hpp \
$(TraceOutDir)/traceEventControl.hpp \
$(TraceOutDir)/tracePeriodic.hpp
!if EXISTS($(TraceAltSrcDir)) !if EXISTS($(TraceAltSrcDir))
TraceGeneratedFiles = $(TraceGeneratedFiles) \ TraceGeneratedFiles = $(TraceGeneratedFiles) \
...@@ -65,7 +69,8 @@ TraceGeneratedFiles = $(TraceGeneratedFiles) \ ...@@ -65,7 +69,8 @@ TraceGeneratedFiles = $(TraceGeneratedFiles) \
XSLT = $(QUIETLY) $(REMOTE) $(RUN_JAVA) -classpath $(JvmtiOutDir) jvmtiGen XSLT = $(QUIETLY) $(REMOTE) $(RUN_JAVA) -classpath $(JvmtiOutDir) jvmtiGen
XML_DEPS = $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracetypes.xml \ XML_DEPS = $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracetypes.xml \
$(TraceSrcDir)/trace.dtd $(TraceSrcDir)/xinclude.mod $(TraceSrcDir)/tracerelationdecls.xml \
$(TraceSrcDir)/traceevents.xml
!if EXISTS($(TraceAltSrcDir)) !if EXISTS($(TraceAltSrcDir))
XML_DEPS = $(XML_DEPS) $(TraceAltSrcDir)/traceevents.xml XML_DEPS = $(XML_DEPS) $(TraceAltSrcDir)/traceevents.xml
...@@ -92,6 +97,14 @@ $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tr ...@@ -92,6 +97,14 @@ $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tr
@echo Generating OpenJDK $@ @echo Generating OpenJDK $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceSrcDir)/traceEventClasses.xsl -OUT $(TraceOutDir)/traceEventClasses.hpp @$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceSrcDir)/traceEventClasses.xsl -OUT $(TraceOutDir)/traceEventClasses.hpp
$(TraceOutDir)/traceEventControl.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/traceEventClasses.xsl $(XML_DEPS)
@echo Generating $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceSrcDir)/traceEventControl.xsl -OUT $(TraceOutDir)/traceEventControl.hpp
$(TraceOutDir)/tracePeriodic.hpp: $(TraceSrcDir)/trace.xml $(TraceSrcDir)/tracePeriodic.xsl $(XML_DEPS)
@echo Generating $@
@$(XSLT) -IN $(TraceSrcDir)/trace.xml -XSL $(TraceSrcDir)/tracePeriodic.xsl -OUT $(TraceOutDir)/tracePeriodic.hpp
!else !else
$(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS) $(TraceOutDir)/traceEventClasses.hpp: $(TraceSrcDir)/trace.xml $(TraceAltSrcDir)/traceEventClasses.xsl $(XML_DEPS)
......
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
#include "os_linux_x86.inline.hpp" #include "os_linux_x86.inline.hpp"
#endif #endif
#ifdef TARGET_OS_ARCH_windows_x86
#include "os_windows_x86.inline.hpp"
#endif
#ifdef TARGET_OS_ARCH_bsd_x86
#include "os_bsd_x86.inline.hpp"
#endif
static jlong baseline_counter = 0; static jlong baseline_counter = 0;
static bool rdtsc_elapsed_counter_enabled = false; static bool rdtsc_elapsed_counter_enabled = false;
static jlong tsc_frequency = 0; static jlong tsc_frequency = 0;
......
...@@ -187,6 +187,29 @@ public: ...@@ -187,6 +187,29 @@ public:
// ========================= SuperWord ===================== // ========================= SuperWord =====================
//------------------------------OrderedPair---------------------------
// Ordered pair of Node*.
class OrderedPair VALUE_OBJ_CLASS_SPEC {
protected:
Node* _p1;
Node* _p2;
public:
OrderedPair() : _p1(NULL), _p2(NULL) {}
OrderedPair(Node* p1, Node* p2) {
if (p1->_idx < p2->_idx) {
_p1 = p1; _p2 = p2;
} else {
_p1 = p2; _p2 = p1;
}
}
bool operator==(const OrderedPair &rhs) {
return _p1 == rhs._p1 && _p2 == rhs._p2;
}
void print() { tty->print(" (%d, %d)", _p1->_idx, _p2->_idx); }
static const OrderedPair initial;
};
// -----------------------------SWNodeInfo--------------------------------- // -----------------------------SWNodeInfo---------------------------------
// Per node info needed by SuperWord // Per node info needed by SuperWord
...@@ -505,29 +528,4 @@ class SWPointer VALUE_OBJ_CLASS_SPEC { ...@@ -505,29 +528,4 @@ class SWPointer VALUE_OBJ_CLASS_SPEC {
void print(); void print();
}; };
//------------------------------OrderedPair---------------------------
// Ordered pair of Node*.
class OrderedPair VALUE_OBJ_CLASS_SPEC {
protected:
Node* _p1;
Node* _p2;
public:
OrderedPair() : _p1(NULL), _p2(NULL) {}
OrderedPair(Node* p1, Node* p2) {
if (p1->_idx < p2->_idx) {
_p1 = p1; _p2 = p2;
} else {
_p1 = p2; _p2 = p1;
}
}
bool operator==(const OrderedPair &rhs) {
return _p1 == rhs._p1 && _p2 == rhs._p2;
}
void print() { tty->print(" (%d, %d)", _p1->_idx, _p2->_idx); }
static const OrderedPair initial;
};
#endif // SHARE_VM_OPTO_SUPERWORD_HPP #endif // SHARE_VM_OPTO_SUPERWORD_HPP
...@@ -2638,11 +2638,13 @@ bool Arguments::check_vm_args_consistency() { ...@@ -2638,11 +2638,13 @@ bool Arguments::check_vm_args_consistency() {
// Check the minimum number of compiler threads // Check the minimum number of compiler threads
status &=verify_min_value(CICompilerCount, min_number_of_compiler_threads, "CICompilerCount"); status &=verify_min_value(CICompilerCount, min_number_of_compiler_threads, "CICompilerCount");
#if INCLUDE_TRACE
if ((FlightRecorder || StartFlightRecording != NULL) && !EnableJFR) { if ((FlightRecorder || StartFlightRecording != NULL) && !EnableJFR) {
jio_fprintf(defaultStream::error_stream(), jio_fprintf(defaultStream::error_stream(),
"The VM option -XX:+FlightRecorder or -XX:StartFlightRecording=... must be combined with -XX:+EnableJFR.\n"); "The VM option -XX:+FlightRecorder or -XX:StartFlightRecording=... must be combined with -XX:+EnableJFR.\n");
status = false; status = false;
} }
#endif
return status; return status;
} }
......
...@@ -161,7 +161,11 @@ ...@@ -161,7 +161,11 @@
#endif // INCLUDE_NMT #endif // INCLUDE_NMT
#ifndef INCLUDE_TRACE #ifndef INCLUDE_TRACE
#ifdef LINUX
#define INCLUDE_TRACE 1 #define INCLUDE_TRACE 1
#else
#define INCLUDE_TRACE 0
#endif
#endif // INCLUDE_TRACE #endif // INCLUDE_TRACE
// COMPILER1 variant // COMPILER1 variant
......
...@@ -116,12 +116,7 @@ class TraceElapsedCounterStamped : public TraceElapsedCounter { ...@@ -116,12 +116,7 @@ class TraceElapsedCounterStamped : public TraceElapsedCounter {
TraceElapsedCounterStamped(); TraceElapsedCounterStamped();
}; };
#if INCLUDE_TRACE
typedef TraceElapsedCounter Ticks; typedef TraceElapsedCounter Ticks;
typedef TraceElapsedInterval Tickspan; typedef TraceElapsedInterval Tickspan;
#else
typedef ElapsedCounter Ticks;
typedef TicksInterval<Ticks> Tickspan;
#endif
#endif // SHARE_VM_UTILITIES_TICKS_HPP #endif // SHARE_VM_UTILITIES_TICKS_HPP
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册