File tree 1 file changed +1
-3
lines changed
src/hotspot/share/gc/shenandoah
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -1351,7 +1351,6 @@ void ShenandoahFreeSet::print_on(outputStream* out) const {
1351
1351
double ShenandoahFreeSet::internal_fragmentation () {
1352
1352
double squared = 0 ;
1353
1353
double linear = 0 ;
1354
- int count = 0 ;
1355
1354
1356
1355
idx_t rightmost = _partitions.rightmost (ShenandoahFreeSetPartitionId::Mutator);
1357
1356
for (idx_t index = _partitions.leftmost (ShenandoahFreeSetPartitionId::Mutator); index <= rightmost; ) {
@@ -1361,11 +1360,10 @@ double ShenandoahFreeSet::internal_fragmentation() {
1361
1360
size_t used = r->used ();
1362
1361
squared += used * used;
1363
1362
linear += used;
1364
- count++;
1365
1363
index = _partitions.find_index_of_next_available_region (ShenandoahFreeSetPartitionId::Mutator, index + 1 );
1366
1364
}
1367
1365
1368
- if (count > 0 ) {
1366
+ if (linear > 0 ) {
1369
1367
double s = squared / (ShenandoahHeapRegion::region_size_bytes () * linear);
1370
1368
return 1 - s;
1371
1369
} else {
You can’t perform that action at this time.
0 commit comments