< prev index next >
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
Print this page
rev 60637 : 8252141: Rename G1YoungRemSetSamplingThread to better reflect its purpose
Reviewed-by:
*** 61,71 ****
#include "gc/g1/g1SATBMarkQueueSet.hpp"
#include "gc/g1/g1StringDedup.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/g1Trace.hpp"
#include "gc/g1/g1YCTypes.hpp"
! #include "gc/g1/g1YoungRemSetSamplingThread.hpp"
#include "gc/g1/g1VMOperations.hpp"
#include "gc/g1/heapRegion.inline.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "gc/g1/heapRegionSet.inline.hpp"
#include "gc/shared/concurrentGCBreakpoints.hpp"
--- 61,71 ----
#include "gc/g1/g1SATBMarkQueueSet.hpp"
#include "gc/g1/g1StringDedup.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/g1Trace.hpp"
#include "gc/g1/g1YCTypes.hpp"
! #include "gc/g1/g1ServiceThread.hpp"
#include "gc/g1/g1VMOperations.hpp"
#include "gc/g1/heapRegion.inline.hpp"
#include "gc/g1/heapRegionRemSet.hpp"
#include "gc/g1/heapRegionSet.inline.hpp"
#include "gc/shared/concurrentGCBreakpoints.hpp"
*** 1416,1426 ****
const char* get_description() { return "Humongous Regions"; }
};
G1CollectedHeap::G1CollectedHeap() :
CollectedHeap(),
! _young_gen_sampling_thread(NULL),
_workers(NULL),
_card_table(NULL),
_collection_pause_end(Ticks::now()),
_soft_ref_policy(),
_old_set("Old Region Set", new OldRegionSetChecker()),
--- 1416,1426 ----
const char* get_description() { return "Humongous Regions"; }
};
G1CollectedHeap::G1CollectedHeap() :
CollectedHeap(),
! _service_thread(NULL),
_workers(NULL),
_card_table(NULL),
_collection_pause_end(Ticks::now()),
_soft_ref_policy(),
_old_set("Old Region Set", new OldRegionSetChecker()),
*** 1553,1566 ****
jint ecode = JNI_OK;
_cr = G1ConcurrentRefine::create(&ecode);
return ecode;
}
! jint G1CollectedHeap::initialize_young_gen_sampling_thread() {
! _young_gen_sampling_thread = new G1YoungRemSetSamplingThread();
! if (_young_gen_sampling_thread->osthread() == NULL) {
! vm_shutdown_during_initialization("Could not create G1YoungRemSetSamplingThread");
return JNI_ENOMEM;
}
return JNI_OK;
}
--- 1553,1566 ----
jint ecode = JNI_OK;
_cr = G1ConcurrentRefine::create(&ecode);
return ecode;
}
! jint G1CollectedHeap::initialize_service_thread() {
! _service_thread = new G1ServiceThread();
! if (_service_thread->osthread() == NULL) {
! vm_shutdown_during_initialization("Could not create G1ServiceThread");
return JNI_ENOMEM;
}
return JNI_OK;
}
*** 1730,1740 ****
jint ecode = initialize_concurrent_refinement();
if (ecode != JNI_OK) {
return ecode;
}
! ecode = initialize_young_gen_sampling_thread();
if (ecode != JNI_OK) {
return ecode;
}
{
--- 1730,1740 ----
jint ecode = initialize_concurrent_refinement();
if (ecode != JNI_OK) {
return ecode;
}
! ecode = initialize_service_thread();
if (ecode != JNI_OK) {
return ecode;
}
{
*** 1776,1786 ****
void G1CollectedHeap::stop() {
// Stop all concurrent threads. We do this to make sure these threads
// do not continue to execute and access resources (e.g. logging)
// that are destroyed during shutdown.
_cr->stop();
! _young_gen_sampling_thread->stop();
_cm_thread->stop();
if (G1StringDedup::is_enabled()) {
G1StringDedup::stop();
}
}
--- 1776,1786 ----
void G1CollectedHeap::stop() {
// Stop all concurrent threads. We do this to make sure these threads
// do not continue to execute and access resources (e.g. logging)
// that are destroyed during shutdown.
_cr->stop();
! _service_thread->stop();
_cm_thread->stop();
if (G1StringDedup::is_enabled()) {
G1StringDedup::stop();
}
}
*** 2531,2541 ****
void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const {
workers()->threads_do(tc);
tc->do_thread(_cm_thread);
_cm->threads_do(tc);
_cr->threads_do(tc);
! tc->do_thread(_young_gen_sampling_thread);
if (G1StringDedup::is_enabled()) {
G1StringDedup::threads_do(tc);
}
}
--- 2531,2541 ----
void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const {
workers()->threads_do(tc);
tc->do_thread(_cm_thread);
_cm->threads_do(tc);
_cr->threads_do(tc);
! tc->do_thread(_service_thread);
if (G1StringDedup::is_enabled()) {
G1StringDedup::threads_do(tc);
}
}
< prev index next >