Skip to content
Permalink
Browse files

Automatic merge of jdk:master into master

  • Loading branch information
duke
duke committed Jul 20, 2020
2 parents 35abd7f + 99eccaf commit 754f03d043ba649e557803229e0adbc8f67f5c3f
Showing with 134 additions and 264 deletions.
  1. +0 −1 src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
  2. +0 −1 src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp
  3. +0 −8 src/hotspot/share/gc/g1/g1RootProcessor.cpp
  4. +0 −6 src/hotspot/share/gc/parallel/psParallelCompact.cpp
  5. +0 −1 src/hotspot/share/gc/parallel/psRootType.hpp
  6. +0 −5 src/hotspot/share/gc/parallel/psScavenge.cpp
  7. +0 −4 src/hotspot/share/gc/shared/genCollectedHeap.cpp
  8. +0 −1 src/hotspot/share/gc/shared/genCollectedHeap.hpp
  9. +0 −1 src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp
  10. +1 −4 src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp
  11. +0 −1 src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.hpp
  12. +0 −4 src/hotspot/share/gc/shenandoah/shenandoahRootVerifier.cpp
  13. +0 −9 src/hotspot/share/gc/z/zRootsIterator.cpp
  14. +0 −2 src/hotspot/share/gc/z/zRootsIterator.hpp
  15. +0 −1 src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp
  16. +0 −13 src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp
  17. +0 −2 src/hotspot/share/jfr/leakprofiler/utilities/rootType.cpp
  18. +0 −1 src/hotspot/share/jfr/leakprofiler/utilities/rootType.hpp
  19. +16 −7 src/hotspot/share/oops/oopHandle.hpp
  20. +5 −3 src/hotspot/share/oops/oopHandle.inline.hpp
  21. +12 −11 src/hotspot/share/services/lowMemoryDetector.cpp
  22. +3 −6 src/hotspot/share/services/lowMemoryDetector.hpp
  23. +6 −11 src/hotspot/share/services/management.cpp
  24. +0 −1 src/hotspot/share/services/management.hpp
  25. +8 −14 src/hotspot/share/services/memoryManager.cpp
  26. +1 −4 src/hotspot/share/services/memoryManager.hpp
  27. +9 −20 src/hotspot/share/services/memoryPool.cpp
  28. +1 −4 src/hotspot/share/services/memoryPool.hpp
  29. +0 −13 src/hotspot/share/services/memoryService.cpp
  30. +0 −2 src/hotspot/share/services/memoryService.hpp
  31. +55 −73 src/hotspot/share/services/threadService.cpp
  32. +17 −28 src/hotspot/share/services/threadService.hpp
  33. +0 −1 test/hotspot/jtreg/gc/g1/TestGCLogMessages.java
  34. +0 −1 test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java
@@ -60,7 +60,6 @@ G1GCPhaseTimes::G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads) :
_gc_par_phases[ThreadRoots] = new WorkerDataArray<double>("ThreadRoots", "Thread Roots (ms):", max_gc_threads);
_gc_par_phases[UniverseRoots] = new WorkerDataArray<double>("UniverseRoots", "Universe Roots (ms):", max_gc_threads);
_gc_par_phases[ObjectSynchronizerRoots] = new WorkerDataArray<double>("ObjectSynchronizerRoots", "ObjectSynchronizer Roots (ms):", max_gc_threads);
_gc_par_phases[ManagementRoots] = new WorkerDataArray<double>("ManagementRoots", "Management Roots (ms):", max_gc_threads);
_gc_par_phases[CLDGRoots] = new WorkerDataArray<double>("CLDGRoots", "CLDG Roots (ms):", max_gc_threads);
AOT_ONLY(_gc_par_phases[AOTCodeRoots] = new WorkerDataArray<double>("AOTCodeRoots", "AOT Root Scan (ms):", max_gc_threads);)
_gc_par_phases[CMRefRoots] = new WorkerDataArray<double>("CMRefRoots", "CM RefProcessor Roots (ms):", max_gc_threads);
@@ -50,7 +50,6 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
ThreadRoots,
UniverseRoots,
ObjectSynchronizerRoots,
ManagementRoots,
CLDGRoots,
AOT_ONLY(AOTCodeRoots COMMA)
CMRefRoots,
@@ -45,7 +45,6 @@
#include "memory/allocation.inline.hpp"
#include "memory/universe.hpp"
#include "runtime/mutex.hpp"
#include "services/management.hpp"
#include "utilities/macros.hpp"

