Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
slowhog committed Jan 9, 2020
2 parents 02cc064 + 89f2d14 commit 231d9af
Show file tree
Hide file tree
Showing 68 changed files with 1,585 additions and 597 deletions.
2 changes: 2 additions & 0 deletions .hgtags
Expand Up @@ -601,3 +601,5 @@ c16ac7a2eba4e73cb4f7ee9294dd647860eebff0 jdk-14+21
288777cf0702914e5266bc1e5d380eed9032ca41 jdk-14+26 288777cf0702914e5266bc1e5d380eed9032ca41 jdk-14+26
91a3f092682fc715d991a87eb6ec6f28886d2035 jdk-14+27 91a3f092682fc715d991a87eb6ec6f28886d2035 jdk-14+27
2069b4bfd23b56b6fc659fba8b75aaaa23debbe0 jdk-14+28 2069b4bfd23b56b6fc659fba8b75aaaa23debbe0 jdk-14+28
563fa900fa17c290ae516c7a3a69e8c069dde304 jdk-14+29
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+30
29 changes: 18 additions & 11 deletions make/src/classes/build/tools/jfr/GenerateJfrFiles.java
Expand Up @@ -154,6 +154,7 @@ static class EventElement extends TypeElement {
boolean startTime; boolean startTime;
boolean periodic; boolean periodic;
boolean cutoff; boolean cutoff;
String commitState;
} }


static class FieldElement { static class FieldElement {
Expand Down Expand Up @@ -219,14 +220,15 @@ public void startElement(String uri, String localName, String qName, Attributes
currentType.name = attributes.getValue("name"); currentType.name = attributes.getValue("name");
break; break;
case "Event": case "Event":
EventElement eventtType = new EventElement(); EventElement eventType = new EventElement();
eventtType.name = attributes.getValue("name"); eventType.name = attributes.getValue("name");
eventtType.thread = getBoolean(attributes, "thread", false); eventType.thread = getBoolean(attributes, "thread", false);
eventtType.stackTrace = getBoolean(attributes, "stackTrace", false); eventType.stackTrace = getBoolean(attributes, "stackTrace", false);
eventtType.startTime = getBoolean(attributes, "startTime", true); eventType.startTime = getBoolean(attributes, "startTime", true);
eventtType.periodic = attributes.getValue("period") != null; eventType.periodic = attributes.getValue("period") != null;
eventtType.cutoff = getBoolean(attributes, "cutoff", false); eventType.cutoff = getBoolean(attributes, "cutoff", false);
currentType = eventtType; eventType.commitState = attributes.getValue("commitState");
currentType = eventType;
break; break;
case "Field": case "Field":
currentField = new FieldElement(metadata); currentField = new FieldElement(metadata);
Expand Down Expand Up @@ -459,6 +461,7 @@ private static void printJfrEventClassesHpp(Metadata metadata, File outputDirect
out.write("#include \"utilities/ticks.hpp\""); out.write("#include \"utilities/ticks.hpp\"");
out.write("#if INCLUDE_JFR"); out.write("#if INCLUDE_JFR");
out.write("#include \"jfr/recorder/service/jfrEvent.hpp\""); out.write("#include \"jfr/recorder/service/jfrEvent.hpp\"");
out.write("#include \"jfr/support/jfrEpochSynchronization.hpp\"");
out.write("/*"); out.write("/*");
out.write(" * Each event class has an assert member function verify() which is invoked"); out.write(" * Each event class has an assert member function verify() which is invoked");
out.write(" * just before the engine writes the event and its fields to the data stream."); out.write(" * just before the engine writes the event and its fields to the data stream.");
Expand Down Expand Up @@ -523,7 +526,7 @@ private static void printType(Printer out, TypeElement t, boolean empty) {
} }
out.write(""); out.write("");
if (!empty) { if (!empty) {
printWriteData(out, t.fields); printWriteData(out, t.fields, null);
} }
out.write("};"); out.write("};");
out.write(""); out.write("");
Expand Down Expand Up @@ -566,7 +569,7 @@ private static void printEvent(Printer out, EventElement event, boolean empty) {
} }
out.write(""); out.write("");
if (!empty) { if (!empty) {
printWriteData(out, event.fields); printWriteData(out, event.fields, event.commitState);
out.write(""); out.write("");
} }
out.write(" using JfrEvent<Event" + event.name + ">::commit; // else commit() is hidden by overloaded versions in this class"); out.write(" using JfrEvent<Event" + event.name + ">::commit; // else commit() is hidden by overloaded versions in this class");
Expand All @@ -578,9 +581,13 @@ private static void printEvent(Printer out, EventElement event, boolean empty) {
out.write("};"); out.write("};");
} }


private static void printWriteData(Printer out, List<FieldElement> fields) { private static void printWriteData(Printer out, List<FieldElement> fields, String commitState) {
out.write(" template <typename Writer>"); out.write(" template <typename Writer>");
out.write(" void writeData(Writer& w) {"); out.write(" void writeData(Writer& w) {");
if (("_thread_in_native").equals(commitState)) {
out.write(" // explicit epoch synchronization check");
out.write(" JfrEpochSynchronization sync;");
}
for (FieldElement field : fields) { for (FieldElement field : fields) {
if (field.struct) { if (field.struct) {
out.write(" _" + field.name + ".writeData(w);"); out.write(" _" + field.name + ".writeData(w);");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/aarch64/aarch64.ad
Expand Up @@ -2297,7 +2297,7 @@ const bool Matcher::need_masked_shift_count = false;
// No support for generic vector operands. // No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false; const bool Matcher::supports_generic_vector_operands = false;


MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) { MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported ShouldNotReachHere(); // generic vector operands not supported
return NULL; return NULL;
} }
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/arm/arm.ad
Expand Up @@ -1080,7 +1080,7 @@ const bool Matcher::convi2l_type_required = true;
// No support for generic vector operands. // No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false; const bool Matcher::supports_generic_vector_operands = false;


MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) { MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported ShouldNotReachHere(); // generic vector operands not supported
return NULL; return NULL;
} }
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/ppc/ppc.ad
Expand Up @@ -2429,7 +2429,7 @@ const bool Matcher::need_masked_shift_count = true;
// No support for generic vector operands. // No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false; const bool Matcher::supports_generic_vector_operands = false;


MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) { MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported ShouldNotReachHere(); // generic vector operands not supported
return NULL; return NULL;
} }
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/s390/s390.ad
Expand Up @@ -1661,7 +1661,7 @@ const bool Matcher::need_masked_shift_count = false;
// No support for generic vector operands. // No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false; const bool Matcher::supports_generic_vector_operands = false;


MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) { MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported ShouldNotReachHere(); // generic vector operands not supported
return NULL; return NULL;
} }
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/cpu/sparc/sparc.ad
Expand Up @@ -1818,7 +1818,7 @@ const bool Matcher::need_masked_shift_count = false;
// No support for generic vector operands. // No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false; const bool Matcher::supports_generic_vector_operands = false;


MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) { MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported ShouldNotReachHere(); // generic vector operands not supported
return NULL; return NULL;
} }
Expand Down
7 changes: 6 additions & 1 deletion src/hotspot/cpu/x86/x86.ad
Expand Up @@ -1438,9 +1438,14 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
// x86 supports generic vector operands: vec and legVec. // x86 supports generic vector operands: vec and legVec.
const bool Matcher::supports_generic_vector_operands = true; const bool Matcher::supports_generic_vector_operands = true;


MachOper* Matcher::specialize_generic_vector_operand(MachOper* generic_opnd, uint ideal_reg) { MachOper* Matcher::specialize_generic_vector_operand(MachOper* generic_opnd, uint ideal_reg, bool is_temp) {
assert(Matcher::is_generic_vector(generic_opnd), "not generic"); assert(Matcher::is_generic_vector(generic_opnd), "not generic");
bool legacy = (generic_opnd->opcode() == LEGVEC); bool legacy = (generic_opnd->opcode() == LEGVEC);
if (!VM_Version::supports_avx512vlbwdq() && // KNL
is_temp && !legacy && (ideal_reg == Op_VecZ)) {
// Conservatively specialize 512bit vec TEMP operands to legVecZ (zmm0-15) on KNL.
return new legVecZOper();
}
if (legacy) { if (legacy) {
switch (ideal_reg) { switch (ideal_reg) {
case Op_VecS: return new legVecSOper(); case Op_VecS: return new legVecSOper();
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/compiler/compilationPolicy.cpp
Expand Up @@ -104,7 +104,7 @@ void CompilationPolicy::compile_if_required(const methodHandle& selected_method,
return; return;
} }
CompileBroker::compile_method(selected_method, InvocationEntryBci, CompileBroker::compile_method(selected_method, InvocationEntryBci,
CompilationPolicy::policy()->initial_compile_level(), CompilationPolicy::policy()->initial_compile_level(selected_method),
methodHandle(), 0, CompileTask::Reason_MustBeCompiled, CHECK); methodHandle(), 0, CompileTask::Reason_MustBeCompiled, CHECK);
} }
} }
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/compiler/compilationPolicy.hpp
Expand Up @@ -59,7 +59,7 @@ class CompilationPolicy : public CHeapObj<mtCompiler> {
static CompileTask* select_task_helper(CompileQueue* compile_queue); static CompileTask* select_task_helper(CompileQueue* compile_queue);


// Return initial compile level that is used with Xcomp // Return initial compile level that is used with Xcomp
virtual CompLevel initial_compile_level() = 0; virtual CompLevel initial_compile_level(const methodHandle& method) = 0;
virtual int compiler_count(CompLevel comp_level) = 0; virtual int compiler_count(CompLevel comp_level) = 0;
// main notification entry, return a pointer to an nmethod if the OSR is required, // main notification entry, return a pointer to an nmethod if the OSR is required,
// returns NULL otherwise. // returns NULL otherwise.
Expand Down Expand Up @@ -97,7 +97,7 @@ class SimpleCompPolicy : public CompilationPolicy {
void method_back_branch_event(const methodHandle& m, int bci, JavaThread* thread); void method_back_branch_event(const methodHandle& m, int bci, JavaThread* thread);
public: public:
SimpleCompPolicy() : _compiler_count(0) { } SimpleCompPolicy() : _compiler_count(0) { }
virtual CompLevel initial_compile_level() { return CompLevel_highest_tier; } virtual CompLevel initial_compile_level(const methodHandle& m) { return CompLevel_highest_tier; }
virtual int compiler_count(CompLevel comp_level); virtual int compiler_count(CompLevel comp_level);
virtual void do_safepoint_work(); virtual void do_safepoint_work();
virtual void reprofile(ScopeDesc* trap_scope, bool is_osr); virtual void reprofile(ScopeDesc* trap_scope, bool is_osr);
Expand Down
14 changes: 0 additions & 14 deletions src/hotspot/share/compiler/compilerDefinitions.cpp
Expand Up @@ -57,9 +57,6 @@ bool CompilationModeFlag::initialize() {
jio_fprintf(defaultStream::error_stream(), "Unsupported compilation mode '%s', supported modes are: quick-only, high-only, high-only-quick-internal\n", CompilationMode); jio_fprintf(defaultStream::error_stream(), "Unsupported compilation mode '%s', supported modes are: quick-only, high-only, high-only-quick-internal\n", CompilationMode);
return false; return false;
} }
if (disable_intermediate()) {
CompLevel_initial_compile = CompLevel_full_optimization;
}
} }
return true; return true;
} }
Expand All @@ -74,16 +71,6 @@ CompLevel CompLevel_highest_tier = CompLevel_simple; // pure C
CompLevel CompLevel_highest_tier = CompLevel_none; CompLevel CompLevel_highest_tier = CompLevel_none;
#endif #endif


#if defined(TIERED)
CompLevel CompLevel_initial_compile = CompLevel_full_profile; // tiered
#elif defined(COMPILER1) || INCLUDE_JVMCI
CompLevel CompLevel_initial_compile = CompLevel_simple; // pure C1 or JVMCI
#elif defined(COMPILER2)
CompLevel CompLevel_initial_compile = CompLevel_full_optimization; // pure C2
#else
CompLevel CompLevel_initial_compile = CompLevel_none;
#endif

#if defined(COMPILER2) #if defined(COMPILER2)
CompMode Compilation_mode = CompMode_server; CompMode Compilation_mode = CompMode_server;
#elif defined(COMPILER1) #elif defined(COMPILER1)
Expand Down Expand Up @@ -145,7 +132,6 @@ intx CompilerConfig::scaled_freq_log(intx freq_log, double scale) {
void set_client_compilation_mode() { void set_client_compilation_mode() {
Compilation_mode = CompMode_client; Compilation_mode = CompMode_client;
CompLevel_highest_tier = CompLevel_simple; CompLevel_highest_tier = CompLevel_simple;
CompLevel_initial_compile = CompLevel_simple;
FLAG_SET_ERGO(TieredCompilation, false); FLAG_SET_ERGO(TieredCompilation, false);
FLAG_SET_ERGO(ProfileInterpreter, false); FLAG_SET_ERGO(ProfileInterpreter, false);
#if INCLUDE_JVMCI #if INCLUDE_JVMCI
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/compiler/compilerDefinitions.hpp
Expand Up @@ -83,7 +83,6 @@ class CompilationModeFlag : AllStatic {
#endif #endif


extern CompLevel CompLevel_highest_tier; extern CompLevel CompLevel_highest_tier;
extern CompLevel CompLevel_initial_compile;


enum CompMode { enum CompMode {
CompMode_none = 0, CompMode_none = 0,
Expand Down
85 changes: 77 additions & 8 deletions src/hotspot/share/compiler/tieredThresholdPolicy.cpp
Expand Up @@ -307,6 +307,78 @@ void TieredThresholdPolicy::initialize() {
set_start_time(os::javaTimeMillis()); set_start_time(os::javaTimeMillis());
} }



#ifdef ASSERT
bool TieredThresholdPolicy::verify_level(CompLevel level) {
// AOT and interpreter levels are always valid.
if (level == CompLevel_aot || level == CompLevel_none) {
return true;
}
if (CompilationModeFlag::normal()) {
return true;
} else if (CompilationModeFlag::quick_only()) {
return level == CompLevel_simple;
} else if (CompilationModeFlag::high_only()) {
return level == CompLevel_full_optimization;
} else if (CompilationModeFlag::high_only_quick_internal()) {
return level == CompLevel_full_optimization || level == CompLevel_simple;
}
return false;
}
#endif


CompLevel TieredThresholdPolicy::limit_level(CompLevel level) {
if (CompilationModeFlag::quick_only()) {
level = MIN2(level, CompLevel_simple);
}
assert(verify_level(level), "Invalid compilation level %d", level);
if (level <= TieredStopAtLevel) {
return level;
}
// Some compilation levels are not valid depending on a compilation mode:
// a) quick_only - levels 2,3,4 are invalid; levels -1,0,1 are valid;
// b) high_only - levels 1,2,3 are invalid; levels -1,0,4 are valid;
// c) high_only_quick_internal - levels 2,3 are invalid; levels -1,0,1,4 are valid.
// The invalid levels are actually sequential so a single comparison is sufficient.
// Down here we already have (level > TieredStopAtLevel), which also implies that
// (TieredStopAtLevel < Highest Possible Level), so we need to return a level that is:
// a) a max level that is strictly less than the highest for a given compilation mode
// b) less or equal to TieredStopAtLevel
if (CompilationModeFlag::normal() || CompilationModeFlag::quick_only()) {
return (CompLevel)TieredStopAtLevel;
}

if (CompilationModeFlag::high_only() || CompilationModeFlag::high_only_quick_internal()) {
return MIN2(CompLevel_none, (CompLevel)TieredStopAtLevel);
}

ShouldNotReachHere();
return CompLevel_any;
}

CompLevel TieredThresholdPolicy::initial_compile_level_helper(const methodHandle& method) {
if (CompilationModeFlag::normal()) {
return CompLevel_full_profile;
} else if (CompilationModeFlag::quick_only()) {
return CompLevel_simple;
} else if (CompilationModeFlag::high_only()) {
return CompLevel_full_optimization;
} else if (CompilationModeFlag::high_only_quick_internal()) {
if (force_comp_at_level_simple(method)) {
return CompLevel_simple;
} else {
return CompLevel_full_optimization;
}
}
ShouldNotReachHere();
return CompLevel_any;
}

CompLevel TieredThresholdPolicy::initial_compile_level(const methodHandle& method) {
return limit_level(initial_compile_level_helper(method));
}

void TieredThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) { void TieredThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {
if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) { if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) {
counter->set_carry_flag(); counter->set_carry_flag();
Expand Down Expand Up @@ -457,12 +529,7 @@ nmethod* TieredThresholdPolicy::event(const methodHandle& method, const methodHa


// Check if the method can be compiled, change level if necessary // Check if the method can be compiled, change level if necessary
void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) { void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
assert(level <= TieredStopAtLevel, "Invalid compilation level"); assert(verify_level(level) && level <= TieredStopAtLevel, "Invalid compilation level %d", level);
if (CompilationModeFlag::quick_only()) {
assert(level <= CompLevel_simple, "Invalid compilation level");
} else if (CompilationModeFlag::disable_intermediate()) {
assert(level != CompLevel_full_profile && level != CompLevel_limited_profile, "C1 profiling levels shouldn't be used with intermediate levels disabled");
}


if (level == CompLevel_none) { if (level == CompLevel_none) {
if (mh->has_compiled_code()) { if (mh->has_compiled_code()) {
Expand Down Expand Up @@ -924,9 +991,11 @@ CompLevel TieredThresholdPolicy::common(Predicate p, const methodHandle& method,
} }
} }
} }
return MIN2(next_level, CompilationModeFlag::quick_only() ? CompLevel_simple : (CompLevel)TieredStopAtLevel); return limit_level(next_level);
} }




// Determine if a method should be compiled with a normal entry point at a different level. // Determine if a method should be compiled with a normal entry point at a different level.
CompLevel TieredThresholdPolicy::call_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread) { CompLevel TieredThresholdPolicy::call_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread) {
CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(), CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(),
Expand Down Expand Up @@ -1027,7 +1096,7 @@ void TieredThresholdPolicy::method_back_branch_event(const methodHandle& mh, con
if (level == CompLevel_aot) { if (level == CompLevel_aot) {
// Recompile the enclosing method to prevent infinite OSRs. Stay at AOT level while it's compiling. // Recompile the enclosing method to prevent infinite OSRs. Stay at AOT level while it's compiling.
if (max_osr_level != CompLevel_none && !CompileBroker::compilation_is_in_queue(mh)) { if (max_osr_level != CompLevel_none && !CompileBroker::compilation_is_in_queue(mh)) {
CompLevel enclosing_level = MIN2(CompilationModeFlag::quick_only() ? CompLevel_simple : (CompLevel)TieredStopAtLevel, CompLevel_full_profile); CompLevel enclosing_level = limit_level(CompLevel_full_profile);
compile(mh, InvocationEntryBci, enclosing_level, thread); compile(mh, InvocationEntryBci, enclosing_level, thread);
} }
} else { } else {
Expand Down
11 changes: 9 additions & 2 deletions src/hotspot/share/compiler/tieredThresholdPolicy.hpp
Expand Up @@ -170,8 +170,14 @@ class TieredThresholdPolicy : public CompilationPolicy {
inline void set_carry_if_necessary(InvocationCounter *counter); inline void set_carry_if_necessary(InvocationCounter *counter);
// Set carry flags in the counters (in Method* and MDO). // Set carry flags in the counters (in Method* and MDO).
inline void handle_counter_overflow(Method* method); inline void handle_counter_overflow(Method* method);
// Verify that a level is consistent with the compilation mode
bool verify_level(CompLevel level);
// Clamp the request level according to various constraints.
inline CompLevel limit_level(CompLevel level);
// Return desired initial compilation level for Xcomp
CompLevel initial_compile_level_helper(const methodHandle& method);
// Call and loop predicates determine whether a transition to a higher compilation // Call and loop predicates determine whether a transition to a higher compilation
// level should be performed (pointers to predicate functions are passed to common_TF(). // level should be performed (pointers to predicate functions are passed to common().
// Predicates also take compiler load into account. // Predicates also take compiler load into account.
typedef bool (TieredThresholdPolicy::*Predicate)(int i, int b, CompLevel cur_level, const methodHandle& method); typedef bool (TieredThresholdPolicy::*Predicate)(int i, int b, CompLevel cur_level, const methodHandle& method);
bool call_predicate(int i, int b, CompLevel cur_level, const methodHandle& method); bool call_predicate(int i, int b, CompLevel cur_level, const methodHandle& method);
Expand Down Expand Up @@ -253,7 +259,8 @@ class TieredThresholdPolicy : public CompilationPolicy {
if (is_c2_compile(comp_level)) return c2_count(); if (is_c2_compile(comp_level)) return c2_count();
return 0; return 0;
} }
virtual CompLevel initial_compile_level() { return MIN2((CompLevel)TieredStopAtLevel, CompLevel_initial_compile); } // Return initial compile level to use with Xcomp (depends on compilation mode).
virtual CompLevel initial_compile_level(const methodHandle& method);
virtual void do_safepoint_work() { } virtual void do_safepoint_work() { }
virtual void delay_compilation(Method* method) { } virtual void delay_compilation(Method* method) { }
virtual void disable_compilation(Method* method) { } virtual void disable_compilation(Method* method) { }
Expand Down
11 changes: 9 additions & 2 deletions src/hotspot/share/gc/g1/g1CollectedHeap.cpp
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -2151,6 +2151,13 @@ bool G1CollectedHeap::try_collect_concurrently(GCCause::Cause cause,
return op.gc_succeeded(); return op.gc_succeeded();
} }


// If VMOp skipped initiating concurrent marking cycle because
// we're terminating, then we're done.
if (op.terminating()) {
LOG_COLLECT_CONCURRENTLY(cause, "skipped: terminating");
return false;
}

// Lock to get consistent set of values. // Lock to get consistent set of values.
uint old_marking_started_after; uint old_marking_started_after;
uint old_marking_completed_after; uint old_marking_completed_after;
Expand Down

0 comments on commit 231d9af

Please sign in to comment.