RFR [10]: Fix incorrect ifdef INCLUDE_ALL_GCS

Roman Kennke rkennke at redhat.com
Thu Jun 14 08:46:19 UTC 2018


Yes, good!
Roman

> Recent sh/jdk10-specific improvement broke Minimal VM build, because guarding _gc_state with ifdef
> INCLUDE_ALL_GCS is incorrect. Fixed other places too:
> 
> diff -r d8b264d29c5f src/hotspot/share/runtime/thread.cpp
> --- a/src/hotspot/share/runtime/thread.cpp	Wed Jun 13 12:52:53 2018 +0200
> +++ b/src/hotspot/share/runtime/thread.cpp	Thu Jun 14 10:09:30 2018 +0200
> @@ -308,7 +308,7 @@
>  #endif // ASSERT
> 
>    _oom_during_evac = 0;
> -#ifdef INCLUDE_ALL_GCS
> +#if INCLUDE_ALL_GCS
>    _gclab = NULL;
>    _gc_state = _gc_state_global;
>  #endif
> diff -r d8b264d29c5f src/hotspot/share/runtime/thread.hpp
> --- a/src/hotspot/share/runtime/thread.hpp	Wed Jun 13 12:52:53 2018 +0200
> +++ b/src/hotspot/share/runtime/thread.hpp	Thu Jun 14 10:09:30 2018 +0200
> @@ -91,7 +91,7 @@
> 
>  class WorkerThread;
> 
> -#ifdef INCLUDE_ALL_GCS
> +#if INCLUDE_ALL_GCS
>  class PLAB;
>  #endif
> 
> @@ -334,7 +334,7 @@
>    volatile void* _polling_page;                 // Thread local polling page
> 
>    ThreadLocalAllocBuffer _tlab;                 // Thread-local eden
> -#ifdef INCLUDE_ALL_GCS
> +#if INCLUDE_ALL_GCS
>    PLAB*                  _gclab;                // Thread-local allocation buffer for GC (e.g.
> evacuation)
>  #endif
>    jlong _allocated_bytes;                       // Cumulative number of bytes allocated on
> @@ -525,7 +525,7 @@
>    }
> 
>    // Thread-Local GC Allocation Buffer (GCLAB) support
> -#ifdef INCLUDE_ALL_GCS
> +#if INCLUDE_ALL_GCS
>    PLAB* gclab()                                  { return _gclab; }
>    void set_gclab(PLAB* gclab)                    { _gclab = gclab; }
>  #endif
> 
> Testing: minimal VM build, server VM tier1_gc_shenandoah
> 
> Thanks,
> -Aleksey
> 




More information about the shenandoah-dev mailing list