RFR: 8261804: Remove field _processing_is_mt, calculate it instead
    Kim Barrett 
    kbarrett at openjdk.java.net
       
    Wed Feb 24 18:01:46 UTC 2021
    
    
  
On Wed, 24 Feb 2021 11:59:48 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:
> In the reference processor, remove _processing_is_mt. Instead calculate its value in its accessor, processing_is_mt().
> 
> This change will remove some state, make RefProcMTDegreeAdjuster a bit simpler and make it much easier to derive when processing is indeed multi threaded.
Other than possibly moving the definition of `processing_is_mt()` to the .cpp file, this looks good.
src/hotspot/share/gc/shared/referenceProcessor.hpp line 417:
> 415: 
> 416:   // Whether we are in a phase when _processing_ is MT.
> 417:   bool processing_is_mt() const { return ParallelRefProcEnabled && _num_queues > 1; }
I don't think this needs to be inline, and I think moving it to the .cpp file would avoid needing to include gc_globals.hpp here.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2704
    
    
More information about the hotspot-gc-dev
mailing list