/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
// HeapInspection
// KlassInfoTable is a bucket hash table that
// maps klassOops to extra information:
// instance count and instance word size.
//
// A KlassInfoBucket is the head of a link list
// of KlassInfoEntry's
//
// KlassInfoHisto is a growable array of pointers
// to KlassInfoEntry's and is used to sort
// the entries.
private:
long _instance_count;
public:
{}
};
public:
// Called for each KlassInfoEntry.
};
private:
public:
void empty();
};
private:
int _size;
// An aligned reference address (typically the least
// address in the perm gen) used for hashing klass
// objects.
public:
~KlassInfoTable();
size_t size_of_instances_in_words() const;
};
private:
const char* _title;
public:
KlassInfoHisto(const char* title);
~KlassInfoHisto();
void sort();
};
public:
bool need_prologue,
static HeapWord* start_of_perm_gen();
private:
static bool is_shared_heap();
static void prologue();
static void epilogue();
};
#endif // SHARE_VM_MEMORY_HEAPINSPECTION_HPP