< prev index next >

src/share/vm/compiler/compileBroker.cpp

Print this page




 155 long CompileBroker::_peak_compilation_time       = 0;
 156 
 157 CompileQueue* CompileBroker::_c2_compile_queue   = NULL;
 158 CompileQueue* CompileBroker::_c1_compile_queue   = NULL;
 159 
 160 
 161 class CompilationLog : public StringEventLog {
 162  public:
 163   CompilationLog() : StringEventLog("Compilation events") {
 164   }
 165 
 166   void log_compile(JavaThread* thread, CompileTask* task) {
 167     StringLogMessage lm;
 168     stringStream sstr = lm.stream();
 169     // msg.time_stamp().update_to(tty->time_stamp().ticks());
 170     task->print_compilation(&sstr, NULL, true, false);
 171     log(thread, "%s", (const char*)lm);
 172   }
 173 
 174   void log_nmethod(JavaThread* thread, nmethod* nm) {
 175     log(thread, "nmethod %d%s " INTPTR_FORMAT " code ["INTPTR_FORMAT ", " INTPTR_FORMAT "]",
 176         nm->compile_id(), nm->is_osr_method() ? "%" : "",
 177         p2i(nm), p2i(nm->code_begin()), p2i(nm->code_end()));
 178   }
 179 
 180   void log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) {
 181     StringLogMessage lm;
 182     lm.print("%4d   COMPILE SKIPPED: %s", task->compile_id(), reason);
 183     if (retry_message != NULL) {
 184       lm.append(" (%s)", retry_message);
 185     }
 186     lm.print("\n");
 187     log(thread, "%s", (const char*)lm);
 188   }
 189 
 190   void log_metaspace_failure(const char* reason) {
 191     ResourceMark rm;
 192     StringLogMessage lm;
 193     lm.print("%4d   COMPILE PROFILING SKIPPED: %s", -1, reason);
 194     lm.print("\n");
 195     log(JavaThread::current(), "%s", (const char*)lm);




 155 long CompileBroker::_peak_compilation_time       = 0;
 156 
 157 CompileQueue* CompileBroker::_c2_compile_queue   = NULL;
 158 CompileQueue* CompileBroker::_c1_compile_queue   = NULL;
 159 
 160 
 161 class CompilationLog : public StringEventLog {
 162  public:
 163   CompilationLog() : StringEventLog("Compilation events") {
 164   }
 165 
 166   void log_compile(JavaThread* thread, CompileTask* task) {
 167     StringLogMessage lm;
 168     stringStream sstr = lm.stream();
 169     // msg.time_stamp().update_to(tty->time_stamp().ticks());
 170     task->print_compilation(&sstr, NULL, true, false);
 171     log(thread, "%s", (const char*)lm);
 172   }
 173 
 174   void log_nmethod(JavaThread* thread, nmethod* nm) {
 175     log(thread, "nmethod %d%s " INTPTR_FORMAT " code [" INTPTR_FORMAT ", " INTPTR_FORMAT "]",
 176         nm->compile_id(), nm->is_osr_method() ? "%" : "",
 177         p2i(nm), p2i(nm->code_begin()), p2i(nm->code_end()));
 178   }
 179 
 180   void log_failure(JavaThread* thread, CompileTask* task, const char* reason, const char* retry_message) {
 181     StringLogMessage lm;
 182     lm.print("%4d   COMPILE SKIPPED: %s", task->compile_id(), reason);
 183     if (retry_message != NULL) {
 184       lm.append(" (%s)", retry_message);
 185     }
 186     lm.print("\n");
 187     log(thread, "%s", (const char*)lm);
 188   }
 189 
 190   void log_metaspace_failure(const char* reason) {
 191     ResourceMark rm;
 192     StringLogMessage lm;
 193     lm.print("%4d   COMPILE PROFILING SKIPPED: %s", -1, reason);
 194     lm.print("\n");
 195     log(JavaThread::current(), "%s", (const char*)lm);


< prev index next >