mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +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
|
@ -941,9 +941,9 @@ size_t PSAdaptiveSizePolicy::promo_decrement(size_t cur_promo) {
|
|||
return promo_heap_delta;
|
||||
}
|
||||
|
||||
int PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
||||
uint PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
|
||||
bool is_survivor_overflow,
|
||||
int tenuring_threshold,
|
||||
uint tenuring_threshold,
|
||||
size_t survivor_limit) {
|
||||
assert(survivor_limit >= _intra_generation_alignment,
|
||||
"survivor_limit too small");
|
||||
|
|
|
@ -353,9 +353,9 @@ class PSAdaptiveSizePolicy : public AdaptiveSizePolicy {
|
|||
|
||||
// Calculates new survivor space size; returns a new tenuring threshold
|
||||
// value. Stores new survivor size in _survivor_size.
|
||||
int compute_survivor_space_size_and_threshold(bool is_survivor_overflow,
|
||||
int tenuring_threshold,
|
||||
size_t survivor_limit);
|
||||
uint compute_survivor_space_size_and_threshold(bool is_survivor_overflow,
|
||||
uint tenuring_threshold,
|
||||
size_t survivor_limit);
|
||||
|
||||
// Return the maximum size of a survivor space if the young generation were of
|
||||
// size gen_size.
|
||||
|
|
|
@ -85,7 +85,7 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
|
|||
|
||||
if (!promote_immediately) {
|
||||
// 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();
|
||||
|
||||
// Try allocating obj in to-space (unless too old)
|
||||
|
|
|
@ -59,7 +59,7 @@ int PSScavenge::_consecutive_skipped_scavenges = 0;
|
|||
ReferenceProcessor* PSScavenge::_ref_processor = NULL;
|
||||
CardTableExtension* PSScavenge::_card_table = NULL;
|
||||
bool PSScavenge::_survivor_overflow = false;
|
||||
int PSScavenge::_tenuring_threshold = 0;
|
||||
uint PSScavenge::_tenuring_threshold = 0;
|
||||
HeapWord* PSScavenge::_young_generation_boundary = NULL;
|
||||
elapsedTimer PSScavenge::_accumulated_time;
|
||||
Stack<markOop, mtGC> PSScavenge::_preserved_mark_stack;
|
||||
|
@ -529,7 +529,7 @@ bool PSScavenge::invoke_no_policy() {
|
|||
|
||||
if (PrintTenuringDistribution) {
|
||||
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(),
|
||||
_tenuring_threshold, MaxTenuringThreshold);
|
||||
}
|
||||
|
|
|
@ -66,14 +66,14 @@ class PSScavenge: AllStatic {
|
|||
static PSIsAliveClosure _is_alive_closure; // Closure used for reference processing
|
||||
static CardTableExtension* _card_table; // We cache the card table for fast access.
|
||||
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 HeapWord* _young_generation_boundary; // The lowest address possible for the young_gen.
|
||||
// This is used to decide if an oop should be scavenged,
|
||||
// cards should be marked, etc.
|
||||
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 CollectorCounters* _counters; // collector performance counters
|
||||
static CollectorCounters* _counters; // collector performance counters
|
||||
static bool _promotion_failed;
|
||||
|
||||
static void clean_up_failed_promotion();
|
||||
|
@ -88,7 +88,7 @@ class PSScavenge: AllStatic {
|
|||
|
||||
public:
|
||||
// Accessors
|
||||
static int tenuring_threshold() { return _tenuring_threshold; }
|
||||
static uint tenuring_threshold() { return _tenuring_threshold; }
|
||||
static elapsedTimer* accumulated_time() { return &_accumulated_time; }
|
||||
static bool promotion_failed() { return _promotion_failed; }
|
||||
static int consecutive_skipped_scavenges()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue