Skip to content

Commit d60331a

Browse files
committedFeb 20, 2024
8326196: Serial: Remove SerialHeap::generation_iterate
Reviewed-by: tschatzl, kbarrett
1 parent beed414 commit d60331a

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed
 

‎src/hotspot/share/gc/serial/serialHeap.cpp

+2-21
Original file line numberDiff line numberDiff line change
@@ -950,17 +950,6 @@ void SerialHeap::prepare_for_verify() {
950950
ensure_parsability(false); // no need to retire TLABs
951951
}
952952

953-
void SerialHeap::generation_iterate(GenClosure* cl,
954-
bool old_to_young) {
955-
if (old_to_young) {
956-
cl->do_generation(_old_gen);
957-
cl->do_generation(_young_gen);
958-
} else {
959-
cl->do_generation(_young_gen);
960-
cl->do_generation(_old_gen);
961-
}
962-
}
963-
964953
bool SerialHeap::is_maximal_no_gc() const {
965954
// We don't expand young-gen except at a GC.
966955
return _old_gen->is_maximal_no_gc();
@@ -1058,18 +1047,10 @@ void SerialHeap::gc_epilogue(bool full) {
10581047
};
10591048

10601049
#ifndef PRODUCT
1061-
class GenGCSaveTopsBeforeGCClosure: public SerialHeap::GenClosure {
1062-
private:
1063-
public:
1064-
void do_generation(Generation* gen) {
1065-
gen->record_spaces_top();
1066-
}
1067-
};
1068-
10691050
void SerialHeap::record_gen_tops_before_GC() {
10701051
if (ZapUnusedHeapArea) {
1071-
GenGCSaveTopsBeforeGCClosure blk;
1072-
generation_iterate(&blk, false); // not old-to-young.
1052+
_young_gen->record_spaces_top();
1053+
_old_gen->record_spaces_top();
10731054
}
10741055
}
10751056
#endif // not PRODUCT

‎src/hotspot/share/gc/serial/serialHeap.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,6 @@ class SerialHeap : public CollectedHeap {
249249
virtual void do_generation(Generation* gen) = 0;
250250
};
251251

252-
// Apply "cl.do_generation" to all generations in the heap
253-
// If "old_to_young" determines the order.
254-
void generation_iterate(GenClosure* cl, bool old_to_young);
255-
256252
// Return "true" if all generations have reached the
257253
// maximal committed limit that they can reach, without a garbage
258254
// collection.

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Feb 20, 2024

@openjdk-notifier[bot]
Please sign in to comment.