Skip to content

Commit 52c6044

Browse files
Suchismith Royalbertnetymk
authored andcommitted
8349077: Rename GenerationCounters::update_all
Reviewed-by: ayang, stefank
1 parent 4e1bf31 commit 52c6044

File tree

10 files changed

+14
-34
lines changed

10 files changed

+14
-34
lines changed

src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class EpsilonGenerationCounters : public GenerationCounters {
9191
{};
9292

9393
void update_all() {
94-
GenerationCounters::update_all(_heap->capacity());
94+
GenerationCounters::update_capacity(_heap->capacity());
9595
}
9696
};
9797

src/hotspot/share/gc/g1/g1MonitoringSupport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class G1YoungGenerationCounters : public G1GenerationCounters {
6262

6363
void update_all() {
6464
size_t committed = _monitoring_support->young_gen_committed();
65-
GenerationCounters::update_all(committed);
65+
GenerationCounters::update_capacity(committed);
6666
}
6767
};
6868

@@ -83,7 +83,7 @@ class G1OldGenerationCounters : public G1GenerationCounters {
8383

8484
void update_all() {
8585
size_t committed = _monitoring_support->old_gen_committed();
86-
GenerationCounters::update_all(committed);
86+
GenerationCounters::update_capacity(committed);
8787
}
8888
};
8989

src/hotspot/share/gc/parallel/psOldGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ bool PSOldGen::expand_by(size_t bytes) {
234234
post_resize();
235235
if (UsePerfData) {
236236
_space_counters->update_capacity();
237-
_gen_counters->update_all(_virtual_space->committed_size());
237+
_gen_counters->update_capacity(_virtual_space->committed_size());
238238
}
239239
}
240240

@@ -366,7 +366,7 @@ void PSOldGen::print_on(outputStream* st) const {
366366
void PSOldGen::update_counters() {
367367
if (UsePerfData) {
368368
_space_counters->update_all();
369-
_gen_counters->update_all(_virtual_space->committed_size());
369+
_gen_counters->update_capacity(_virtual_space->committed_size());
370370
}
371371
}
372372

src/hotspot/share/gc/parallel/psYoungGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ void PSYoungGen::update_counters() {
810810
_eden_counters->update_all();
811811
_from_counters->update_all();
812812
_to_counters->update_all();
813-
_gen_counters->update_all(_virtual_space->committed_size());
813+
_gen_counters->update_capacity(_virtual_space->committed_size());
814814
}
815815
}
816816

src/hotspot/share/gc/serial/defNewGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ void DefNewGeneration::update_counters() {
814814
_eden_counters->update_all();
815815
_from_counters->update_all();
816816
_to_counters->update_all();
817-
_gen_counters->update_all(_virtual_space.committed_size());
817+
_gen_counters->update_capacity(_virtual_space.committed_size());
818818
}
819819
}
820820

src/hotspot/share/gc/serial/tenuredGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ void TenuredGeneration::update_promote_stats() {
368368
void TenuredGeneration::update_counters() {
369369
if (UsePerfData) {
370370
_space_counters->update_all();
371-
_gen_counters->update_all(_virtual_space.committed_size());
371+
_gen_counters->update_capacity(_virtual_space.committed_size());
372372
}
373373
}
374374

src/hotspot/share/gc/shared/generationCounters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ GenerationCounters::~GenerationCounters() {
6767
FREE_C_HEAP_ARRAY(char, _name_space);
6868
}
6969

70-
void GenerationCounters::update_all(size_t curr_capacity) {
70+
void GenerationCounters::update_capacity(size_t curr_capacity) {
7171
_current_size->set_value(curr_capacity);
7272
}
7373

src/hotspot/share/gc/shared/generationCounters.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2025, 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
@@ -52,7 +52,7 @@ class GenerationCounters: public CHeapObj<mtGC> {
5252

5353
~GenerationCounters();
5454

55-
void update_all(size_t curr_capacity);
55+
void update_capacity(size_t curr_capacity);
5656

5757
const char* name_space() const { return _name_space; }
5858
};

src/hotspot/share/gc/shenandoah/shenandoahMonitoringSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ShenandoahGenerationCounters : public GenerationCounters {
5151
{};
5252

5353
void update_all() {
54-
GenerationCounters::update_all(_heap->capacity());
54+
GenerationCounters::update_capacity(_heap->capacity());
5555
}
5656
};
5757

src/hotspot/share/gc/z/zServiceability.cpp

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,11 @@ static ZMemoryUsageInfo compute_memory_usage_info() {
5050
return info;
5151
}
5252

53-
class ZGenerationCounters : public GenerationCounters {
54-
public:
55-
ZGenerationCounters(const char* name,
56-
int ordinal,
57-
int spaces,
58-
size_t min_capacity,
59-
size_t max_capacity,
60-
size_t curr_capacity)
61-
: GenerationCounters(name,
62-
ordinal,
63-
spaces,
64-
min_capacity,
65-
max_capacity,
66-
curr_capacity) {}
67-
68-
void update_capacity(size_t capacity) {
69-
update_all(capacity);
70-
}
71-
};
72-
7353
// Class to expose perf counters used by jstat.
7454
class ZServiceabilityCounters : public CHeapObj<mtGC> {
7555
private:
76-
ZGenerationCounters _generation_young_counters;
77-
ZGenerationCounters _generation_old_counters;
56+
GenerationCounters _generation_young_counters;
57+
GenerationCounters _generation_old_counters;
7858
HSpaceCounters _space_young_counters;
7959
HSpaceCounters _space_old_counters;
8060
CollectorCounters _minor_collection_counters;

0 commit comments

Comments
 (0)