52 nmethodLocker* _code_handle; // holder of eventual result |
53 nmethodLocker* _code_handle; // holder of eventual result |
53 CompileTask* _next, *_prev; |
54 CompileTask* _next, *_prev; |
54 |
55 |
55 // Fields used for logging why the compilation was initiated: |
56 // Fields used for logging why the compilation was initiated: |
56 jlong _time_queued; // in units of os::elapsed_counter() |
57 jlong _time_queued; // in units of os::elapsed_counter() |
57 jobject _hot_method; // which method actually triggered this task |
58 Method* _hot_method; // which method actually triggered this task |
|
59 jobject _hot_method_loader; |
58 int _hot_count; // information about its invocation counter |
60 int _hot_count; // information about its invocation counter |
59 const char* _comment; // more info about the task |
61 const char* _comment; // more info about the task |
60 |
62 |
61 public: |
63 public: |
62 CompileTask() { |
64 CompileTask() { |
68 bool is_blocking); |
70 bool is_blocking); |
69 |
71 |
70 void free(); |
72 void free(); |
71 |
73 |
72 int compile_id() const { return _compile_id; } |
74 int compile_id() const { return _compile_id; } |
73 jobject method_handle() const { return _method; } |
75 Method* method() const { return _method; } |
74 int osr_bci() const { return _osr_bci; } |
76 int osr_bci() const { return _osr_bci; } |
75 bool is_complete() const { return _is_complete; } |
77 bool is_complete() const { return _is_complete; } |
76 bool is_blocking() const { return _is_blocking; } |
78 bool is_blocking() const { return _is_blocking; } |
77 bool is_success() const { return _is_success; } |
79 bool is_success() const { return _is_success; } |
78 |
80 |
96 void set_next(CompileTask* next) { _next = next; } |
98 void set_next(CompileTask* next) { _next = next; } |
97 CompileTask* prev() const { return _prev; } |
99 CompileTask* prev() const { return _prev; } |
98 void set_prev(CompileTask* prev) { _prev = prev; } |
100 void set_prev(CompileTask* prev) { _prev = prev; } |
99 |
101 |
100 private: |
102 private: |
101 static void print_compilation_impl(outputStream* st, methodOop method, int compile_id, int comp_level, |
103 static void print_compilation_impl(outputStream* st, Method* method, int compile_id, int comp_level, |
102 bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, |
104 bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, |
103 const char* msg = NULL, bool short_form = false); |
105 const char* msg = NULL, bool short_form = false); |
104 |
106 |
105 public: |
107 public: |
106 void print_compilation(outputStream* st = tty, bool short_form = false); |
108 void print_compilation(outputStream* st = tty, bool short_form = false); |
112 |
114 |
113 static void print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL); |
115 static void print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL); |
114 static void print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { |
116 static void print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { |
115 print_inlining(tty, method, inline_level, bci, msg); |
117 print_inlining(tty, method, inline_level, bci, msg); |
116 } |
118 } |
|
119 |
|
120 // Redefine Classes support |
|
121 void mark_on_stack(); |
117 |
122 |
118 static void print_inline_indent(int inline_level, outputStream* st = tty); |
123 static void print_inline_indent(int inline_level, outputStream* st = tty); |
119 |
124 |
120 void print(); |
125 void print(); |
121 void print_line(); |
126 void print_line(); |
398 // Return total compilation ticks |
406 // Return total compilation ticks |
399 static jlong total_compilation_ticks() { |
407 static jlong total_compilation_ticks() { |
400 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0; |
408 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0; |
401 } |
409 } |
402 |
410 |
|
411 // Redefine Classes support |
|
412 static void mark_on_stack(); |
|
413 |
403 // Print a detailed accounting of compilation time |
414 // Print a detailed accounting of compilation time |
404 static void print_times(); |
415 static void print_times(); |
405 |
416 |
406 // Debugging output for failure |
417 // Debugging output for failure |
407 static void print_last_compile(); |
418 static void print_last_compile(); |