fprofiler.cpp revision 1472
5165N/A * or visit www.oracle.com if you need additional information or have any
5165N/A# include "incls/_fprofiler.cpp.incl"
initialize();
engaged = false;
_r = r;
assert(((r > ThreadProfilerMark::noRegion) && (r < ThreadProfilerMark::maxRegion)), "ThreadProfilerMark::Region out of bounds");
static int* counters;
static int size() {
static void init();
static void print();
int s = size();
tty->print_cr("Printing compiled methods with PC buckets having more than %d ticks", ProfilerPCTickThreshold);
s = size();
int ticks_in_code;
int ticks_in_native;
int total() const {
switch(where) {
class ProfilerNode {
ProfilerNode() {
virtual ~ProfilerNode() {
if (_next)
delete _next;
virtual bool is_interpreted() const { return false; }
virtual bool is_compiled() const { return false; }
virtual bool is_stub() const { return false; }
virtual bool is_runtime_stub() const{ return false; }
virtual bool adapter_match() const { return false; }
int limit;
char c = (char) k->byte_at(i);
if (limit > 0) {
char c = (char) n->byte_at(i);
if( Verbose ) {
return result;
void ProfilerNode::operator delete(void* p){
bool is_interpreted() const { return true; }
return _method == m;
bool is_compiled() const { return true; }
return _method == m;
const char* _symbol; // The name of the nearest VM symbol (for +ProfileVM). Points to a unique string
bool is_stub() const { return true; }
if(_symbol) {
bool is_compiled() const { return true; }
bool adapter_match() const { return true; }
const char* _symbol; // The name of the nearest VM symbol when ProfileVM is on. Points to a unique string.
runtimeStubNode(const CodeBlob* stub, const char* name, TickPosition where) : ProfilerNode(), _stub(stub), _symbol(name) {
bool is_runtime_stub() const { return true; }
if(_symbol) {
const char *_name;
bool is_compiled() const { return true; }
bool is_compiled() const { return true; }
cp++;
int index = 0;
void ThreadProfiler::runtime_stub_update(const CodeBlob* stub, const char* name, TickPosition where) {
int index = 0;
int index = 0;
void task();
if( ProfileVM ) {
bool interval_expired = false;
if (ProfileIntervals &&
interval_expired = true;
suspendedthreadcount = 0;
for (int j = 0; j < suspendedthreadcount; j++) {
if (tp) {
for (int i = 0; i < suspendedthreadcount; i++) {
if (tp) {
if (interval_expired) {
if (interval_expired) {
if (ProfileVM) {
void ThreadProfiler::record_interpreted_tick(JavaThread* thread, frame fr, TickPosition where, int* ticks) {
case _thread_in_native:
case _thread_in_native_trans:
case _thread_in_vm:
case _thread_in_vm_trans:
case _thread_in_Java:
case _thread_in_Java_trans:
case _thread_blocked:
case _thread_blocked_trans:
case _thread_uninitialized:
case _thread_new:
case _thread_new_trans:
engaged = true;
engaged = false;
thread_ticks = 0;
blocked_ticks = 0;
compiler_ticks = 0;
interpreter_ticks = 0;
class_loader_ticks = 0;
extra_ticks = 0;
if (n != NULL) {
initialize();
if (!task) {
delete task;
if (task) {
disengage();
class_loader_ticks = 0;
extra_ticks = 0;
received_gc_ticks = 0;
vm_operation_ticks = 0;
compiler_ticks = 0;
deopt_ticks = 0;
interpreter_ticks = 0;
blocked_ticks = 0;
unknown_ticks = 0;
received_ticks = 0;
delivered_ticks = 0;
if (ticks > 0) {
if (thread_ticks <= 0) {
int active =
bool has_interpreted_ticks = false;
int print_count = 0;
if (n->is_interpreted()) {
if (!has_interpreted_ticks) {
has_interpreted_ticks = true;
if (has_interpreted_ticks) {
bool has_compiled_ticks = false;
print_count = 0;
if (n->is_compiled()) {
if (!has_compiled_ticks) {
has_compiled_ticks = true;
if (has_compiled_ticks) {
bool has_stub_ticks = false;
print_count = 0;
if (n->is_stub()) {
if (!has_stub_ticks) {
has_stub_ticks = true;
if (has_stub_ticks) {
bool has_runtime_stub_ticks = false;
print_count = 0;
if (n->is_runtime_stub()) {
if (!has_runtime_stub_ticks) {
has_runtime_stub_ticks = true;
if (has_runtime_stub_ticks) {
if (blocked_ticks + class_loader_ticks + interpreter_ticks + compiler_ticks + unknown_ticks() != 0) {
if (WizardMode) {
reset();
if (non_method_ticks() > 0) {
#ifndef PRODUCT
if(ProfileVM){