< prev index next >

src/hotspot/share/memory/metaspace/metaspaceStatistics.hpp

Print this page
rev 50082 : imported patch metaspace-split


  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef SHARE_MEMORY_METASPACE_METASPACESTATISTICS_HPP_
  27 #define SHARE_MEMORY_METASPACE_METASPACESTATISTICS_HPP_
  28 
  29 #include "utilities/globalDefinitions.hpp"
  30 #include "memory/metachunk.hpp" // for ChunkIndex enum
  31 #include "memory/metaspace.hpp" // for MetadataType enum

  32 
  33 class outputStream;
  34 
  35 namespace metaspace {
  36 namespace internals {
  37 
  38 // Contains statistics for a number of free chunks.
  39 class FreeChunksStatistics {
  40   uintx _num;         // Number of chunks
  41   size_t _cap;        // Total capacity, in words
  42 
  43 public:
  44   FreeChunksStatistics();
  45 
  46   void reset();
  47 
  48   uintx num() const { return _num; }
  49   size_t cap() const { return _cap; }
  50 
  51   void add(uintx n, size_t s);




  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #ifndef SHARE_MEMORY_METASPACE_METASPACESTATISTICS_HPP_
  27 #define SHARE_MEMORY_METASPACE_METASPACESTATISTICS_HPP_
  28 
  29 #include "utilities/globalDefinitions.hpp"

  30 #include "memory/metaspace.hpp" // for MetadataType enum
  31 #include "memory/metaspace/metachunk.hpp" // for ChunkIndex enum
  32 
  33 class outputStream;
  34 
  35 namespace metaspace {
  36 namespace internals {
  37 
  38 // Contains statistics for a number of free chunks.
  39 class FreeChunksStatistics {
  40   uintx _num;         // Number of chunks
  41   size_t _cap;        // Total capacity, in words
  42 
  43 public:
  44   FreeChunksStatistics();
  45 
  46   void reset();
  47 
  48   uintx num() const { return _num; }
  49   size_t cap() const { return _cap; }
  50 
  51   void add(uintx n, size_t s);


< prev index next >