Skip to content

Commit

Permalink
ZGC: The Z Garbage Collector v93
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Duke committed Jun 12, 2018
1 parent f805d6a commit 19efc73
Show file tree
Hide file tree
Showing 322 changed files with 27,196 additions and 79 deletions.
15 changes: 14 additions & 1 deletion make/autoconf/hotspot.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# All valid JVM features, regardless of platform
VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
graal vm-structs jni-check services management cmsgc g1gc parallelgc serialgc epsilongc nmt cds \
graal vm-structs jni-check services management cmsgc g1gc epsilongc parallelgc serialgc zgc nmt cds \
static-build link-time-opt aot jfr"

# Deprecated JVM features (these are ignored, but with a warning)
Expand Down Expand Up @@ -328,6 +328,19 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
fi
fi
# Only enable ZGC on Linux x86_64
AC_MSG_CHECKING([if zgc should be built])
if HOTSPOT_CHECK_JVM_FEATURE(zgc); then
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
AC_MSG_RESULT([yes])
else
DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
AC_MSG_RESULT([no, platform not supported])
fi
else
AC_MSG_RESULT([no])
fi
# Turn on additional features based on other parts of configure
if test "x$INCLUDE_DTRACE" = "xtrue"; then
JVM_FEATURES="$JVM_FEATURES dtrace"
Expand Down
8 changes: 8 additions & 0 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,14 @@ var getJibProfilesProfiles = function (input, common, data) {
profiles[openName].artifacts["jdk"].remote));
});

// Enable ZGC in linux-x64-open builds
[ "linux-x64-open" ].forEach(function (name) {
var configureArgs = { configure_args: [ "--with-jvm-features=zgc" ] };
var debugName = name + common.debug_suffix;
profiles[name] = concatObjects(profiles[name], configureArgs);
profiles[debugName] = concatObjects(profiles[debugName], configureArgs);
});

// Profiles used to run tests. Used in JPRT and Mach 5.
var testOnlyProfiles = {
"run-test-jprt": {
Expand Down
5 changes: 5 additions & 0 deletions make/hotspot/lib/JvmFeatures.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ ifneq ($(call check-jvm-feature, epsilongc), true)
JVM_EXCLUDE_PATTERNS += gc/epsilon
endif

ifneq ($(call check-jvm-feature, zgc), true)
JVM_CFLAGS_FEATURES += -DINCLUDE_ZGC=0
JVM_EXCLUDE_PATTERNS += gc/z
endif

ifneq ($(call check-jvm-feature, jfr), true)
JVM_CFLAGS_FEATURES += -DINCLUDE_JFR=0
JVM_EXCLUDE_PATTERNS += jfr
Expand Down
6 changes: 5 additions & 1 deletion src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,11 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
__ decode_heap_oop(dest->as_register());
}
#endif
__ verify_oop(dest->as_register());

// Load barrier has not yet been applied, so ZGC can't verify the oop here
if (!UseZGC) {
__ verify_oop(dest->as_register());
}
} else if (type == T_ADDRESS && addr->disp() == oopDesc::klass_offset_in_bytes()) {
#ifdef _LP64
if (UseCompressedClassPointers) {
Expand Down
Loading

0 comments on commit 19efc73

Please sign in to comment.