Skip to content

Commit 5df2648

Browse files
author
Hamlin Li
committedSep 9, 2021
8273218: G1: Rename g1EvacuationInfo to g1EvacInfo
Reviewed-by: tschatzl, ayang
1 parent 12f0b77 commit 5df2648

9 files changed

+40
-40
lines changed
 

‎src/hotspot/share/gc/g1/g1Allocator.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#include "precompiled.hpp"
2626
#include "gc/g1/g1Allocator.inline.hpp"
2727
#include "gc/g1/g1AllocRegion.inline.hpp"
28+
#include "gc/g1/g1EvacInfo.hpp"
2829
#include "gc/g1/g1EvacStats.inline.hpp"
29-
#include "gc/g1/g1EvacuationInfo.hpp"
3030
#include "gc/g1/g1CollectedHeap.inline.hpp"
3131
#include "gc/g1/g1NUMA.hpp"
3232
#include "gc/g1/g1Policy.hpp"
@@ -91,7 +91,7 @@ bool G1Allocator::is_retained_old_region(HeapRegion* hr) {
9191
return _retained_old_gc_alloc_region == hr;
9292
}
9393

94-
void G1Allocator::reuse_retained_old_region(G1EvacuationInfo* evacuation_info,
94+
void G1Allocator::reuse_retained_old_region(G1EvacInfo* evacuation_info,
9595
OldGCAllocRegion* old,
9696
HeapRegion** retained_old) {
9797
HeapRegion* retained_region = *retained_old;
@@ -124,7 +124,7 @@ void G1Allocator::reuse_retained_old_region(G1EvacuationInfo* evacuation_info,
124124
}
125125
}
126126

127-
void G1Allocator::init_gc_alloc_regions(G1EvacuationInfo* evacuation_info) {
127+
void G1Allocator::init_gc_alloc_regions(G1EvacInfo* evacuation_info) {
128128
assert_at_safepoint_on_vm_thread();
129129

130130
_survivor_is_full = false;
@@ -140,7 +140,7 @@ void G1Allocator::init_gc_alloc_regions(G1EvacuationInfo* evacuation_info) {
140140
&_retained_old_gc_alloc_region);
141141
}
142142

143-
void G1Allocator::release_gc_alloc_regions(G1EvacuationInfo* evacuation_info) {
143+
void G1Allocator::release_gc_alloc_regions(G1EvacInfo* evacuation_info) {
144144
uint survivor_region_count = 0;
145145
for (uint node_index = 0; node_index < _num_alloc_regions; node_index++) {
146146
survivor_region_count += survivor_gc_alloc_region(node_index)->count();

‎src/hotspot/share/gc/g1/g1Allocator.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "gc/shared/collectedHeap.hpp"
3131
#include "gc/shared/plab.hpp"
3232

33-
class G1EvacuationInfo;
33+
class G1EvacInfo;
3434
class G1NUMA;
3535

3636
// Interface to keep track of which regions G1 is currently allocating into. Provides
@@ -68,7 +68,7 @@ class G1Allocator : public CHeapObj<mtGC> {
6868
void set_survivor_full();
6969
void set_old_full();
7070

71-
void reuse_retained_old_region(G1EvacuationInfo* evacuation_info,
71+
void reuse_retained_old_region(G1EvacInfo* evacuation_info,
7272
OldGCAllocRegion* old,
7373
HeapRegion** retained);
7474

@@ -105,8 +105,8 @@ class G1Allocator : public CHeapObj<mtGC> {
105105
void init_mutator_alloc_regions();
106106
void release_mutator_alloc_regions();
107107

108-
void init_gc_alloc_regions(G1EvacuationInfo* evacuation_info);
109-
void release_gc_alloc_regions(G1EvacuationInfo* evacuation_info);
108+
void init_gc_alloc_regions(G1EvacInfo* evacuation_info);
109+
void release_gc_alloc_regions(G1EvacInfo* evacuation_info);
110110
void abandon_gc_alloc_regions();
111111
bool is_retained_old_region(HeapRegion* hr);
112112

‎src/hotspot/share/gc/g1/g1EvacuationInfo.hpp ‎src/hotspot/share/gc/g1/g1EvacInfo.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -22,12 +22,12 @@
2222
*
2323
*/
2424

25-
#ifndef SHARE_GC_G1_G1EVACUATIONINFO_HPP
26-
#define SHARE_GC_G1_G1EVACUATIONINFO_HPP
25+
#ifndef SHARE_GC_G1_G1EVACINFO_HPP
26+
#define SHARE_GC_G1_G1EVACINFO_HPP
2727

2828
#include "memory/allocation.hpp"
2929

30-
class G1EvacuationInfo : public StackObj {
30+
class G1EvacInfo : public StackObj {
3131
uint _collectionset_regions;
3232
uint _allocation_regions;
3333
size_t _collectionset_used_before;
@@ -37,7 +37,7 @@ class G1EvacuationInfo : public StackObj {
3737
uint _regions_freed;
3838

3939
public:
40-
G1EvacuationInfo() :
40+
G1EvacInfo() :
4141
_collectionset_regions(0), _allocation_regions(0), _collectionset_used_before(0),
4242
_collectionset_used_after(0), _alloc_regions_used_before(0),
4343
_bytes_used(0), _regions_freed(0) { }
@@ -79,4 +79,4 @@ class G1EvacuationInfo : public StackObj {
7979
uint regions_freed() { return _regions_freed; }
8080
};
8181

82-
#endif // SHARE_GC_G1_G1EVACUATIONINFO_HPP
82+
#endif // SHARE_GC_G1_G1EVACINFO_HPP

‎src/hotspot/share/gc/g1/g1Trace.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424

2525
#include "precompiled.hpp"
26-
#include "gc/g1/g1EvacuationInfo.hpp"
26+
#include "gc/g1/g1EvacInfo.hpp"
2727
#include "gc/g1/g1HeapRegionTraceType.hpp"
2828
#include "gc/g1/g1Trace.hpp"
2929
#include "gc/g1/g1GCPauseType.hpp"
@@ -83,7 +83,7 @@ void G1NewTracer::report_gc_end_impl(const Ticks& timestamp, TimePartitions* tim
8383
send_g1_young_gc_event();
8484
}
8585

86-
void G1NewTracer::report_evacuation_info(G1EvacuationInfo* info) {
86+
void G1NewTracer::report_evacuation_info(G1EvacInfo* info) {
8787
send_evacuation_info_event(info);
8888
}
8989

@@ -141,7 +141,7 @@ void G1NewTracer::send_g1_young_gc_event() {
141141
}
142142
}
143143

144-
void G1NewTracer::send_evacuation_info_event(G1EvacuationInfo* info) {
144+
void G1NewTracer::send_evacuation_info_event(G1EvacInfo* info) {
145145
EventEvacuationInformation e;
146146
if (e.should_commit()) {
147147
e.set_gcId(GCId::current());

‎src/hotspot/share/gc/g1/g1Trace.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "gc/g1/g1GCPauseType.hpp"
2929
#include "gc/shared/gcTrace.hpp"
3030

31-
class G1EvacuationInfo;
31+
class G1EvacInfo;
3232
class G1HeapSummary;
3333
class G1EvacSummary;
3434

@@ -45,7 +45,7 @@ class G1NewTracer : public YoungGCTracer {
4545
void initialize();
4646
void report_young_gc_pause(G1GCPauseType pause);
4747
void report_gc_end_impl(const Ticks& timestamp, TimePartitions* time_partitions);
48-
void report_evacuation_info(G1EvacuationInfo* info);
48+
void report_evacuation_info(G1EvacInfo* info);
4949
void report_evacuation_failed(EvacuationFailedInfo& ef_info);
5050

5151
void report_evacuation_statistics(const G1EvacSummary& young_summary, const G1EvacSummary& old_summary) const;
@@ -65,7 +65,7 @@ class G1NewTracer : public YoungGCTracer {
6565
bool prediction_active);
6666
private:
6767
void send_g1_young_gc_event();
68-
void send_evacuation_info_event(G1EvacuationInfo* info);
68+
void send_evacuation_info_event(G1EvacInfo* info);
6969
void send_evacuation_failed_event(const EvacuationFailedInfo& ef_info) const;
7070

7171
void send_young_evacuation_statistics(const G1EvacSummary& summary) const;

‎src/hotspot/share/gc/g1/g1YoungCollector.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "gc/g1/g1ConcurrentMark.hpp"
3434
#include "gc/g1/g1GCPhaseTimes.hpp"
3535
#include "gc/g1/g1YoungGCEvacFailureInjector.hpp"
36-
#include "gc/g1/g1EvacuationInfo.hpp"
36+
#include "gc/g1/g1EvacInfo.hpp"
3737
#include "gc/g1/g1HRPrinter.hpp"
3838
#include "gc/g1/g1HotCardCache.hpp"
3939
#include "gc/g1/g1MonitoringSupport.hpp"
@@ -146,13 +146,13 @@ class G1YoungGCNotifyPauseMark : public StackObj {
146146
};
147147

148148
class G1YoungGCJFRTracerMark : public G1JFRTracerMark {
149-
G1EvacuationInfo _evacuation_info;
149+
G1EvacInfo _evacuation_info;
150150

151151
G1NewTracer* tracer() const { return (G1NewTracer*)_tracer; }
152152

153153
public:
154154

155-
G1EvacuationInfo* evacuation_info() { return &_evacuation_info; }
155+
G1EvacInfo* evacuation_info() { return &_evacuation_info; }
156156

157157
G1YoungGCJFRTracerMark(STWGCTimer* gc_timer_stw, G1NewTracer* gc_tracer_stw, GCCause::Cause cause) :
158158
G1JFRTracerMark(gc_timer_stw, gc_tracer_stw), _evacuation_info() { }
@@ -288,7 +288,7 @@ class G1PrintCollectionSetClosure : public HeapRegionClosure {
288288
}
289289
};
290290

291-
void G1YoungCollector::calculate_collection_set(G1EvacuationInfo* evacuation_info, double target_pause_time_ms) {
291+
void G1YoungCollector::calculate_collection_set(G1EvacInfo* evacuation_info, double target_pause_time_ms) {
292292
// Forget the current allocation region (we might even choose it to be part
293293
// of the collection set!) before finalizing the collection set.
294294
allocator()->release_mutator_alloc_regions();
@@ -492,7 +492,7 @@ void G1YoungCollector::set_young_collection_default_active_worker_threads(){
492492
log_info(gc,task)("Using %u workers of %u for evacuation", active_workers, workers()->total_workers());
493493
}
494494

495-
void G1YoungCollector::pre_evacuate_collection_set(G1EvacuationInfo* evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
495+
void G1YoungCollector::pre_evacuate_collection_set(G1EvacInfo* evacuation_info, G1ParScanThreadStateSet* per_thread_states) {
496496
// Please see comment in g1CollectedHeap.hpp and
497497
// G1CollectedHeap::ref_processing_init() to see how
498498
// reference processing currently works in G1.
@@ -962,7 +962,7 @@ void G1YoungCollector::post_evacuate_cleanup_1(G1ParScanThreadStateSet* per_thre
962962
}
963963

964964
void G1YoungCollector::post_evacuate_cleanup_2(G1ParScanThreadStateSet* per_thread_states,
965-
G1EvacuationInfo* evacuation_info) {
965+
G1EvacInfo* evacuation_info) {
966966
Ticks start = Ticks::now();
967967
{
968968
G1PostEvacuateCollectionSetCleanupTask2 cl(per_thread_states, evacuation_info, _evac_failure_regions);
@@ -971,7 +971,7 @@ void G1YoungCollector::post_evacuate_cleanup_2(G1ParScanThreadStateSet* per_thre
971971
phase_times()->record_post_evacuate_cleanup_task_2_time((Ticks::now() - start).seconds() * 1000.0);
972972
}
973973

974-
void G1YoungCollector::post_evacuate_collection_set(G1EvacuationInfo* evacuation_info,
974+
void G1YoungCollector::post_evacuate_collection_set(G1EvacInfo* evacuation_info,
975975
G1ParScanThreadStateSet* per_thread_states) {
976976
G1GCPhaseTimes* p = phase_times();
977977

‎src/hotspot/share/gc/g1/g1YoungCollector.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class G1CollectionSet;
3838
class G1CollectorState;
3939
class G1ConcurrentMark;
4040
class G1EvacFailureRegions;
41-
class G1EvacuationInfo;
41+
class G1EvacInfo;
4242
class G1GCPhaseTimes;
4343
class G1HotCardCache;
4444
class G1HRPrinter;
@@ -88,11 +88,11 @@ class G1YoungCollector {
8888

8989
void wait_for_root_region_scanning();
9090

91-
void calculate_collection_set(G1EvacuationInfo* evacuation_info, double target_pause_time_ms);
91+
void calculate_collection_set(G1EvacInfo* evacuation_info, double target_pause_time_ms);
9292

9393
void set_young_collection_default_active_worker_threads();
9494

95-
void pre_evacuate_collection_set(G1EvacuationInfo* evacuation_info, G1ParScanThreadStateSet* pss);
95+
void pre_evacuate_collection_set(G1EvacInfo* evacuation_info, G1ParScanThreadStateSet* pss);
9696
// Actually do the work of evacuating the parts of the collection set.
9797
// The has_optional_evacuation_work flag for the initial collection set
9898
// evacuation indicates whether one or more optional evacuation steps may
@@ -119,9 +119,9 @@ class G1YoungCollector {
119119
void process_discovered_references(G1ParScanThreadStateSet* per_thread_states);
120120
void post_evacuate_cleanup_1(G1ParScanThreadStateSet* per_thread_states);
121121
void post_evacuate_cleanup_2(G1ParScanThreadStateSet* per_thread_states,
122-
G1EvacuationInfo* evacuation_info);
122+
G1EvacInfo* evacuation_info);
123123

124-
void post_evacuate_collection_set(G1EvacuationInfo* evacuation_info,
124+
void post_evacuate_collection_set(G1EvacInfo* evacuation_info,
125125
G1ParScanThreadStateSet* per_thread_states);
126126

127127
G1EvacFailureRegions* _evac_failure_regions;

‎src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "gc/g1/g1CollectionSetCandidates.hpp"
3232
#include "gc/g1/g1ConcurrentMark.inline.hpp"
3333
#include "gc/g1/g1EvacStats.inline.hpp"
34-
#include "gc/g1/g1EvacuationInfo.hpp"
34+
#include "gc/g1/g1EvacInfo.hpp"
3535
#include "gc/g1/g1ParScanThreadState.hpp"
3636
#include "gc/g1/g1RemSet.hpp"
3737
#include "gc/g1/g1YoungGCPostEvacuateTasks.hpp"
@@ -394,7 +394,7 @@ class FreeCSetStats {
394394
_regions_freed += other->_regions_freed;
395395
}
396396

397-
void report(G1CollectedHeap* g1h, G1EvacuationInfo* evacuation_info) {
397+
void report(G1CollectedHeap* g1h, G1EvacInfo* evacuation_info) {
398398
evacuation_info->set_regions_freed(_regions_freed);
399399
evacuation_info->increment_collectionset_used_after(_after_used_bytes);
400400

@@ -576,7 +576,7 @@ void G1PostEvacuateCollectionSetCleanupTask2::FreeCollectionSetTask::report_stat
576576
}
577577

578578
G1PostEvacuateCollectionSetCleanupTask2::
579-
FreeCollectionSetTask::FreeCollectionSetTask(G1EvacuationInfo* evacuation_info,
579+
FreeCollectionSetTask::FreeCollectionSetTask(G1EvacInfo* evacuation_info,
580580
const size_t* surviving_young_words,
581581
G1EvacFailureRegions* evac_failure_regions) :
582582
G1AbstractSubTask(G1GCPhaseTimes::FreeCollectionSet),
@@ -622,7 +622,7 @@ void G1PostEvacuateCollectionSetCleanupTask2::FreeCollectionSetTask::do_work(uin
622622
}
623623

624624
G1PostEvacuateCollectionSetCleanupTask2::G1PostEvacuateCollectionSetCleanupTask2(G1ParScanThreadStateSet* per_thread_states,
625-
G1EvacuationInfo* evacuation_info,
625+
G1EvacInfo* evacuation_info,
626626
G1EvacFailureRegions* evac_failure_regions) :
627627
G1BatchedGangTask("Post Evacuate Cleanup 2", G1CollectedHeap::heap()->phase_times())
628628
{

‎src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class FreeCSetStats;
3232

3333
class G1CollectedHeap;
3434
class G1EvacFailureRegions;
35-
class G1EvacuationInfo;
35+
class G1EvacInfo;
3636
class G1ParScanThreadStateSet;
3737
class G1RedirtyCardsQueueSet;
3838

@@ -117,7 +117,7 @@ class G1PostEvacuateCollectionSetCleanupTask2 : public G1BatchedGangTask {
117117

118118
public:
119119
G1PostEvacuateCollectionSetCleanupTask2(G1ParScanThreadStateSet* per_thread_states,
120-
G1EvacuationInfo* evacuation_info,
120+
G1EvacInfo* evacuation_info,
121121
G1EvacFailureRegions* evac_failure_regions);
122122
};
123123

@@ -190,7 +190,7 @@ class G1PostEvacuateCollectionSetCleanupTask2::RedirtyLoggedCardsTask : public G
190190

191191
class G1PostEvacuateCollectionSetCleanupTask2::FreeCollectionSetTask : public G1AbstractSubTask {
192192
G1CollectedHeap* _g1h;
193-
G1EvacuationInfo* _evacuation_info;
193+
G1EvacInfo* _evacuation_info;
194194
FreeCSetStats* _worker_stats;
195195
HeapRegionClaimer _claimer;
196196
const size_t* _surviving_young_words;
@@ -201,7 +201,7 @@ class G1PostEvacuateCollectionSetCleanupTask2::FreeCollectionSetTask : public G1
201201
void report_statistics();
202202

203203
public:
204-
FreeCollectionSetTask(G1EvacuationInfo* evacuation_info,
204+
FreeCollectionSetTask(G1EvacInfo* evacuation_info,
205205
const size_t* surviving_young_words,
206206
G1EvacFailureRegions* evac_failure_regions);
207207
virtual ~FreeCollectionSetTask();

0 commit comments

Comments
 (0)
Please sign in to comment.