G1RootProcessor::G1RootProcessor(G1CollectedHeap* g1h, uint n_workers) :
@@ -196,13 +195,6 @@ void G1RootProcessor::process_vm_roots(G1RootClosures* closures,
}
}

{
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::ManagementRoots, worker_id);
if (_process_strong_tasks.try_claim_task(G1RP_PS_Management_oops_do)) {
Management::oops_do(strong_roots);
}
}

#if INCLUDE_AOT
if (UseAOT) {
G1GCParPhaseTimesTracker x(phase_times, G1GCPhaseTimes::AOTCodeRoots, worker_id);
@@ -75,7 +75,6 @@
#include "runtime/handles.inline.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/vmThread.hpp"
#include "services/management.hpp"
#include "services/memTracker.hpp"
#include "services/memoryService.hpp"
#include "utilities/align.hpp"
@@ -2020,10 +2019,6 @@ static void mark_from_roots_work(ParallelRootType::Value root_type, uint worker_
ObjectSynchronizer::oops_do(&mark_and_push_closure);
break;

case ParallelRootType::management:
Management::oops_do(&mark_and_push_closure);
break;

case ParallelRootType::class_loader_data:
{
CLDToOopClosure cld_closure(&mark_and_push_closure, ClassLoaderData::_claim_strong);
@@ -2236,7 +2231,6 @@ void PSParallelCompact::adjust_roots(ParCompactionManager* cm) {
Universe::oops_do(&oop_closure);
Threads::oops_do(&oop_closure, NULL);
ObjectSynchronizer::oops_do(&oop_closure);
Management::oops_do(&oop_closure);
OopStorageSet::strong_oops_do(&oop_closure);
CLDToOopClosure cld_closure(&oop_closure, ClassLoaderData::_claim_strong);
ClassLoaderDataGraph::cld_do(&cld_closure);
@@ -36,7 +36,6 @@ class ParallelRootType : public AllStatic {
enum Value {
universe,
object_synchronizer,
management,
class_loader_data,
code_cache,
//"threads" are handled in parallel as a special case
@@ -67,7 +67,6 @@
#include "runtime/threadCritical.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vmOperations.hpp"
#include "services/management.hpp"
#include "services/memoryService.hpp"
#include "utilities/stack.inline.hpp"

@@ -108,10 +107,6 @@ static void scavenge_roots_work(ParallelRootType::Value root_type, uint worker_i
}
break;

case ParallelRootType::management:
Management::oops_do(&roots_closure);
break;

case ParallelRootType::code_cache:
{
MarkingCodeBlobClosure code_closure(&roots_to_old_closure, CodeBlobToOopClosure::FixRelocations);
@@ -67,7 +67,6 @@
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/vmThread.hpp"
#include "services/management.hpp"
#include "services/memoryService.hpp"
#include "utilities/autoRestore.hpp"
#include "utilities/debug.hpp"
@@ -829,9 +828,6 @@ void GenCollectedHeap::process_roots(StrongRootsScope* scope,
if (_process_strong_tasks->try_claim_task(GCH_PS_ObjectSynchronizer_oops_do)) {
ObjectSynchronizer::oops_do(strong_roots);
}
if (_process_strong_tasks->try_claim_task(GCH_PS_Management_oops_do)) {
Management::oops_do(strong_roots);
}
#if INCLUDE_AOT
if (UseAOT && _process_strong_tasks->try_claim_task(GCH_PS_aot_oops_do)) {
AOTLoader::oops_do(strong_roots);
@@ -107,7 +107,6 @@ class GenCollectedHeap : public CollectedHeap {
enum GCH_strong_roots_tasks {
GCH_PS_Universe_oops_do,
GCH_PS_ObjectSynchronizer_oops_do,
GCH_PS_Management_oops_do,
GCH_PS_OopStorageSet_oops_do,
GCH_PS_ClassLoaderDataGraph_oops_do,
GCH_PS_CodeCache_oops_do,
@@ -41,7 +41,6 @@ class outputStream;
f(CNT_PREFIX ## VMStrongRoots, DESC_PREFIX "VM Strong Roots") \
f(CNT_PREFIX ## VMWeakRoots, DESC_PREFIX "VM Weak Roots") \
f(CNT_PREFIX ## ObjectSynchronizerRoots, DESC_PREFIX "Synchronizer Roots") \
f(CNT_PREFIX ## ManagementRoots, DESC_PREFIX "Management Roots") \
f(CNT_PREFIX ## CLDGRoots, DESC_PREFIX "CLDG Roots") \
f(CNT_PREFIX ## JVMTIWeakRoots, DESC_PREFIX "JVMTI Weak Roots") \
f(CNT_PREFIX ## JFRWeakRoots, DESC_PREFIX "JFR Weak Roots") \
@@ -40,7 +40,6 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "runtime/thread.hpp"
#include "services/management.hpp"

ShenandoahSerialRoot::ShenandoahSerialRoot(ShenandoahSerialRoot::OopsDo oops_do,
ShenandoahPhaseTimings::Phase phase, ShenandoahPhaseTimings::ParPhase par_phase) :
@@ -56,14 +55,12 @@ void ShenandoahSerialRoot::oops_do(OopClosure* cl, uint worker_id) {

ShenandoahSerialRoots::ShenandoahSerialRoots(ShenandoahPhaseTimings::Phase phase) :
_universe_root(&Universe::oops_do, phase, ShenandoahPhaseTimings::UniverseRoots),
_object_synchronizer_root(&ObjectSynchronizer::oops_do, phase, ShenandoahPhaseTimings::ObjectSynchronizerRoots),
_management_root(&Management::oops_do, phase, ShenandoahPhaseTimings::ManagementRoots) {
_object_synchronizer_root(&ObjectSynchronizer::oops_do, phase, ShenandoahPhaseTimings::ObjectSynchronizerRoots) {
}

void ShenandoahSerialRoots::oops_do(OopClosure* cl, uint worker_id) {
_universe_root.oops_do(cl, worker_id);
_object_synchronizer_root.oops_do(cl, worker_id);
_management_root.oops_do(cl, worker_id);
}

ShenandoahWeakSerialRoot::ShenandoahWeakSerialRoot(ShenandoahWeakSerialRoot::WeakOopsDo weak_oops_do,
@@ -53,7 +53,6 @@ class ShenandoahSerialRoots {
private:
ShenandoahSerialRoot _universe_root;
ShenandoahSerialRoot _object_synchronizer_root;
ShenandoahSerialRoot _management_root;
public:
ShenandoahSerialRoots(ShenandoahPhaseTimings::Phase phase);
void oops_do(OopClosure* cl, uint worker_id);
@@ -39,7 +39,6 @@
#include "gc/shared/weakProcessor.inline.hpp"
#include "memory/universe.hpp"
#include "runtime/thread.hpp"
#include "services/management.hpp"
#include "utilities/debug.hpp"

// Check for overflow of number of root types.
@@ -77,7 +76,6 @@ void ShenandoahRootVerifier::oops_do(OopClosure* oops) {
if (verify(SerialRoots)) {
shenandoah_assert_safepoint();
Universe::oops_do(oops);
Management::oops_do(oops);
ObjectSynchronizer::oops_do(oops);
}

@@ -122,7 +120,6 @@ void ShenandoahRootVerifier::roots_do(OopClosure* oops) {
ClassLoaderDataGraph::cld_do(&clds);

Universe::oops_do(oops);
Management::oops_do(oops);
JNIHandles::oops_do(oops);
ObjectSynchronizer::oops_do(oops);
Universe::vm_global()->oops_do(oops);
@@ -149,7 +146,6 @@ void ShenandoahRootVerifier::strong_roots_do(OopClosure* oops) {
ClassLoaderDataGraph::roots_cld_do(&clds, NULL);

Universe::oops_do(oops);
Management::oops_do(oops);
JNIHandles::oops_do(oops);
ObjectSynchronizer::oops_do(oops);
Universe::vm_global()->oops_do(oops);
@@ -49,7 +49,6 @@
#include "runtime/synchronizer.hpp"
#include "runtime/thread.hpp"
#include "runtime/vmThread.hpp"
#include "services/management.hpp"
#include "utilities/debug.hpp"
#if INCLUDE_JFR
#include "jfr/jfr.hpp"
@@ -60,7 +59,6 @@ static const ZStatSubPhase ZSubPhasePauseRoots("Pause Roots");
static const ZStatSubPhase ZSubPhasePauseRootsTeardown("Pause Roots Teardown");
static const ZStatSubPhase ZSubPhasePauseRootsUniverse("Pause Roots Universe");
static const ZStatSubPhase ZSubPhasePauseRootsObjectSynchronizer("Pause Roots ObjectSynchronizer");
static const ZStatSubPhase ZSubPhasePauseRootsManagement("Pause Roots Management");
static const ZStatSubPhase ZSubPhasePauseRootsJVMTIWeakExport("Pause Roots JVMTIWeakExport");
static const ZStatSubPhase ZSubPhasePauseRootsVMThread("Pause Roots VM Thread");
static const ZStatSubPhase ZSubPhasePauseRootsJavaThreads("Pause Roots Java Threads");
@@ -193,7 +191,6 @@ ZRootsIterator::ZRootsIterator(bool visit_jvmti_weak_export) :
_java_threads_iter(),
_universe(this),
_object_synchronizer(this),
_management(this),
_jvmti_weak_export(this),
_vm_thread(this),
_java_threads(this),
@@ -230,11 +227,6 @@ void ZRootsIterator::do_object_synchronizer(ZRootsIteratorClosure* cl) {
ObjectSynchronizer::oops_do(cl);
}

void ZRootsIterator::do_management(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhasePauseRootsManagement);
Management::oops_do(cl);
}

void ZRootsIterator::do_jvmti_weak_export(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhasePauseRootsJVMTIWeakExport);
AlwaysTrueClosure always_alive;
@@ -262,7 +254,6 @@ void ZRootsIterator::oops_do(ZRootsIteratorClosure* cl) {
ZStatTimer timer(ZSubPhasePauseRoots);
_universe.oops_do(cl);
_object_synchronizer.oops_do(cl);
_management.oops_do(cl);
_vm_thread.oops_do(cl);
_java_threads.oops_do(cl);
if (!ClassUnloading) {
@@ -112,15 +112,13 @@ class ZRootsIterator {

void do_universe(ZRootsIteratorClosure* cl);
void do_object_synchronizer(ZRootsIteratorClosure* cl);
void do_management(ZRootsIteratorClosure* cl);
void do_jvmti_weak_export(ZRootsIteratorClosure* cl);
void do_vm_thread(ZRootsIteratorClosure* cl);
void do_java_threads(ZRootsIteratorClosure* cl);
void do_code_cache(ZRootsIteratorClosure* cl);

ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_universe> _universe;
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_object_synchronizer> _object_synchronizer;
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_management> _management;
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_jvmti_weak_export> _jvmti_weak_export;
ZSerialOopsDo<ZRootsIterator, &ZRootsIterator::do_vm_thread> _vm_thread;
ZParallelOopsDo<ZRootsIterator, &ZRootsIterator::do_java_threads> _java_threads;
@@ -75,7 +75,6 @@ void RootSetClosure<Delegate>::process() {
ObjectSynchronizer::oops_do(this);
Universe::oops_do(this);
OopStorageSet::strong_oops_do(this);
Management::oops_do(this);
AOTLoader::oops_do(this);
}

@@ -99,7 +99,6 @@ class ReferenceToRootClosure : public StackObj {
bool do_object_synchronizer_roots();
bool do_universe_roots();
bool do_oop_storage_roots();
bool do_management_roots();
bool do_string_table_roots();
bool do_aot_loader_roots();

@@ -164,13 +163,6 @@ bool ReferenceToRootClosure::do_oop_storage_roots() {
return false;
}

bool ReferenceToRootClosure::do_management_roots() {
assert(!complete(), "invariant");
ReferenceLocateClosure rlc(_callback, OldObjectRoot::_management, OldObjectRoot::_type_undetermined, NULL);
Management::oops_do(&rlc);
return rlc.complete();
}

bool ReferenceToRootClosure::do_aot_loader_roots() {
assert(!complete(), "invariant");
ReferenceLocateClosure rcl(_callback, OldObjectRoot::_aot, OldObjectRoot::_type_undetermined, NULL);
@@ -203,11 +195,6 @@ bool ReferenceToRootClosure::do_roots() {
return true;
}

if (do_management_roots()) {
_complete = true;
return true;
}

if (do_aot_loader_roots()) {
_complete = true;
return true;
@@ -58,8 +58,6 @@ const char* OldObjectRoot::system_description(System system) {
return "Object Monitor";
case _class_loader_data:
return "Class Loader Data";
case _management:
return "Management";
case _code_cache:
return "Code Cache";
case _aot:
@@ -38,7 +38,6 @@ class OldObjectRoot : public AllStatic {
_strong_oop_storage_set_last = _strong_oop_storage_set_first + OopStorageSet::strong_count - 1,
_object_synchronizer,
_class_loader_data,
_management,
_code_cache,
_aot,
JVMCI_ONLY(_jvmci COMMA)
@@ -25,17 +25,15 @@
#ifndef SHARE_OOPS_OOPHANDLE_HPP
#define SHARE_OOPS_OOPHANDLE_HPP

#include "metaprogramming/primitiveConversions.hpp"
#include "oops/oopsHierarchy.hpp"

class OopStorage;

// Simple class for encapsulating oop pointers stored in metadata.
// These are different from Handle. The Handle class stores pointers
// to oops on the stack, and manages the allocation from a thread local
// area in the constructor.
// This assumes that the caller will allocate the handle in the appropriate
// area. The reason for the encapsulation is to help with naming and to allow
// future uses for read barriers.
// Simple classes for wrapping oop and atomically accessed oop pointers
// stored in OopStorage, or stored in the ClassLoaderData handles area.
// These classes help with allocation, release, and NativeAccess loads and
// stores with the appropriate barriers.

class OopHandle {
friend class VMStructs;
@@ -56,4 +54,15 @@ class OopHandle {
oop* ptr_raw() const { return _obj; }
};

// Convert OopHandle to oop*

template<>
struct PrimitiveConversions::Translate<OopHandle> : public TrueType {
typedef OopHandle Value;
typedef oop* Decayed;

static Decayed decay(Value x) { return x.ptr_raw(); }
static Value recover(Decayed x) { return OopHandle(x); }
};

#endif // SHARE_OOPS_OOPHANDLE_HPP
@@ -47,9 +47,11 @@ inline OopHandle::OopHandle(OopStorage* storage, oop obj) :
}

inline void OopHandle::release(OopStorage* storage) {
// Clear the OopHandle first
NativeAccess<>::oop_store(_obj, (oop)NULL);
storage->release(_obj);
if (peek() != NULL) {
// Clear the OopHandle first
NativeAccess<>::oop_store(_obj, (oop)NULL);
storage->release(_obj);
}
}

#endif // SHARE_OOPS_OOPHANDLE_INLINE_HPP

0 comments on commit 754f03d

Please sign in to comment.
You can’t perform that action at this time.