mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-09 09:58:43 +00:00
8242211: Shenandoah: remove ShenandoahHeuristics::RegionData::_seqnum_last_alloc
Reviewed-by: rkennke
This commit is contained in:
parent
c4d01f8c8b
commit
185f372127
@ -42,26 +42,6 @@ int ShenandoahHeuristics::compare_by_garbage(RegionData a, RegionData b) {
|
||||
else return 0;
|
||||
}
|
||||
|
||||
int ShenandoahHeuristics::compare_by_garbage_then_alloc_seq_ascending(RegionData a, RegionData b) {
|
||||
int r = compare_by_garbage(a, b);
|
||||
if (r != 0) {
|
||||
return r;
|
||||
}
|
||||
return compare_by_alloc_seq_ascending(a, b);
|
||||
}
|
||||
|
||||
int ShenandoahHeuristics::compare_by_alloc_seq_ascending(RegionData a, RegionData b) {
|
||||
if (a._seqnum_last_alloc == b._seqnum_last_alloc)
|
||||
return 0;
|
||||
else if (a._seqnum_last_alloc < b._seqnum_last_alloc)
|
||||
return -1;
|
||||
else return 1;
|
||||
}
|
||||
|
||||
int ShenandoahHeuristics::compare_by_alloc_seq_descending(RegionData a, RegionData b) {
|
||||
return -compare_by_alloc_seq_ascending(a, b);
|
||||
}
|
||||
|
||||
ShenandoahHeuristics::ShenandoahHeuristics() :
|
||||
_region_data(NULL),
|
||||
_region_data_size(0),
|
||||
|
||||
@ -75,7 +75,6 @@ protected:
|
||||
typedef struct {
|
||||
ShenandoahHeapRegion* _region;
|
||||
size_t _garbage;
|
||||
uint64_t _seqnum_last_alloc;
|
||||
} RegionData;
|
||||
|
||||
RegionData* _region_data;
|
||||
@ -97,9 +96,6 @@ protected:
|
||||
ShenandoahSharedFlag _metaspace_oom;
|
||||
|
||||
static int compare_by_garbage(RegionData a, RegionData b);
|
||||
static int compare_by_garbage_then_alloc_seq_ascending(RegionData a, RegionData b);
|
||||
static int compare_by_alloc_seq_ascending(RegionData a, RegionData b);
|
||||
static int compare_by_alloc_seq_descending(RegionData a, RegionData b);
|
||||
|
||||
RegionData* get_region_data_cache(size_t num);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user