src/hotspot/share/gc/parallel/psScavenge.hpp
changeset 49164 7e958a8ebcd3
parent 47216 71c04702a3d5
child 49964 99e698e94cc7
equal deleted inserted replaced
49163:580bb0b85f63 49164:7e958a8ebcd3
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_VM_GC_PARALLEL_PSSCAVENGE_HPP
    25 #ifndef SHARE_VM_GC_PARALLEL_PSSCAVENGE_HPP
    26 #define SHARE_VM_GC_PARALLEL_PSSCAVENGE_HPP
    26 #define SHARE_VM_GC_PARALLEL_PSSCAVENGE_HPP
    27 
    27 
    28 #include "gc/parallel/cardTableExtension.hpp"
    28 #include "gc/parallel/psCardTable.hpp"
    29 #include "gc/parallel/psVirtualspace.hpp"
    29 #include "gc/parallel/psVirtualspace.hpp"
    30 #include "gc/shared/collectorCounters.hpp"
    30 #include "gc/shared/collectorCounters.hpp"
    31 #include "gc/shared/gcTrace.hpp"
    31 #include "gc/shared/gcTrace.hpp"
    32 #include "memory/allocation.hpp"
    32 #include "memory/allocation.hpp"
    33 #include "oops/oop.hpp"
    33 #include "oops/oop.hpp"
    65 
    65 
    66  protected:
    66  protected:
    67   // Flags/counters
    67   // Flags/counters
    68   static ReferenceProcessor*  _ref_processor;        // Reference processor for scavenging.
    68   static ReferenceProcessor*  _ref_processor;        // Reference processor for scavenging.
    69   static PSIsAliveClosure     _is_alive_closure;     // Closure used for reference processing
    69   static PSIsAliveClosure     _is_alive_closure;     // Closure used for reference processing
    70   static CardTableExtension*  _card_table;           // We cache the card table for fast access.
    70   static PSCardTable*         _card_table;           // We cache the card table for fast access.
    71   static bool                 _survivor_overflow;    // Overflow this collection
    71   static bool                 _survivor_overflow;    // Overflow this collection
    72   static uint                 _tenuring_threshold;   // tenuring threshold for next scavenge
    72   static uint                 _tenuring_threshold;   // tenuring threshold for next scavenge
    73   static elapsedTimer         _accumulated_time;     // total time spent on scavenge
    73   static elapsedTimer         _accumulated_time;     // total time spent on scavenge
    74   static STWGCTimer           _gc_timer;             // GC time book keeper
    74   static STWGCTimer           _gc_timer;             // GC time book keeper
    75   static ParallelScavengeTracer _gc_tracer;          // GC tracing
    75   static ParallelScavengeTracer _gc_tracer;          // GC tracing
    87 
    87 
    88   static HeapWord* to_space_top_before_gc() { return _to_space_top_before_gc; }
    88   static HeapWord* to_space_top_before_gc() { return _to_space_top_before_gc; }
    89   static inline void save_to_space_top_before_gc();
    89   static inline void save_to_space_top_before_gc();
    90 
    90 
    91   // Private accessors
    91   // Private accessors
    92   static CardTableExtension* const card_table()       { assert(_card_table != NULL, "Sanity"); return _card_table; }
    92   static PSCardTable* const card_table()           { assert(_card_table != NULL, "Sanity"); return _card_table; }
    93   static const ParallelScavengeTracer* gc_tracer() { return &_gc_tracer; }
    93   static const ParallelScavengeTracer* gc_tracer() { return &_gc_tracer; }
    94 
    94 
    95  public:
    95  public:
    96   // Accessors
    96   // Accessors
    97   static uint             tenuring_threshold()  { return _tenuring_threshold; }
    97   static uint             tenuring_threshold()  { return _tenuring_threshold; }