< prev index next >

src/share/vm/gc/shared/gcHeapSummary.hpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:
   1 /*
   2  * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_SHARED_GCHEAPSUMMARY_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_SHARED_GCHEAPSUMMARY_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "memory/metaspaceChunkFreeListSummary.hpp"
  30 
  31 class VirtualSpaceSummary : public StackObj {
  32   HeapWord* _start;
  33   HeapWord* _committed_end;
  34   HeapWord* _reserved_end;
  35 public:
  36   VirtualSpaceSummary() :
  37       _start(NULL), _committed_end(NULL), _reserved_end(NULL) { }
  38   VirtualSpaceSummary(HeapWord* start, HeapWord* committed_end, HeapWord* reserved_end) :
  39       _start(start), _committed_end(committed_end), _reserved_end(reserved_end) { }
  40 
  41   HeapWord* start() const { return _start; }
  42   HeapWord* committed_end() const { return _committed_end; }
  43   HeapWord* reserved_end() const { return _reserved_end; }
  44   size_t committed_size() const { return (uintptr_t)_committed_end - (uintptr_t)_start;  }
  45   size_t reserved_size() const { return (uintptr_t)_reserved_end - (uintptr_t)_start; }
  46 };


 154     _class_space(class_space),
 155     _metaspace_chunk_free_list_summary(metaspace_chunk_free_list_summary),
 156     _class_chunk_free_list_summary(class_chunk_free_list_summary)
 157   {}
 158 
 159   size_t capacity_until_GC() const { return _capacity_until_GC; }
 160   const MetaspaceSizes& meta_space() const { return _meta_space; }
 161   const MetaspaceSizes& data_space() const { return _data_space; }
 162   const MetaspaceSizes& class_space() const { return _class_space; }
 163 
 164   const MetaspaceChunkFreeListSummary& metaspace_chunk_free_list_summary() const {
 165     return _metaspace_chunk_free_list_summary;
 166   }
 167 
 168   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary() const {
 169     return _class_chunk_free_list_summary;
 170   }
 171 
 172 };
 173 
 174 #endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_GCHEAPSUMMARY_HPP
   1 /*
   2  * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_GC_SHARED_GCHEAPSUMMARY_HPP
  26 #define SHARE_VM_GC_SHARED_GCHEAPSUMMARY_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "memory/metaspaceChunkFreeListSummary.hpp"
  30 
  31 class VirtualSpaceSummary : public StackObj {
  32   HeapWord* _start;
  33   HeapWord* _committed_end;
  34   HeapWord* _reserved_end;
  35 public:
  36   VirtualSpaceSummary() :
  37       _start(NULL), _committed_end(NULL), _reserved_end(NULL) { }
  38   VirtualSpaceSummary(HeapWord* start, HeapWord* committed_end, HeapWord* reserved_end) :
  39       _start(start), _committed_end(committed_end), _reserved_end(reserved_end) { }
  40 
  41   HeapWord* start() const { return _start; }
  42   HeapWord* committed_end() const { return _committed_end; }
  43   HeapWord* reserved_end() const { return _reserved_end; }
  44   size_t committed_size() const { return (uintptr_t)_committed_end - (uintptr_t)_start;  }
  45   size_t reserved_size() const { return (uintptr_t)_reserved_end - (uintptr_t)_start; }
  46 };


 154     _class_space(class_space),
 155     _metaspace_chunk_free_list_summary(metaspace_chunk_free_list_summary),
 156     _class_chunk_free_list_summary(class_chunk_free_list_summary)
 157   {}
 158 
 159   size_t capacity_until_GC() const { return _capacity_until_GC; }
 160   const MetaspaceSizes& meta_space() const { return _meta_space; }
 161   const MetaspaceSizes& data_space() const { return _data_space; }
 162   const MetaspaceSizes& class_space() const { return _class_space; }
 163 
 164   const MetaspaceChunkFreeListSummary& metaspace_chunk_free_list_summary() const {
 165     return _metaspace_chunk_free_list_summary;
 166   }
 167 
 168   const MetaspaceChunkFreeListSummary& class_chunk_free_list_summary() const {
 169     return _class_chunk_free_list_summary;
 170   }
 171 
 172 };
 173 
 174 #endif // SHARE_VM_GC_SHARED_GCHEAPSUMMARY_HPP
< prev index next >