fprofiler.cpp revision 605
1879N/A# include "incls/_fprofiler.cpp.incl"
1080N/A assert(((r > ThreadProfilerMark::noRegion) && (r < ThreadProfilerMark::maxRegion)), "ThreadProfilerMark::Region out of bounds");
3852N/A tty->print_cr("Printing compiled methods with PC buckets having more than %d ticks", ProfilerPCTickThreshold);
1080N/A int ticks_in_code;
1080N/A int ticks_in_native;
1080N/Aclass ProfilerNode {
1080N/A ProfilerNode() {
3852N/A virtual ~ProfilerNode() {
4132N/A virtual bool is_interpreted() const { return false; }
1080N/A virtual bool is_compiled() const { return false; }
1080N/A virtual bool is_runtime_stub() const{ return false; }
1080N/A virtual bool adapter_match() const { return false; }
1080N/A virtual bool runtimeStub_match(const CodeBlob* stub, const char* name) const { return false; }
1080N/Avoid ProfilerNode::operator delete(void* p){
1080N/A bool is_interpreted() const { return true; }
1080N/A bool is_compiled() const { return true; }
1080N/A const char* _symbol; // The name of the nearest VM symbol (for +ProfileVM). Points to a unique string
1080N/A bool is_compiled() const { return true; }
1080N/A bool adapter_match() const { return true; }
1080N/A const char* _symbol; // The name of the nearest VM symbol when ProfileVM is on. Points to a unique string.
1080N/A runtimeStubNode(const CodeBlob* stub, const char* name, TickPosition where) : ProfilerNode(), _stub(stub), _symbol(name) {
1080N/A bool is_runtime_stub() const { return true; }
1080N/A bool is_compiled() const { return true; }
1080N/A bool is_compiled() const { return true; }
1080N/Avoid ThreadProfiler::runtime_stub_update(const CodeBlob* stub, const char* name, TickPosition where) {
1080N/A bool interval_expired = false;
1080N/A if (ProfileIntervals &&
1080N/A interval_expired = true;
1080N/A for (int j = 0; j < suspendedthreadcount; j++) {
1080N/A for (int i = 0; i < suspendedthreadcount; i++) {
1080N/A if (interval_expired) {
1080N/A if (interval_expired) {
1080N/Avoid ThreadProfiler::record_interpreted_tick(JavaThread* thread, frame fr, TickPosition where, int* ticks) {
3712N/Avoid ThreadProfiler::record_compiled_tick(JavaThread* thread, frame fr, TickPosition where) {
1080N/A // When the class loader starts it marks the ThreadProfiler to tell it it is in the class loader
1080N/A case _thread_in_native:
1080N/A case _thread_in_vm:
1080N/A case _thread_in_vm_trans:
1080N/A case _thread_in_Java:
1080N/A case _thread_in_Java_trans:
1080N/A case _thread_blocked:
1080N/A case _thread_blocked_trans:
1080N/A case _thread_uninitialized:
1080N/A case _thread_new:
1080N/A case _thread_new_trans:
1080N/A thread_ticks = 0;
1080N/A blocked_ticks = 0;
4022N/A compiler_ticks = 0;
1080N/A interpreter_ticks = 0;
1080N/A extra_ticks = 0;
1080N/A extra_ticks = 0;
1080N/A received_gc_ticks = 0;
1080N/A compiler_ticks = 0;
1080N/A deopt_ticks = 0;
1080N/A interpreter_ticks = 0;
1080N/A blocked_ticks = 0;
1080N/A unknown_ticks = 0;
1080N/A received_ticks = 0;
1080N/A delivered_ticks = 0;
1080N/A if (FlatProfiler::bytecode_ticks[index] > 0 || FlatProfiler::bytecode_ticks_stub[index] > 0) {
1080N/A if (thread_ticks <= 0) {
1080N/A bool has_interpreted_ticks = false;
1080N/A int print_count = 0;
1080N/A if (n->is_interpreted()) {
1978N/A if (!has_interpreted_ticks) {
1978N/A has_interpreted_ticks = true;
1978N/A if (has_interpreted_ticks) {
1080N/A bool has_compiled_ticks = false;
1080N/A print_count = 0;
1080N/A if (n->is_compiled()) {
4022N/A if (!has_compiled_ticks) {
4022N/A has_compiled_ticks = true;
1080N/A if (has_compiled_ticks) {
3726N/A bool has_stub_ticks = false;
3726N/A print_count = 0;
1080N/A if (!has_stub_ticks) {
1080N/A has_stub_ticks = true;
1080N/A if (has_stub_ticks) {
1080N/A bool has_runtime_stub_ticks = false;
1978N/A print_count = 0;
1080N/A if (n->is_runtime_stub()) {
4127N/A if (!has_runtime_stub_ticks) {
4127N/A has_runtime_stub_ticks = true;
4127N/A if (has_runtime_stub_ticks) {
4127N/A if (blocked_ticks + class_loader_ticks + interpreter_ticks + compiler_ticks + unknown_ticks() != 0) {
4127N/A if (WizardMode) {
1080N/A if (non_method_ticks() > 0) {
#ifndef PRODUCT
if(ProfileVM){