Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBing committed Jan 9, 2024
1 parent ac55436 commit 92a96cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
20 changes: 6 additions & 14 deletions src/hotspot/share/gc/serial/serialHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ void SerialHeap::do_collection(bool full,
CodeCache::on_gc_marking_cycle_start();

ClassUnloadingContext ctx(1 /* num_nmethod_unlink_workers */,
false /* unregister_nmethods_during_purge */,
false /* lock_codeblob_free_separately */);

collect_generation(_old_gen,
Expand Down Expand Up @@ -682,7 +683,11 @@ void SerialHeap::verify_nmethod(nmethod* nm) {
}

void SerialHeap::prune_scavengable_nmethods() {
ScavengableNMethods::prune_nmethods();
ScavengableNMethods::prune_nmethods_not_into_young();
}

void SerialHeap::prune_unlinked_nmethods() {
ScavengableNMethods::prune_unlinked_nmethods();
}

HeapWord* SerialHeap::satisfy_failed_allocation(size_t size, bool is_tlab) {
Expand Down Expand Up @@ -808,10 +813,6 @@ void SerialHeap::process_roots(ScanningOption so,
DEBUG_ONLY(ScavengableNMethods::asserted_non_scavengable_nmethods_do(&assert_code_is_non_scavengable));
}

void SerialHeap::gen_process_weak_roots(OopClosure* root_closure) {
WeakProcessor::oops_do(root_closure);
}

bool SerialHeap::no_allocs_since_save_marks() {
return _young_gen->no_allocs_since_save_marks() &&
_old_gen->no_allocs_since_save_marks();
Expand Down Expand Up @@ -1001,15 +1002,6 @@ void SerialHeap::save_marks() {
_old_gen->save_marks();
}

#if INCLUDE_SERIALGC
void SerialHeap::prepare_for_compaction() {
// Start by compacting into same gen.
CompactPoint cp(_old_gen);
_old_gen->prepare_for_compaction(&cp);
_young_gen->prepare_for_compaction(&cp);
}
#endif // INCLUDE_SERIALGC

void SerialHeap::verify(VerifyOption option /* ignored */) {
log_debug(gc, verify)("%s", _old_gen->name());
_old_gen->verify();
Expand Down
13 changes: 1 addition & 12 deletions src/hotspot/share/gc/serial/serialHeap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ class SerialHeap : public CollectedHeap {
void verify_nmethod(nmethod* nm) override;

void prune_scavengable_nmethods();
void prune_unlinked_nmethods();

// Iteration functions.
void object_iterate(ObjectClosure* cl) override;
Expand Down Expand Up @@ -305,11 +306,6 @@ class SerialHeap : public CollectedHeap {
CLDClosure* weak_cld_closure,
CodeBlobToOopClosure* code_roots);

// Apply "root_closure" to all the weak roots of the system.
// These include JNI weak roots, string table,
// and referents of reachable weak refs.
void gen_process_weak_roots(OopClosure* root_closure);

// Set the saved marks of generations, if that makes sense.
// In particular, if any generation might iterate over the oops
// in other generations, it should call this method.
Expand Down Expand Up @@ -353,13 +349,6 @@ class SerialHeap : public CollectedHeap {
HeapWord* mem_allocate_work(size_t size,
bool is_tlab);

#if INCLUDE_SERIALGC
// For use by mark-sweep. As implemented, mark-sweep-compact is global
// in an essential way: compaction is performed across generations, by
// iterating over spaces.
void prepare_for_compaction();
#endif

// Save the tops of the spaces in all generations
void record_gen_tops_before_GC() PRODUCT_RETURN;

Expand Down

0 comments on commit 92a96cc

Please sign in to comment.