hotspot/src/share/vm/compiler/compileLog.cpp
changeset 24424 2658d7834c6e
parent 24002 4e6a72032a99
child 25715 d5a8dbdc5150
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   172 }
   172 }
   173 
   173 
   174 void CompileLog::name(ciKlass* k) {
   174 void CompileLog::name(ciKlass* k) {
   175   print(" name='");
   175   print(" name='");
   176   if (!k->is_loaded()) {
   176   if (!k->is_loaded()) {
   177     text()->print(k->name()->as_klass_external_name());
   177     text()->print("%s", k->name()->as_klass_external_name());
   178   } else {
   178   } else {
   179     text()->print(k->external_name());
   179     text()->print("%s", k->external_name());
   180   }
   180   }
   181   print("'");
   181   print("'");
   182 }
   182 }
   183 
   183 
   184 // ------------------------------------------------------------------
   184 // ------------------------------------------------------------------
   301 // CompileLog::inline_success
   301 // CompileLog::inline_success
   302 //
   302 //
   303 // Print about successful method inlining.
   303 // Print about successful method inlining.
   304 void CompileLog::inline_success(const char* reason) {
   304 void CompileLog::inline_success(const char* reason) {
   305   begin_elem("inline_success reason='");
   305   begin_elem("inline_success reason='");
   306   text(reason);
   306   text("%s", reason);
   307   end_elem("'");
   307   end_elem("'");
   308 }
   308 }
   309 
   309 
   310 // ------------------------------------------------------------------
   310 // ------------------------------------------------------------------
   311 // CompileLog::inline_fail
   311 // CompileLog::inline_fail
   312 //
   312 //
   313 // Print about failed method inlining.
   313 // Print about failed method inlining.
   314 void CompileLog::inline_fail(const char* reason) {
   314 void CompileLog::inline_fail(const char* reason) {
   315   begin_elem("inline_fail reason='");
   315   begin_elem("inline_fail reason='");
   316   text(reason);
   316   text("%s", reason);
   317   end_elem("'");
   317   end_elem("'");
   318 }
   318 }
   319 
   319 
   320 // ------------------------------------------------------------------
   320 // ------------------------------------------------------------------
   321 // CompileLog::set_context
   321 // CompileLog::set_context
   337 //
   337 //
   338 // Print code cache state.
   338 // Print code cache state.
   339 void CompileLog::code_cache_state() {
   339 void CompileLog::code_cache_state() {
   340   begin_elem("code_cache");
   340   begin_elem("code_cache");
   341   CodeCache::log_state(this);
   341   CodeCache::log_state(this);
   342   end_elem("");
   342   end_elem("%s", "");
   343 }
   343 }