/*
* 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 "classfile/systemDictionary.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "memory/permGen.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oop.inline2.hpp"
#include "runtime/aprofiler.hpp"
public:
}
};
#ifndef PRODUCT
public:
k->set_alloc_count(0);
k->set_alloc_size(0);
}
}
};
#endif
if (is_active()) {
}
}
_active = true;
}
_active = false;
}
_print_array->append(k);
}
// Iterate over klass and all array klasses for klass
}
// Sort by total allocation size
}
}
"__Instances"
"__Average"
"__Class________________");
int total_alloc_count = 0;
if (alloc_size > cutoff) {
#ifdef PRODUCT
#else
#endif
name);
}
}
}
// Print regular instance klasses and basic type array klasses
#ifndef PRODUCT
tty->print_cr("Allocation profile for system classes (sizes in bytes, cutoff = %d bytes):", cutoff * BytesPerWord);
// Print system klasses (methods, symbols, constant pools, etc.)
tty->print_cr("Permanent generation dump (sizes in bytes, cutoff = %d bytes):", cutoff * BytesPerWord);
#endif
}