Print this page
rev 4141 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
          +++ new/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp
↓ open down ↓ 27 lines elided ↑ open up ↑
  28   28  #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
  29   29  #include "gc_implementation/parallelScavenge/psGCAdaptivePolicyCounters.hpp"
  30   30  #include "gc_implementation/parallelScavenge/psOldGen.hpp"
  31   31  #include "gc_implementation/parallelScavenge/psPermGen.hpp"
  32   32  #include "gc_implementation/parallelScavenge/psYoungGen.hpp"
  33   33  #include "gc_implementation/shared/gcPolicyCounters.hpp"
  34   34  #include "gc_interface/collectedHeap.inline.hpp"
  35   35  #include "utilities/ostream.hpp"
  36   36  
  37   37  class AdjoiningGenerations;
       38 +class CollectorPolicy;
       39 +class GCHeapSummary;
  38   40  class GCTaskManager;
  39      -class PSAdaptiveSizePolicy;
  40   41  class GenerationSizer;
  41   42  class CollectorPolicy;
       43 +class PSAdaptiveSizePolicy;
       44 +class PSHeapSummary;
       45 +class VirtualSpaceSummary;
  42   46  
  43   47  class ParallelScavengeHeap : public CollectedHeap {
  44   48    friend class VMStructs;
  45   49   private:
  46   50    static PSYoungGen* _young_gen;
  47   51    static PSOldGen*   _old_gen;
  48   52    static PSPermGen*  _perm_gen;
  49   53  
  50   54    // Sizing policy for entire heap
  51   55    static PSAdaptiveSizePolicy* _size_policy;
↓ open down ↓ 9 lines elided ↑ open up ↑
  61   65  
  62   66    inline size_t set_alignment(size_t& var, size_t val);
  63   67  
  64   68    // Collection of generations that are adjacent in the
  65   69    // space reserved for the heap.
  66   70    AdjoiningGenerations* _gens;
  67   71    unsigned int _death_march_count;
  68   72  
  69   73    static GCTaskManager*          _gc_task_manager;      // The task manager.
  70   74  
       75 +  void trace_heap(GCWhen::Type when, GCTracer* tracer);
       76 +
  71   77   protected:
  72   78    static inline size_t total_invocations();
  73   79    HeapWord* allocate_new_tlab(size_t size);
  74   80  
  75   81    inline bool should_alloc_in_eden(size_t size) const;
  76   82    inline void death_march_check(HeapWord* const result, size_t size);
  77   83    HeapWord* mem_allocate_old_gen(size_t size);
  78   84  
  79   85   public:
  80   86    ParallelScavengeHeap() : CollectedHeap() {
↓ open down ↓ 164 lines elided ↑ open up ↑
 245  251    void permanent_oop_iterate(OopClosure* cl);
 246  252    void permanent_object_iterate(ObjectClosure* cl);
 247  253  
 248  254    HeapWord* block_start(const void* addr) const;
 249  255    size_t block_size(const HeapWord* addr) const;
 250  256    bool block_is_obj(const HeapWord* addr) const;
 251  257  
 252  258    jlong millis_since_last_gc();
 253  259  
 254  260    void prepare_for_verify();
      261 +  PSHeapSummary create_ps_heap_summary();
      262 +  VirtualSpaceSummary create_perm_gen_space_summary();
 255  263    virtual void print_on(outputStream* st) const;
 256  264    virtual void print_gc_threads_on(outputStream* st) const;
 257  265    virtual void gc_threads_do(ThreadClosure* tc) const;
 258  266    virtual void print_tracing_info() const;
 259  267  
 260  268    void verify(bool silent, VerifyOption option /* ignored */);
 261  269  
 262  270    void print_heap_change(size_t prev_used);
 263  271  
 264  272    // Resize the young generation.  The reserved space for the
↓ open down ↓ 29 lines elided ↑ open up ↑