163 void set_num_inlined_bytecodes(int n) { _num_inlined_bytecodes = n; } 164 165 CompileTask* next() const { return _next; } 166 void set_next(CompileTask* next) { _next = next; } 167 CompileTask* prev() const { return _prev; } 168 void set_prev(CompileTask* prev) { _prev = prev; } 169 bool is_free() const { return _is_free; } 170 void set_is_free(bool val) { _is_free = val; } 171 172 // RedefineClasses support 173 void metadata_do(void f(Metadata*)); 174 void mark_on_stack(); 175 176 private: 177 static void print_impl(outputStream* st, Method* method, int compile_id, int comp_level, 178 bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, 179 const char* msg = NULL, bool short_form = false, bool cr = true); 180 181 public: 182 void print(outputStream* st = tty, const char* msg = NULL, bool short_form = false, bool cr = true); 183 static void print(outputStream* st, const nmethod* nm, const char* msg = NULL, bool short_form = false, bool cr = true) { 184 print_impl(st, nm->method(), nm->compile_id(), nm->comp_level(), 185 nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false, 186 msg, short_form, cr); 187 } 188 189 static void print_inline_indent(int inline_level, outputStream* st = tty); 190 191 void print_tty(); 192 void print_line_on_error(outputStream* st, char* buf, int buflen); 193 194 void log_task(xmlStream* log); 195 void log_task_queued(); 196 void log_task_start(CompileLog* log); 197 void log_task_done(CompileLog* log); 198 199 void set_failure_reason(const char* reason) { 200 _failure_reason = reason; 201 } 202 203 bool check_break_at_flags(); 204 205 static void print_inlining_inner(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL); 206 static void print_inlining_tty(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { 207 print_inlining_inner(tty, method, inline_level, bci, msg); 208 } 209 }; 210 211 #endif // SHARE_VM_COMPILER_COMPILETASK_HPP | 163 void set_num_inlined_bytecodes(int n) { _num_inlined_bytecodes = n; } 164 165 CompileTask* next() const { return _next; } 166 void set_next(CompileTask* next) { _next = next; } 167 CompileTask* prev() const { return _prev; } 168 void set_prev(CompileTask* prev) { _prev = prev; } 169 bool is_free() const { return _is_free; } 170 void set_is_free(bool val) { _is_free = val; } 171 172 // RedefineClasses support 173 void metadata_do(void f(Metadata*)); 174 void mark_on_stack(); 175 176 private: 177 static void print_impl(outputStream* st, Method* method, int compile_id, int comp_level, 178 bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, 179 const char* msg = NULL, bool short_form = false, bool cr = true); 180 181 public: 182 void print(outputStream* st = tty, const char* msg = NULL, bool short_form = false, bool cr = true); 183 void print_ul(const char* msg = NULL){ 184 Log(jit, compilation) log; 185 if (log.is_debug()) { 186 print(log.debug_stream(), msg, /* short form */ true, /* cr */ true); 187 } 188 } 189 static void print(outputStream* st, const nmethod* nm, const char* msg = NULL, bool short_form = false, bool cr = true) { 190 print_impl(st, nm->method(), nm->compile_id(), nm->comp_level(), 191 nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false, 192 msg, short_form, cr); 193 } 194 static void print_ul(const nmethod* nm, const char* msg = NULL) { 195 Log(jit, compilation) log; 196 if (log.is_debug()) { 197 print_impl(log.debug_stream(), nm->method(), nm->compile_id(), 198 nm->comp_level(), nm->is_osr_method(), 199 nm->is_osr_method() ? nm->osr_entry_bci() : -1, 200 /*is_blocking*/ false, 201 msg, /* short form */ true, /* cr */ true); 202 } 203 } 204 205 static void print_inline_indent(int inline_level, outputStream* st = tty); 206 207 void print_tty(); 208 void print_line_on_error(outputStream* st, char* buf, int buflen); 209 210 void log_task(xmlStream* log); 211 void log_task_queued(); 212 void log_task_start(CompileLog* log); 213 void log_task_done(CompileLog* log); 214 215 void set_failure_reason(const char* reason) { 216 _failure_reason = reason; 217 } 218 219 bool check_break_at_flags(); 220 221 static void print_inlining_inner(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL); 222 static void print_inlining_tty(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { 223 print_inlining_inner(tty, method, inline_level, bci, msg); 224 } 225 static void print_inlining_ul(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { 226 Log(jit, inlining) log; 227 if (log.is_debug()) { 228 print_inlining_inner(log.debug_stream(), method, inline_level, bci, msg); 229 } 230 } 231 }; 232 233 #endif // SHARE_VM_COMPILER_COMPILETASK_HPP |