Skip to content

Commit

Permalink
8292708: Rename G1ParScanThreadState::flush to flush_stats
Browse files Browse the repository at this point in the history
Reviewed-by: iwalulya, shade
  • Loading branch information
Thomas Schatzl committed Aug 22, 2022
1 parent 16593cf commit dcd7802
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/gc/g1/g1ParScanThreadState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ G1ParScanThreadState::G1ParScanThreadState(G1CollectedHeap* g1h,
initialize_numa_stats();
}

size_t G1ParScanThreadState::flush(size_t* surviving_young_words, uint num_workers) {
size_t G1ParScanThreadState::flush_stats(size_t* surviving_young_words, uint num_workers) {
_rdc_local_qset.flush();
flush_numa_stats();
// Update allocation statistics.
Expand Down Expand Up @@ -579,7 +579,7 @@ const size_t* G1ParScanThreadStateSet::surviving_young_words() const {
return _surviving_young_words_total;
}

void G1ParScanThreadStateSet::flush() {
void G1ParScanThreadStateSet::flush_stats() {
assert(!_flushed, "thread local state from the per thread states should be flushed once");

for (uint worker_id = 0; worker_id < _n_workers; ++worker_id) {
Expand All @@ -592,7 +592,7 @@ void G1ParScanThreadStateSet::flush() {
// because it resets the PLAB allocator where we get this info from.
size_t lab_waste_bytes = pss->lab_waste_words() * HeapWordSize;
size_t lab_undo_waste_bytes = pss->lab_undo_waste_words() * HeapWordSize;
size_t copied_bytes = pss->flush(_surviving_young_words_total, _n_workers) * HeapWordSize;
size_t copied_bytes = pss->flush_stats(_surviving_young_words_total, _n_workers) * HeapWordSize;

p->record_or_add_thread_work_item(G1GCPhaseTimes::MergePSS, worker_id, copied_bytes, G1GCPhaseTimes::MergePSSCopiedBytes);
p->record_or_add_thread_work_item(G1GCPhaseTimes::MergePSS, worker_id, lab_waste_bytes, G1GCPhaseTimes::MergePSSLABWasteBytes);
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/g1/g1ParScanThreadState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class G1ParScanThreadState : public CHeapObj<mtGC> {

// Pass locally gathered statistics to global state. Returns the total number of
// HeapWords copied.
size_t flush(size_t* surviving_young_words, uint num_workers);
size_t flush_stats(size_t* surviving_young_words, uint num_workers);

private:
void do_partial_array(PartialArrayScanTask task);
Expand Down Expand Up @@ -252,7 +252,7 @@ class G1ParScanThreadStateSet : public StackObj {
G1RedirtyCardsQueueSet* rdcqs() { return _rdcqs; }
PreservedMarksSet* preserved_marks_set() { return _preserved_marks_set; }

void flush();
void flush_stats();
void record_unused_optional_region(HeapRegion* hr);

G1ParScanThreadState* state_for_worker(uint worker_id);
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class G1PostEvacuateCollectionSetCleanupTask1::MergePssTask : public G1AbstractS

double worker_cost() const override { return 1.0; }

void do_work(uint worker_id) override { _per_thread_states->flush(); }
void do_work(uint worker_id) override { _per_thread_states->flush_stats(); }
};

class G1PostEvacuateCollectionSetCleanupTask1::RecalculateUsedTask : public G1AbstractSubTask {
Expand Down

1 comment on commit dcd7802

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.