/*
* 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 "precompiled.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "memory/genCollectedHeap.hpp"
#include "memory/heapInspection.hpp"
#include "memory/resourceArea.hpp"
#include "oops/klassOop.hpp"
#include "utilities/globalDefinitions.hpp"
#ifndef SERIALGC
#endif
// HeapInspection
return -1;
return 1;
}
return 0;
}
const char* name;;
} else {
name = "<no name>";
}
// simplify the formatting (ILP32 vs LP64) - always cast the numbers to 64-bit
name);
}
return elt;
}
}
// We may be out of space to allocate the new entry.
}
return elt;
}
}
}
delete elt;
}
}
}
}
}
KlassInfoTable::~KlassInfoTable() {
}
_size = 0;
}
}
}
// Lookup may fail if this is a new klass for which we
// could not allocate space for an new entry.
return e;
}
// Return false if the entry could not be recorded on account
// of running out of space required to create a new entry.
// elt may be NULL if it's a new klass for which we
// could not allocate space for a new entry in the hashtable.
return true;
} else {
return false;
}
}
}
}
return _size_of_instances_in_words;
}
}
_elements = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<KlassInfoEntry*>(_histo_initial_size, true);
}
KlassInfoHisto::~KlassInfoHisto() {
delete _elements;
}
}
}
// simplify the formatting (ILP32 vs LP64) - store the sum in 64-bit
}
}
}
private:
public:
}
};
private:
public:
if (should_visit(obj)) {
}
}
}
private:
}
};
if (is_shared_heap()) {
}
#ifndef SERIALGC
#else
return NULL;
#endif // SERIALGC
}
}
if (is_shared_heap()) {
}
}
if (is_shared_heap()) {
}
}
bool need_prologue,
if (need_prologue) {
prologue();
}
// need to run epilogue if we run prologue
if (need_prologue) {
epilogue();
}
return ric.missed_count();
}
if (!cit.allocation_failed()) {
if (missed_count != 0) {
" total instances in data below",
}
" num #instances #bytes class name\n"
"----------------------------------------------");
} else {
}
}
private:
public:
}
}
};
// Ensure that the heap is parsable
// Iterate over objects in the heap
// If this operation encounters a bad object when using CMS,
// consider using safe_object_iterate() which avoids perm gen
// objects that may contain bad references.
}