mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6848641: CMSCollector::_roots_scanning_options should be initialized
The field is now initialized in the constructor. Reviewed-by: iveresov, jmasa, johnc
This commit is contained in:
parent
a720198e39
commit
9611174798
2 changed files with 6 additions and 5 deletions
|
@ -555,6 +555,7 @@ CMSCollector::CMSCollector(ConcurrentMarkSweepGeneration* cmsGen,
|
||||||
_collector_policy(cp),
|
_collector_policy(cp),
|
||||||
_should_unload_classes(false),
|
_should_unload_classes(false),
|
||||||
_concurrent_cycles_since_last_unload(0),
|
_concurrent_cycles_since_last_unload(0),
|
||||||
|
_roots_scanning_options(0),
|
||||||
_sweep_estimate(CMS_SweepWeight, CMS_SweepPadding)
|
_sweep_estimate(CMS_SweepWeight, CMS_SweepPadding)
|
||||||
{
|
{
|
||||||
if (ExplicitGCInvokesConcurrentAndUnloadsClasses) {
|
if (ExplicitGCInvokesConcurrentAndUnloadsClasses) {
|
||||||
|
|
|
@ -545,6 +545,11 @@ class CMSCollector: public CHeapObj {
|
||||||
bool unloaded_classes_last_cycle() const {
|
bool unloaded_classes_last_cycle() const {
|
||||||
return concurrent_cycles_since_last_unload() == 0;
|
return concurrent_cycles_since_last_unload() == 0;
|
||||||
}
|
}
|
||||||
|
// Root scanning options for perm gen
|
||||||
|
int _roots_scanning_options;
|
||||||
|
int roots_scanning_options() const { return _roots_scanning_options; }
|
||||||
|
void add_root_scanning_option(int o) { _roots_scanning_options |= o; }
|
||||||
|
void remove_root_scanning_option(int o) { _roots_scanning_options &= ~o; }
|
||||||
|
|
||||||
// Verification support
|
// Verification support
|
||||||
CMSBitMap _verification_mark_bm;
|
CMSBitMap _verification_mark_bm;
|
||||||
|
@ -719,11 +724,6 @@ class CMSCollector: public CHeapObj {
|
||||||
NOT_PRODUCT(bool simulate_overflow();) // sequential
|
NOT_PRODUCT(bool simulate_overflow();) // sequential
|
||||||
NOT_PRODUCT(bool par_simulate_overflow();) // MT version
|
NOT_PRODUCT(bool par_simulate_overflow();) // MT version
|
||||||
|
|
||||||
int _roots_scanning_options;
|
|
||||||
int roots_scanning_options() const { return _roots_scanning_options; }
|
|
||||||
void add_root_scanning_option(int o) { _roots_scanning_options |= o; }
|
|
||||||
void remove_root_scanning_option(int o) { _roots_scanning_options &= ~o; }
|
|
||||||
|
|
||||||
// CMS work methods
|
// CMS work methods
|
||||||
void checkpointRootsInitialWork(bool asynch); // initial checkpoint work
|
void checkpointRootsInitialWork(bool asynch); // initial checkpoint work
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue