< prev index next >

src/hotspot/share/memory/heapInspection.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "classfile/classLoaderData.inline.hpp"
  27 #include "classfile/classLoaderDataGraph.hpp"
  28 #include "classfile/moduleEntry.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "gc/shared/collectedHeap.hpp"
  31 #include "memory/heapInspection.hpp"
  32 #include "memory/resourceArea.hpp"
  33 #include "memory/universe.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "oops/reflectionAccessorImplKlassHelper.hpp"
  36 #include "oops/valueKlass.hpp"
  37 #include "runtime/os.hpp"
  38 #include "runtime/fieldDescriptor.inline.hpp"
  39 #include "utilities/globalDefinitions.hpp"
  40 #include "utilities/macros.hpp"
  41 #include "utilities/stack.inline.hpp"
  42 
  43 // HeapInspection
  44 
  45 int KlassSizeStats::count(oop x) {
  46   return (HeapWordSize * (((x) != NULL) ? (x)->size() : 0));
  47 }
  48 
  49 int KlassSizeStats::count_array(objArrayOop x) {
  50   return (HeapWordSize * (((x) != NULL) ? (x)->size() : 0));
  51 }
  52 
  53 inline KlassInfoEntry::~KlassInfoEntry() {
  54   if (_subclasses != NULL) {
  55     delete _subclasses;
  56   }




  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 #include "precompiled.hpp"
  26 #include "classfile/classLoaderData.inline.hpp"
  27 #include "classfile/classLoaderDataGraph.hpp"
  28 #include "classfile/moduleEntry.hpp"
  29 #include "classfile/systemDictionary.hpp"
  30 #include "gc/shared/collectedHeap.hpp"
  31 #include "memory/heapInspection.hpp"
  32 #include "memory/resourceArea.hpp"
  33 #include "memory/universe.hpp"
  34 #include "oops/oop.inline.hpp"
  35 #include "oops/reflectionAccessorImplKlassHelper.hpp"
  36 #include "oops/valueKlass.inline.hpp"
  37 #include "runtime/os.hpp"
  38 #include "runtime/fieldDescriptor.inline.hpp"
  39 #include "utilities/globalDefinitions.hpp"
  40 #include "utilities/macros.hpp"
  41 #include "utilities/stack.inline.hpp"
  42 
  43 // HeapInspection
  44 
  45 int KlassSizeStats::count(oop x) {
  46   return (HeapWordSize * (((x) != NULL) ? (x)->size() : 0));
  47 }
  48 
  49 int KlassSizeStats::count_array(objArrayOop x) {
  50   return (HeapWordSize * (((x) != NULL) ? (x)->size() : 0));
  51 }
  52 
  53 inline KlassInfoEntry::~KlassInfoEntry() {
  54   if (_subclasses != NULL) {
  55     delete _subclasses;
  56   }


< prev index next >