hotspot/src/share/vm/oops/klass.hpp
changeset 15437 eabd4555d072
parent 14816 f2935b95cb54
child 15450 3321aba7b8af
equal deleted inserted replaced
15431:570c5062ab8a 15437:eabd4555d072
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2013, 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.
    89 template <class T> class Array;
    89 template <class T> class Array;
    90 template <class T> class GrowableArray;
    90 template <class T> class GrowableArray;
    91 class ClassLoaderData;
    91 class ClassLoaderData;
    92 class klassVtable;
    92 class klassVtable;
    93 class ParCompactionManager;
    93 class ParCompactionManager;
       
    94 class KlassSizeStats;
    94 
    95 
    95 class Klass : public Metadata {
    96 class Klass : public Metadata {
    96   friend class VMStructs;
    97   friend class VMStructs;
    97  protected:
    98  protected:
    98   // note: put frequently-used fields together at start of klass structure
    99   // note: put frequently-used fields together at start of klass structure
   475   // actual oop size of obj in memory
   476   // actual oop size of obj in memory
   476   virtual int oop_size(oop obj) const = 0;
   477   virtual int oop_size(oop obj) const = 0;
   477 
   478 
   478   // Size of klass in word size.
   479   // Size of klass in word size.
   479   virtual int size() const = 0;
   480   virtual int size() const = 0;
       
   481 #if INCLUDE_SERVICES
       
   482   virtual void collect_statistics(KlassSizeStats *sz) const;
       
   483 #endif
   480 
   484 
   481   // Returns the Java name for a class (Resource allocated)
   485   // Returns the Java name for a class (Resource allocated)
   482   // For arrays, this returns the name of the element with a leading '['.
   486   // For arrays, this returns the name of the element with a leading '['.
   483   // For classes, this returns the name with the package separators
   487   // For classes, this returns the name with the package separators
   484   //     turned into '.'s.
   488   //     turned into '.'s.