[11u] RFR (XS) 8253224: Shenandoah: ShenandoahStrDedupQueue destructor calls virtual num_queues()

Zhengyu Gu zgu at redhat.com
Thu Sep 24 12:03:21 UTC 2020


Looks good.

Thanks,

-Zhengyu

On 9/24/20 3:06 AM, Aleksey Shipilev wrote:
> Original fix:
>    https://bugs.openjdk.java.net/browse/JDK-8253224
>    https://git.openjdk.java.net/jdk/commit/c781594b
> 
> This is the first backport after moving to Git, so the changeset is 
> generated with "git hg-export". It also does not apply cleanly, because 
> the context changed a bit.
> 
> 11u variant:
> 
> diff -r dd09e5aaa34e 
> src/hotspot/share/gc/shenandoah/shenandoahStrDedupQueue.cpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahStrDedupQueue.cpp       
> Fri Aug 24 09:38:11 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahStrDedupQueue.cpp       
> Thu Sep 24 09:06:32 2020 +0200
> @@ -50,5 +50,5 @@
>   ShenandoahStrDedupQueue::~ShenandoahStrDedupQueue() {
>     MonitorLockerEx ml(StringDedupQueue_lock, 
> Mutex::_no_safepoint_check_flag);
> -  for (size_t index = 0; index < num_queues(); index ++) {
> +  for (size_t index = 0; index < num_queues_nv(); index ++) {
>       release_buffers(queue_at(index));
>     }
> diff -r dd09e5aaa34e 
> src/hotspot/share/gc/shenandoah/shenandoahStrDedupQueue.hpp
> --- a/src/hotspot/share/gc/shenandoah/shenandoahStrDedupQueue.hpp       
> Fri Aug 24 09:38:11 2018 +0200
> +++ b/src/hotspot/share/gc/shenandoah/shenandoahStrDedupQueue.hpp       
> Thu Sep 24 09:06:32 2020 +0200
> @@ -95,7 +95,9 @@
> 
>   protected:
> -  size_t num_queues() const { return (_num_producer_queue + 2); }
> +  size_t num_queues() const { return num_queues_nv(); }
> 
>   private:
> +  inline size_t num_queues_nv() const { return (_num_producer_queue + 
> 2); }
> +
>     ShenandoahQueueBuffer* new_buffer();
> 
> 
> Testing: hotspot_gc_shenandoah
> 
> 



More information about the jdk-updates-dev mailing list