diff src/share/vm/memory/heapInspection.hpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents d2a62e0f25eb
children fb19af007ffc
line wrap: on
line diff
--- a/src/share/vm/memory/heapInspection.hpp	Fri Aug 31 16:39:35 2012 -0700
+++ b/src/share/vm/memory/heapInspection.hpp	Sat Sep 01 13:25:18 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,7 +34,7 @@
 // HeapInspection
 
 // KlassInfoTable is a bucket hash table that
-// maps klassOops to extra information:
+// maps Klass*s to extra information:
 //    instance count and instance word size.
 //
 // A KlassInfoBucket is the head of a link list
@@ -47,17 +47,17 @@
 class KlassInfoEntry: public CHeapObj<mtInternal> {
  private:
   KlassInfoEntry* _next;
-  klassOop        _klass;
+  Klass*          _klass;
   long            _instance_count;
   size_t          _instance_words;
 
  public:
-  KlassInfoEntry(klassOop k, KlassInfoEntry* next) :
+  KlassInfoEntry(Klass* k, KlassInfoEntry* next) :
     _klass(k), _instance_count(0), _instance_words(0), _next(next)
   {}
   KlassInfoEntry* next()     { return _next; }
-  bool is_equal(klassOop k)  { return k == _klass; }
-  klassOop klass()           { return _klass; }
+  bool is_equal(Klass* k)  { return k == _klass; }
+  Klass* klass()           { return _klass; }
   long count()               { return _instance_count; }
   void set_count(long ct)    { _instance_count = ct; }
   size_t words()             { return _instance_words; }
@@ -78,7 +78,7 @@
   KlassInfoEntry* list()           { return _list; }
   void set_list(KlassInfoEntry* l) { _list = l; }
  public:
-  KlassInfoEntry* lookup(const klassOop k);
+  KlassInfoEntry* lookup(Klass* const k);
   void initialize() { _list = NULL; }
   void empty();
   void iterate(KlassInfoClosure* cic);
@@ -94,8 +94,8 @@
   HeapWord* _ref;
 
   KlassInfoBucket* _buckets;
-  uint hash(klassOop p);
-  KlassInfoEntry* lookup(const klassOop k);
+  uint hash(Klass* p);
+  KlassInfoEntry* lookup(Klass* const k);
 
  public:
   // Table size
@@ -134,7 +134,7 @@
 class HeapInspection : public AllStatic {
  public:
   static void heap_inspection(outputStream* st, bool need_prologue) KERNEL_RETURN;
-  static void find_instances_at_safepoint(klassOop k, GrowableArray<oop>* result) KERNEL_RETURN;
+  static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) KERNEL_RETURN;
 };
 
 #endif // SHARE_VM_MEMORY_HEAPINSPECTION_HPP