mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8000351: Tenuring threshold should be unsigned
Change the flags and variables related to tenuring threshold to be unsigned Reviewed-by: jmasa, johnc
This commit is contained in:
parent
88ab075a6d
commit
3506d44c57
22 changed files with 55 additions and 55 deletions
|
@ -1195,9 +1195,9 @@ void CMSAdaptiveSizePolicy::compute_tenured_generation_free_space(
|
||||||
set_promo_size(desired_promo_size);
|
set_promo_size(desired_promo_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
uint CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
||||||
bool is_survivor_overflow,
|
bool is_survivor_overflow,
|
||||||
int tenuring_threshold,
|
uint tenuring_threshold,
|
||||||
size_t survivor_limit) {
|
size_t survivor_limit) {
|
||||||
assert(survivor_limit >= generation_alignment(),
|
assert(survivor_limit >= generation_alignment(),
|
||||||
"survivor_limit too small");
|
"survivor_limit too small");
|
||||||
|
@ -1315,7 +1315,7 @@ int CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
||||||
|
|
||||||
gclog_or_tty->print( " avg_promoted_padded_avg: %f"
|
gclog_or_tty->print( " avg_promoted_padded_avg: %f"
|
||||||
" avg_pretenured_padded_avg: %f"
|
" avg_pretenured_padded_avg: %f"
|
||||||
" tenuring_thresh: %d"
|
" tenuring_thresh: %u"
|
||||||
" target_size: " SIZE_FORMAT
|
" target_size: " SIZE_FORMAT
|
||||||
" survivor_limit: " SIZE_FORMAT,
|
" survivor_limit: " SIZE_FORMAT,
|
||||||
gch->gc_stats(1)->avg_promoted()->padded_average(),
|
gch->gc_stats(1)->avg_promoted()->padded_average(),
|
||||||
|
|
|
@ -440,9 +440,9 @@ class CMSAdaptiveSizePolicy : public AdaptiveSizePolicy {
|
||||||
size_t max_eden_size);
|
size_t max_eden_size);
|
||||||
// Calculates new survivor space size; returns a new tenuring threshold
|
// Calculates new survivor space size; returns a new tenuring threshold
|
||||||
// value. Stores new survivor size in _survivor_size.
|
// value. Stores new survivor size in _survivor_size.
|
||||||
virtual int compute_survivor_space_size_and_threshold(
|
virtual uint compute_survivor_space_size_and_threshold(
|
||||||
bool is_survivor_overflow,
|
bool is_survivor_overflow,
|
||||||
int tenuring_threshold,
|
uint tenuring_threshold,
|
||||||
size_t survivor_limit);
|
size_t survivor_limit);
|
||||||
|
|
||||||
virtual void compute_tenured_generation_free_space(size_t cur_tenured_free,
|
virtual void compute_tenured_generation_free_space(size_t cur_tenured_free,
|
||||||
|
|
|
@ -840,8 +840,8 @@ private:
|
||||||
//
|
//
|
||||||
|
|
||||||
// Current tenuring threshold, set to 0 if the collector reaches the
|
// Current tenuring threshold, set to 0 if the collector reaches the
|
||||||
// maximum amount of suvivors regions.
|
// maximum amount of survivors regions.
|
||||||
int _tenuring_threshold;
|
uint _tenuring_threshold;
|
||||||
|
|
||||||
// The limit on the number of regions allocated for survivors.
|
// The limit on the number of regions allocated for survivors.
|
||||||
uint _max_survivor_regions;
|
uint _max_survivor_regions;
|
||||||
|
@ -851,7 +851,7 @@ private:
|
||||||
size_t _survivor_bytes_before_gc;
|
size_t _survivor_bytes_before_gc;
|
||||||
size_t _capacity_before_gc;
|
size_t _capacity_before_gc;
|
||||||
|
|
||||||
// The amount of survor regions after a collection.
|
// The amount of survivor regions after a collection.
|
||||||
uint _recorded_survivor_regions;
|
uint _recorded_survivor_regions;
|
||||||
// List of survivor regions.
|
// List of survivor regions.
|
||||||
HeapRegion* _recorded_survivor_head;
|
HeapRegion* _recorded_survivor_head;
|
||||||
|
@ -862,7 +862,7 @@ private:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
inline GCAllocPurpose
|
inline GCAllocPurpose
|
||||||
evacuation_destination(HeapRegion* src_region, int age, size_t word_sz) {
|
evacuation_destination(HeapRegion* src_region, uint age, size_t word_sz) {
|
||||||
if (age < _tenuring_threshold && src_region->is_young()) {
|
if (age < _tenuring_threshold && src_region->is_young()) {
|
||||||
return GCAllocForSurvived;
|
return GCAllocForSurvived;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -941,9 +941,9 @@ size_t PSAdaptiveSizePolicy::promo_decrement(size_t cur_promo) {
|
||||||
return promo_heap_delta;
|
return promo_heap_delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
uint PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
||||||
bool is_survivor_overflow,
|
bool is_survivor_overflow,
|
||||||
int tenuring_threshold,
|
uint tenuring_threshold,
|
||||||
size_t survivor_limit) {
|
size_t survivor_limit) {
|
||||||
assert(survivor_limit >= _intra_generation_alignment,
|
assert(survivor_limit >= _intra_generation_alignment,
|
||||||
"survivor_limit too small");
|
"survivor_limit too small");
|
||||||
|
|
|
@ -353,9 +353,9 @@ class PSAdaptiveSizePolicy : public AdaptiveSizePolicy {
|
||||||
|
|
||||||
// Calculates new survivor space size; returns a new tenuring threshold
|
// Calculates new survivor space size; returns a new tenuring threshold
|
||||||
// value. Stores new survivor size in _survivor_size.
|
// value. Stores new survivor size in _survivor_size.
|
||||||
int compute_survivor_space_size_and_threshold(bool is_survivor_overflow,
|
uint compute_survivor_space_size_and_threshold(bool is_survivor_overflow,
|
||||||
int tenuring_threshold,
|
uint tenuring_threshold,
|
||||||
size_t survivor_limit);
|
size_t survivor_limit);
|
||||||
|
|
||||||
// Return the maximum size of a survivor space if the young generation were of
|
// Return the maximum size of a survivor space if the young generation were of
|
||||||
// size gen_size.
|
// size gen_size.
|
||||||
|
|
|
@ -85,7 +85,7 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
|
||||||
|
|
||||||
if (!promote_immediately) {
|
if (!promote_immediately) {
|
||||||
// Find the objects age, MT safe.
|
// Find the objects age, MT safe.
|
||||||
int age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
|
uint age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
|
||||||
test_mark->displaced_mark_helper()->age() : test_mark->age();
|
test_mark->displaced_mark_helper()->age() : test_mark->age();
|
||||||
|
|
||||||
// Try allocating obj in to-space (unless too old)
|
// Try allocating obj in to-space (unless too old)
|
||||||
|
|
|
@ -59,7 +59,7 @@ int PSScavenge::_consecutive_skipped_scavenges = 0;
|
||||||
ReferenceProcessor* PSScavenge::_ref_processor = NULL;
|
ReferenceProcessor* PSScavenge::_ref_processor = NULL;
|
||||||
CardTableExtension* PSScavenge::_card_table = NULL;
|
CardTableExtension* PSScavenge::_card_table = NULL;
|
||||||
bool PSScavenge::_survivor_overflow = false;
|
bool PSScavenge::_survivor_overflow = false;
|
||||||
int PSScavenge::_tenuring_threshold = 0;
|
uint PSScavenge::_tenuring_threshold = 0;
|
||||||
HeapWord* PSScavenge::_young_generation_boundary = NULL;
|
HeapWord* PSScavenge::_young_generation_boundary = NULL;
|
||||||
elapsedTimer PSScavenge::_accumulated_time;
|
elapsedTimer PSScavenge::_accumulated_time;
|
||||||
Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack;
|
Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack;
|
||||||
|
@ -529,7 +529,7 @@ bool PSScavenge::invoke_no_policy() {
|
||||||
|
|
||||||
if (PrintTenuringDistribution) {
|
if (PrintTenuringDistribution) {
|
||||||
gclog_or_tty->cr();
|
gclog_or_tty->cr();
|
||||||
gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %d (max %d)",
|
gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %u (max %u)",
|
||||||
size_policy->calculated_survivor_size_in_bytes(),
|
size_policy->calculated_survivor_size_in_bytes(),
|
||||||
_tenuring_threshold, MaxTenuringThreshold);
|
_tenuring_threshold, MaxTenuringThreshold);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,14 +66,14 @@ class PSScavenge: AllStatic {
|
||||||
static PSIsAliveClosure _is_alive_closure; // Closure used for reference processing
|
static PSIsAliveClosure _is_alive_closure; // Closure used for reference processing
|
||||||
static CardTableExtension* _card_table; // We cache the card table for fast access.
|
static CardTableExtension* _card_table; // We cache the card table for fast access.
|
||||||
static bool _survivor_overflow; // Overflow this collection
|
static bool _survivor_overflow; // Overflow this collection
|
||||||
static int _tenuring_threshold; // tenuring threshold for next scavenge
|
static uint _tenuring_threshold; // tenuring threshold for next scavenge
|
||||||
static elapsedTimer _accumulated_time; // total time spent on scavenge
|
static elapsedTimer _accumulated_time; // total time spent on scavenge
|
||||||
static HeapWord* _young_generation_boundary; // The lowest address possible for the young_gen.
|
static HeapWord* _young_generation_boundary; // The lowest address possible for the young_gen.
|
||||||
// This is used to decide if an oop should be scavenged,
|
// This is used to decide if an oop should be scavenged,
|
||||||
// cards should be marked, etc.
|
// cards should be marked, etc.
|
||||||
static Stack<markOop, mtGC> _preserved_mark_stack; // List of marks to be restored after failed promotion
|
static Stack<markOop, mtGC> _preserved_mark_stack; // List of marks to be restored after failed promotion
|
||||||
static Stack<oop, mtGC> _preserved_oop_stack; // List of oops that need their mark restored.
|
static Stack<oop, mtGC> _preserved_oop_stack; // List of oops that need their mark restored.
|
||||||
static CollectorCounters* _counters; // collector performance counters
|
static CollectorCounters* _counters; // collector performance counters
|
||||||
static bool _promotion_failed;
|
static bool _promotion_failed;
|
||||||
|
|
||||||
static void clean_up_failed_promotion();
|
static void clean_up_failed_promotion();
|
||||||
|
@ -88,7 +88,7 @@ class PSScavenge: AllStatic {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Accessors
|
// Accessors
|
||||||
static int tenuring_threshold() { return _tenuring_threshold; }
|
static uint tenuring_threshold() { return _tenuring_threshold; }
|
||||||
static elapsedTimer* accumulated_time() { return &_accumulated_time; }
|
static elapsedTimer* accumulated_time() { return &_accumulated_time; }
|
||||||
static bool promotion_failed() { return _promotion_failed; }
|
static bool promotion_failed() { return _promotion_failed; }
|
||||||
static int consecutive_skipped_scavenges()
|
static int consecutive_skipped_scavenges()
|
||||||
|
|
|
@ -642,7 +642,7 @@ bool AdaptiveSizePolicy::print_adaptive_size_policy_on(outputStream* st) const {
|
||||||
|
|
||||||
bool AdaptiveSizePolicy::print_adaptive_size_policy_on(
|
bool AdaptiveSizePolicy::print_adaptive_size_policy_on(
|
||||||
outputStream* st,
|
outputStream* st,
|
||||||
int tenuring_threshold_arg) const {
|
uint tenuring_threshold_arg) const {
|
||||||
if (!AdaptiveSizePolicy::print_adaptive_size_policy_on(st)) {
|
if (!AdaptiveSizePolicy::print_adaptive_size_policy_on(st)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ bool AdaptiveSizePolicy::print_adaptive_size_policy_on(
|
||||||
assert(!tenuring_threshold_change(), "(no change was attempted)");
|
assert(!tenuring_threshold_change(), "(no change was attempted)");
|
||||||
}
|
}
|
||||||
if (tenuring_threshold_changed) {
|
if (tenuring_threshold_changed) {
|
||||||
st->print_cr("%d", tenuring_threshold_arg);
|
st->print_cr("%u", tenuring_threshold_arg);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -489,8 +489,8 @@ class AdaptiveSizePolicy : public CHeapObj<mtGC> {
|
||||||
|
|
||||||
// Printing support
|
// Printing support
|
||||||
virtual bool print_adaptive_size_policy_on(outputStream* st) const;
|
virtual bool print_adaptive_size_policy_on(outputStream* st) const;
|
||||||
bool print_adaptive_size_policy_on(outputStream* st, int
|
bool print_adaptive_size_policy_on(outputStream* st,
|
||||||
tenuring_threshold) const;
|
uint tenuring_threshold) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class that can be used to print information about the
|
// Class that can be used to print information about the
|
||||||
|
|
|
@ -78,10 +78,10 @@ void ageTable::merge_par(ageTable* subTable) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
|
uint ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
|
||||||
size_t desired_survivor_size = (size_t)((((double) survivor_capacity)*TargetSurvivorRatio)/100);
|
size_t desired_survivor_size = (size_t)((((double) survivor_capacity)*TargetSurvivorRatio)/100);
|
||||||
size_t total = 0;
|
size_t total = 0;
|
||||||
int age = 1;
|
uint age = 1;
|
||||||
assert(sizes[0] == 0, "no objects with age zero should be recorded");
|
assert(sizes[0] == 0, "no objects with age zero should be recorded");
|
||||||
while (age < table_size) {
|
while (age < table_size) {
|
||||||
total += sizes[age];
|
total += sizes[age];
|
||||||
|
@ -90,13 +90,13 @@ int ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
|
||||||
if (total > desired_survivor_size) break;
|
if (total > desired_survivor_size) break;
|
||||||
age++;
|
age++;
|
||||||
}
|
}
|
||||||
int result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold;
|
uint result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold;
|
||||||
|
|
||||||
if (PrintTenuringDistribution || UsePerfData) {
|
if (PrintTenuringDistribution || UsePerfData) {
|
||||||
|
|
||||||
if (PrintTenuringDistribution) {
|
if (PrintTenuringDistribution) {
|
||||||
gclog_or_tty->cr();
|
gclog_or_tty->cr();
|
||||||
gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %d (max %d)",
|
gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %u (max %u)",
|
||||||
desired_survivor_size*oopSize, result, MaxTenuringThreshold);
|
desired_survivor_size*oopSize, result, MaxTenuringThreshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ int ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
|
||||||
total += sizes[age];
|
total += sizes[age];
|
||||||
if (sizes[age] > 0) {
|
if (sizes[age] > 0) {
|
||||||
if (PrintTenuringDistribution) {
|
if (PrintTenuringDistribution) {
|
||||||
gclog_or_tty->print_cr("- age %3d: %10ld bytes, %10ld total",
|
gclog_or_tty->print_cr("- age %3u: %10ld bytes, %10ld total",
|
||||||
age, sizes[age]*oopSize, total*oopSize);
|
age, sizes[age]*oopSize, total*oopSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ class ageTable VALUE_OBJ_CLASS_SPEC {
|
||||||
|
|
||||||
// add entry
|
// add entry
|
||||||
void add(oop p, size_t oop_size) {
|
void add(oop p, size_t oop_size) {
|
||||||
int age = p->age();
|
uint age = p->age();
|
||||||
assert(age > 0 && age < table_size, "invalid age of object");
|
assert(age > 0 && age < table_size, "invalid age of object");
|
||||||
sizes[age] += oop_size;
|
sizes[age] += oop_size;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class ageTable VALUE_OBJ_CLASS_SPEC {
|
||||||
void merge_par(ageTable* subTable);
|
void merge_par(ageTable* subTable);
|
||||||
|
|
||||||
// calculate new tenuring threshold based on age information
|
// calculate new tenuring threshold based on age information
|
||||||
int compute_tenuring_threshold(size_t survivor_capacity);
|
uint compute_tenuring_threshold(size_t survivor_capacity);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PerfVariable* _perf_sizes[table_size];
|
PerfVariable* _perf_sizes[table_size];
|
||||||
|
|
|
@ -188,7 +188,7 @@ class GCAdaptivePolicyCounters : public GCPolicyCounters {
|
||||||
inline void update_survivor_overflowed(bool survivor_overflowed) {
|
inline void update_survivor_overflowed(bool survivor_overflowed) {
|
||||||
_survivor_overflowed_counter->set_value(survivor_overflowed);
|
_survivor_overflowed_counter->set_value(survivor_overflowed);
|
||||||
}
|
}
|
||||||
inline void update_tenuring_threshold(int threshold) {
|
inline void update_tenuring_threshold(uint threshold) {
|
||||||
tenuring_threshold()->set_value(threshold);
|
tenuring_threshold()->set_value(threshold);
|
||||||
}
|
}
|
||||||
inline void update_increment_tenuring_threshold_for_gc_cost() {
|
inline void update_increment_tenuring_threshold_for_gc_cost() {
|
||||||
|
|
|
@ -43,7 +43,7 @@ class DefNewGeneration: public Generation {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Generation* _next_gen;
|
Generation* _next_gen;
|
||||||
int _tenuring_threshold; // Tenuring threshold for next collection.
|
uint _tenuring_threshold; // Tenuring threshold for next collection.
|
||||||
ageTable _age_table;
|
ageTable _age_table;
|
||||||
// Size of object to pretenure in words; command line provides bytes
|
// Size of object to pretenure in words; command line provides bytes
|
||||||
size_t _pretenure_size_threshold_words;
|
size_t _pretenure_size_threshold_words;
|
||||||
|
@ -325,7 +325,7 @@ protected:
|
||||||
bool parallel = false);
|
bool parallel = false);
|
||||||
|
|
||||||
oop copy_to_survivor_space(oop old);
|
oop copy_to_survivor_space(oop old);
|
||||||
int tenuring_threshold() { return _tenuring_threshold; }
|
uint tenuring_threshold() { return _tenuring_threshold; }
|
||||||
|
|
||||||
// Performance Counter support
|
// Performance Counter support
|
||||||
void update_counters();
|
void update_counters();
|
||||||
|
|
|
@ -35,7 +35,7 @@ class GlobalTLABStats;
|
||||||
// the threads for allocation.
|
// the threads for allocation.
|
||||||
// It is thread-private at any time, but maybe multiplexed over
|
// It is thread-private at any time, but maybe multiplexed over
|
||||||
// time across multiple threads. The park()/unpark() pair is
|
// time across multiple threads. The park()/unpark() pair is
|
||||||
// used to make it avaiable for such multiplexing.
|
// used to make it available for such multiplexing.
|
||||||
class ThreadLocalAllocBuffer: public CHeapObj<mtThread> {
|
class ThreadLocalAllocBuffer: public CHeapObj<mtThread> {
|
||||||
friend class VMStructs;
|
friend class VMStructs;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -318,7 +318,7 @@ class markOopDesc: public oopDesc {
|
||||||
intptr_t tmp = (intptr_t) monitor;
|
intptr_t tmp = (intptr_t) monitor;
|
||||||
return (markOop) (tmp | monitor_value);
|
return (markOop) (tmp | monitor_value);
|
||||||
}
|
}
|
||||||
static markOop encode(JavaThread* thread, int age, int bias_epoch) {
|
static markOop encode(JavaThread* thread, uint age, int bias_epoch) {
|
||||||
intptr_t tmp = (intptr_t) thread;
|
intptr_t tmp = (intptr_t) thread;
|
||||||
assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer");
|
assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer");
|
||||||
assert(age <= max_age, "age too large");
|
assert(age <= max_age, "age too large");
|
||||||
|
@ -333,10 +333,10 @@ class markOopDesc: public oopDesc {
|
||||||
markOop set_marked() { return markOop((value() & ~lock_mask_in_place) | marked_value); }
|
markOop set_marked() { return markOop((value() & ~lock_mask_in_place) | marked_value); }
|
||||||
markOop set_unmarked() { return markOop((value() & ~lock_mask_in_place) | unlocked_value); }
|
markOop set_unmarked() { return markOop((value() & ~lock_mask_in_place) | unlocked_value); }
|
||||||
|
|
||||||
int age() const { return mask_bits(value() >> age_shift, age_mask); }
|
uint age() const { return mask_bits(value() >> age_shift, age_mask); }
|
||||||
markOop set_age(int v) const {
|
markOop set_age(uint v) const {
|
||||||
assert((v & ~age_mask) == 0, "shouldn't overflow age field");
|
assert((v & ~age_mask) == 0, "shouldn't overflow age field");
|
||||||
return markOop((value() & ~age_mask_in_place) | (((intptr_t)v & age_mask) << age_shift));
|
return markOop((value() & ~age_mask_in_place) | (((uintptr_t)v & age_mask) << age_shift));
|
||||||
}
|
}
|
||||||
markOop incr_age() const { return age() == max_age ? markOop(this) : set_age(age() + 1); }
|
markOop incr_age() const { return age() == max_age ? markOop(this) : set_age(age() + 1); }
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ class oopDesc {
|
||||||
oop forwardee() const;
|
oop forwardee() const;
|
||||||
|
|
||||||
// Age of object during scavenge
|
// Age of object during scavenge
|
||||||
int age() const;
|
uint age() const;
|
||||||
void incr_age();
|
void incr_age();
|
||||||
|
|
||||||
// Adjust all pointers in this object to point at it's forwarded location and
|
// Adjust all pointers in this object to point at it's forwarded location and
|
||||||
|
|
|
@ -693,7 +693,7 @@ inline void oopDesc::set_displaced_mark(markOop m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// The following method needs to be MT safe.
|
// The following method needs to be MT safe.
|
||||||
inline int oopDesc::age() const {
|
inline uint oopDesc::age() const {
|
||||||
assert(!is_forwarded(), "Attempt to read age from forwarded mark");
|
assert(!is_forwarded(), "Attempt to read age from forwarded mark");
|
||||||
if (has_displaced_mark()) {
|
if (has_displaced_mark()) {
|
||||||
return displaced_mark()->age();
|
return displaced_mark()->age();
|
||||||
|
|
|
@ -1112,7 +1112,7 @@ void Arguments::set_parnew_gc_flags() {
|
||||||
// AlwaysTenure flag should make ParNew promote all at first collection.
|
// AlwaysTenure flag should make ParNew promote all at first collection.
|
||||||
// See CR 6362902.
|
// See CR 6362902.
|
||||||
if (AlwaysTenure) {
|
if (AlwaysTenure) {
|
||||||
FLAG_SET_CMDLINE(intx, MaxTenuringThreshold, 0);
|
FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, 0);
|
||||||
}
|
}
|
||||||
// When using compressed oops, we use local overflow stacks,
|
// When using compressed oops, we use local overflow stacks,
|
||||||
// rather than using a global overflow list chained through
|
// rather than using a global overflow list chained through
|
||||||
|
@ -1231,7 +1231,7 @@ void Arguments::set_cms_and_parnew_gc_flags() {
|
||||||
// promote all objects surviving "tenuring_default" scavenges.
|
// promote all objects surviving "tenuring_default" scavenges.
|
||||||
if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
|
if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
|
||||||
FLAG_IS_DEFAULT(SurvivorRatio)) {
|
FLAG_IS_DEFAULT(SurvivorRatio)) {
|
||||||
FLAG_SET_ERGO(intx, MaxTenuringThreshold, tenuring_default);
|
FLAG_SET_ERGO(uintx, MaxTenuringThreshold, tenuring_default);
|
||||||
}
|
}
|
||||||
// If we decided above (or user explicitly requested)
|
// If we decided above (or user explicitly requested)
|
||||||
// `promote all' (via MaxTenuringThreshold := 0),
|
// `promote all' (via MaxTenuringThreshold := 0),
|
||||||
|
|
|
@ -154,7 +154,7 @@ static BiasedLocking::Condition revoke_bias(oop obj, bool allow_rebias, bool is_
|
||||||
return BiasedLocking::NOT_BIASED;
|
return BiasedLocking::NOT_BIASED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int age = mark->age();
|
uint age = mark->age();
|
||||||
markOop biased_prototype = markOopDesc::biased_locking_prototype()->set_age(age);
|
markOop biased_prototype = markOopDesc::biased_locking_prototype()->set_age(age);
|
||||||
markOop unbiased_prototype = markOopDesc::prototype()->set_age(age);
|
markOop unbiased_prototype = markOopDesc::prototype()->set_age(age);
|
||||||
|
|
||||||
|
|
|
@ -473,7 +473,7 @@ class CommandLineFlags {
|
||||||
develop(bool, CleanChunkPoolAsync, falseInEmbedded, \
|
develop(bool, CleanChunkPoolAsync, falseInEmbedded, \
|
||||||
"Whether to clean the chunk pool asynchronously") \
|
"Whether to clean the chunk pool asynchronously") \
|
||||||
\
|
\
|
||||||
/* Temporary: See 6948537 */ \
|
/* Temporary: See 6948537 */ \
|
||||||
experimental(bool, UseMemSetInBOT, true, \
|
experimental(bool, UseMemSetInBOT, true, \
|
||||||
"(Unstable) uses memset in BOT updates in GC code") \
|
"(Unstable) uses memset in BOT updates in GC code") \
|
||||||
\
|
\
|
||||||
|
@ -1626,7 +1626,7 @@ class CommandLineFlags {
|
||||||
"Use BinaryTreeDictionary as default in the CMS generation") \
|
"Use BinaryTreeDictionary as default in the CMS generation") \
|
||||||
\
|
\
|
||||||
product(uintx, CMSIndexedFreeListReplenish, 4, \
|
product(uintx, CMSIndexedFreeListReplenish, 4, \
|
||||||
"Replenish an indexed free list with this number of chunks") \
|
"Replenish an indexed free list with this number of chunks") \
|
||||||
\
|
\
|
||||||
product(bool, CMSReplenishIntermediate, true, \
|
product(bool, CMSReplenishIntermediate, true, \
|
||||||
"Replenish all intermediate free-list caches") \
|
"Replenish all intermediate free-list caches") \
|
||||||
|
@ -2052,7 +2052,7 @@ class CommandLineFlags {
|
||||||
product(uintx, TenuredGenerationSizeSupplementDecay, 2, \
|
product(uintx, TenuredGenerationSizeSupplementDecay, 2, \
|
||||||
"Decay factor to TenuredGenerationSizeIncrement") \
|
"Decay factor to TenuredGenerationSizeIncrement") \
|
||||||
\
|
\
|
||||||
product(uintx, MaxGCPauseMillis, max_uintx, \
|
product(uintx, MaxGCPauseMillis, max_uintx, \
|
||||||
"Adaptive size policy maximum GC pause time goal in msec, " \
|
"Adaptive size policy maximum GC pause time goal in msec, " \
|
||||||
"or (G1 Only) the max. GC time per MMU time slice") \
|
"or (G1 Only) the max. GC time per MMU time slice") \
|
||||||
\
|
\
|
||||||
|
@ -2266,7 +2266,7 @@ class CommandLineFlags {
|
||||||
develop(bool, TraceGCTaskQueue, false, \
|
develop(bool, TraceGCTaskQueue, false, \
|
||||||
"Trace actions of the GC task queues") \
|
"Trace actions of the GC task queues") \
|
||||||
\
|
\
|
||||||
diagnostic(bool, TraceGCTaskThread, false, \
|
diagnostic(bool, TraceGCTaskThread, false, \
|
||||||
"Trace actions of the GC task threads") \
|
"Trace actions of the GC task threads") \
|
||||||
\
|
\
|
||||||
product(bool, PrintParallelOldGCPhaseTimes, false, \
|
product(bool, PrintParallelOldGCPhaseTimes, false, \
|
||||||
|
@ -2781,7 +2781,7 @@ class CommandLineFlags {
|
||||||
product(intx, SafepointTimeoutDelay, 10000, \
|
product(intx, SafepointTimeoutDelay, 10000, \
|
||||||
"Delay in milliseconds for option SafepointTimeout") \
|
"Delay in milliseconds for option SafepointTimeout") \
|
||||||
\
|
\
|
||||||
product(intx, NmethodSweepFraction, 16, \
|
product(intx, NmethodSweepFraction, 16, \
|
||||||
"Number of invocations of sweeper to cover all nmethods") \
|
"Number of invocations of sweeper to cover all nmethods") \
|
||||||
\
|
\
|
||||||
product(intx, NmethodSweepCheckInterval, 5, \
|
product(intx, NmethodSweepCheckInterval, 5, \
|
||||||
|
@ -2904,7 +2904,7 @@ class CommandLineFlags {
|
||||||
"if non-zero, start verifying C heap after Nth call to " \
|
"if non-zero, start verifying C heap after Nth call to " \
|
||||||
"malloc/realloc/free") \
|
"malloc/realloc/free") \
|
||||||
\
|
\
|
||||||
product(intx, TypeProfileWidth, 2, \
|
product(intx, TypeProfileWidth, 2, \
|
||||||
"number of receiver types to record in call/cast profile") \
|
"number of receiver types to record in call/cast profile") \
|
||||||
\
|
\
|
||||||
develop(intx, BciProfileWidth, 2, \
|
develop(intx, BciProfileWidth, 2, \
|
||||||
|
@ -3012,10 +3012,10 @@ class CommandLineFlags {
|
||||||
product(uintx, MinHeapDeltaBytes, ScaleForWordSize(128*K), \
|
product(uintx, MinHeapDeltaBytes, ScaleForWordSize(128*K), \
|
||||||
"Min change in heap space due to GC (in bytes)") \
|
"Min change in heap space due to GC (in bytes)") \
|
||||||
\
|
\
|
||||||
product(uintx, MinMetaspaceExpansion, ScaleForWordSize(256*K), \
|
product(uintx, MinMetaspaceExpansion, ScaleForWordSize(256*K), \
|
||||||
"Min expansion of permanent heap (in bytes)") \
|
"Min expansion of permanent heap (in bytes)") \
|
||||||
\
|
\
|
||||||
product(uintx, MaxMetaspaceExpansion, ScaleForWordSize(4*M), \
|
product(uintx, MaxMetaspaceExpansion, ScaleForWordSize(4*M), \
|
||||||
"Max expansion of permanent heap without full GC (in bytes)") \
|
"Max expansion of permanent heap without full GC (in bytes)") \
|
||||||
\
|
\
|
||||||
product(intx, QueuedAllocationWarningCount, 0, \
|
product(intx, QueuedAllocationWarningCount, 0, \
|
||||||
|
@ -3028,10 +3028,10 @@ class CommandLineFlags {
|
||||||
diagnostic(intx, VerifyGCLevel, 0, \
|
diagnostic(intx, VerifyGCLevel, 0, \
|
||||||
"Generation level at which to start +VerifyBefore/AfterGC") \
|
"Generation level at which to start +VerifyBefore/AfterGC") \
|
||||||
\
|
\
|
||||||
product(intx, MaxTenuringThreshold, 15, \
|
product(uintx, MaxTenuringThreshold, 15, \
|
||||||
"Maximum value for tenuring threshold") \
|
"Maximum value for tenuring threshold") \
|
||||||
\
|
\
|
||||||
product(intx, InitialTenuringThreshold, 7, \
|
product(uintx, InitialTenuringThreshold, 7, \
|
||||||
"Initial value for tenuring threshold") \
|
"Initial value for tenuring threshold") \
|
||||||
\
|
\
|
||||||
product(intx, TargetSurvivorRatio, 50, \
|
product(intx, TargetSurvivorRatio, 50, \
|
||||||
|
|
|
@ -508,7 +508,7 @@ typedef TwoOopHashtable<Symbol*, mtClass> SymbolTwoOopHashtable;
|
||||||
nonstatic_field(ContiguousSpace, _saved_mark_word, HeapWord*) \
|
nonstatic_field(ContiguousSpace, _saved_mark_word, HeapWord*) \
|
||||||
\
|
\
|
||||||
nonstatic_field(DefNewGeneration, _next_gen, Generation*) \
|
nonstatic_field(DefNewGeneration, _next_gen, Generation*) \
|
||||||
nonstatic_field(DefNewGeneration, _tenuring_threshold, int) \
|
nonstatic_field(DefNewGeneration, _tenuring_threshold, uint) \
|
||||||
nonstatic_field(DefNewGeneration, _age_table, ageTable) \
|
nonstatic_field(DefNewGeneration, _age_table, ageTable) \
|
||||||
nonstatic_field(DefNewGeneration, _eden_space, EdenSpace*) \
|
nonstatic_field(DefNewGeneration, _eden_space, EdenSpace*) \
|
||||||
nonstatic_field(DefNewGeneration, _from_space, ContiguousSpace*) \
|
nonstatic_field(DefNewGeneration, _from_space, ContiguousSpace*) \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue