Skip to content

Commit

Permalink
8337027: Parallel: Obsolete BaseFootPrintEstimate
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl, kbarrett
  • Loading branch information
albertnetymk committed Jul 31, 2024
1 parent fdb4350 commit e4c7850
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 32 deletions.
10 changes: 3 additions & 7 deletions src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -205,8 +205,6 @@ void PSAdaptiveSizePolicy::compute_eden_space_size(
bool is_full_gc) {

// Update statistics
// Time statistics are updated as we go, update footprint stats here
_avg_base_footprint->sample(BaseFootPrintEstimate);
avg_young_live()->sample(young_live);
avg_eden_live()->sample(eden_live);

Expand Down Expand Up @@ -363,8 +361,7 @@ void PSAdaptiveSizePolicy::compute_eden_space_size(
log_debug(gc, ergo)("Live_space: " SIZE_FORMAT " free_space: " SIZE_FORMAT,
live_space(), free_space());

log_trace(gc, ergo)("Base_footprint: " SIZE_FORMAT " avg_young_live: " SIZE_FORMAT " avg_old_live: " SIZE_FORMAT,
(size_t)_avg_base_footprint->average(),
log_trace(gc, ergo)("avg_young_live: " SIZE_FORMAT " avg_old_live: " SIZE_FORMAT,
(size_t)avg_young_live()->average(),
(size_t)avg_old_live()->average());

Expand Down Expand Up @@ -535,8 +532,7 @@ void PSAdaptiveSizePolicy::compute_old_gen_free_space(
log_debug(gc, ergo)("Live_space: " SIZE_FORMAT " free_space: " SIZE_FORMAT,
live_space(), free_space());

log_trace(gc, ergo)("Base_footprint: " SIZE_FORMAT " avg_young_live: " SIZE_FORMAT " avg_old_live: " SIZE_FORMAT,
(size_t)_avg_base_footprint->average(),
log_trace(gc, ergo)("avg_young_live: " SIZE_FORMAT " avg_old_live: " SIZE_FORMAT,
(size_t)avg_young_live()->average(),
(size_t)avg_old_live()->average());

Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/share/gc/parallel/psAdaptiveSizePolicy.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -145,8 +145,7 @@ class PSAdaptiveSizePolicy : public AdaptiveSizePolicy {

// Footprint accessors
size_t live_space() const {
return (size_t)(avg_base_footprint()->average() +
avg_young_live()->average() +
return (size_t)(avg_young_live()->average() +
avg_old_live()->average());
}
size_t free_space() const {
Expand Down
7 changes: 1 addition & 6 deletions src/hotspot/share/gc/parallel/psGCAdaptivePolicyCounters.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -107,10 +107,6 @@ PSGCAdaptivePolicyCounters::PSGCAdaptivePolicyCounters(const char* name_arg,
_free_space = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, ps_size_policy()->free_space(), CHECK);

cname = PerfDataManager::counter_name(name_space(), "avgBaseFootprint");
_avg_base_footprint = PerfDataManager::create_variable(SUN_GC, cname,
PerfData::U_Bytes, (jlong) ps_size_policy()->avg_base_footprint()->average(), CHECK);

cname = PerfDataManager::counter_name(name_space(), "liveAtLastFullGc");
_live_at_last_full_gc_counter =
PerfDataManager::create_variable(SUN_GC, cname,
Expand Down Expand Up @@ -157,7 +153,6 @@ void PSGCAdaptivePolicyCounters::update_counters_from_policy() {
update_decrement_tenuring_threshold_for_survivor_limit();
update_live_space();
update_free_space();
update_avg_base_footprint();

update_change_old_gen_for_maj_pauses();
update_change_young_gen_for_maj_pauses();
Expand Down
8 changes: 1 addition & 7 deletions src/hotspot/share/gc/parallel/psGCAdaptivePolicyCounters.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -50,7 +50,6 @@ class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
PerfVariable* _avg_major_interval;
PerfVariable* _live_space;
PerfVariable* _free_space;
PerfVariable* _avg_base_footprint;
PerfVariable* _live_at_last_full_gc_counter;
PerfVariable* _old_capacity;

Expand Down Expand Up @@ -142,11 +141,6 @@ class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters {
_free_space->set_value(ps_size_policy()->free_space());
}

inline void update_avg_base_footprint() {
_avg_base_footprint->set_value(
(jlong)(ps_size_policy()->avg_base_footprint()->average())
);
}
inline void update_avg_old_live() {
_avg_old_live_counter->set_value(
(jlong)(ps_size_policy()->avg_old_live()->average())
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/shared/gc_globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,6 @@
"Initial ratio of young generation/survivor space size") \
range(0, max_uintx) \
\
product(size_t, BaseFootPrintEstimate, 256*M, \
"Estimate of footprint other than Java Heap") \
range(0, max_uintx) \
\
product(bool, UseGCOverheadLimit, true, \
"Use policy to limit of proportion of time spent in GC " \
"before an OutOfMemory error is thrown") \
Expand Down
5 changes: 2 additions & 3 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,8 @@ static SpecialFlag const special_jvm_flags[] = {
{ "RTMRetryCount", JDK_Version::jdk(23), JDK_Version::jdk(24), JDK_Version::jdk(25) },
#endif // X86


{ "BaseFootPrintEstimate", JDK_Version::undefined(), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "HeapFirstMaximumCompactionCount", JDK_Version::undefined(), JDK_Version::jdk(24), JDK_Version::jdk(25) },
{ "UseVtableBasedCHA", JDK_Version::undefined(), JDK_Version::jdk(24), JDK_Version::jdk(25) },
#ifdef ASSERT
Expand Down Expand Up @@ -1653,9 +1655,6 @@ jint Arguments::set_aggressive_heap_flags() {
#endif

// Increase some data structure sizes for efficiency
if (FLAG_SET_CMDLINE(BaseFootPrintEstimate, MaxHeapSize) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(ResizeTLAB, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@ alias sun.gc.lastCause // 1.5.0 b39
hotspot.gc.last_cause // 1.4.2_02

// sun.gc.policy
alias sun.gc.policy.avgBaseFootprint // 1.5.0 b39
hotspot.gc.policy.avg_base_footprint // 1.5.0 b21
alias sun.gc.policy.avgMajorIntervalTime // 1.5.0 b39
hotspot.gc.policy.avg_major_interval // 1.5.0 b21
alias sun.gc.policy.avgMajorPauseTime // 1.5.0 b39
Expand Down

0 comments on commit e4c7850

Please sign in to comment.