From 6a8e9530fe914fb7a328ea41f7e57c8cb5e6e99d Mon Sep 17 00:00:00 2001 From: Kelvin Nilsen Date: Mon, 9 Mar 2026 21:58:50 +0000 Subject: [PATCH] 8379442: GenShen: Fix two errors introduced by 29039 Reviewed-by: xpeng, serb, wkemper --- .../gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp | 2 +- src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp index ac8b3ebdf37..a1aeb918553 100644 --- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp +++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahAdaptiveHeuristics.cpp @@ -739,7 +739,7 @@ size_t ShenandoahAdaptiveHeuristics::accelerated_consumption(double& acceleratio if (i > 0) { // first sample not included in weighted average because it has no weight. double sample_weight = x_array[i] - x_array[i-1]; - weighted_y_sum = y_array[i] * sample_weight; + weighted_y_sum += y_array[i] * sample_weight; total_weight += sample_weight; } y_sum += y_array[i]; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp index c39e2e7bb79..d765f33fee0 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp @@ -2848,7 +2848,7 @@ size_t ShenandoahFreeSet::reserve_regions(size_t to_reserve, size_t to_reserve_o _partitions.leftmost(ShenandoahFreeSetPartitionId::OldCollector), _partitions.rightmost(ShenandoahFreeSetPartitionId::OldCollector)); old_region_count++; - assert(ac = ShenandoahHeapRegion::region_size_bytes(), "Cannot move to old unless entire region is in alloc capacity"); + assert(ac == ShenandoahHeapRegion::region_size_bytes(), "Cannot move to old unless entire region is in alloc capacity"); mutator_allocatable_words -= ShenandoahHeapRegion::region_size_words(); continue; }