Mercurial > hg > graal-jvmci-8
diff src/share/vm/compiler/compileLog.cpp @ 6843:c3e799c37717
7177003: C1: LogCompilation support
Summary: add LogCompilation support in C1 - both client and tiered mode.
Reviewed-by: twisti, kvn
author | vlivanov |
---|---|
date | Fri, 05 Oct 2012 18:57:10 -0700 |
parents | 9191895df19d |
children | cc32ccaaf47f |
line wrap: on
line diff
--- a/src/share/vm/compiler/compileLog.cpp Fri Oct 05 13:37:08 2012 -0700 +++ b/src/share/vm/compiler/compileLog.cpp Fri Oct 05 18:57:10 2012 -0700 @@ -302,3 +302,48 @@ char buf[4 * K]; finish_log_on_error(file, buf, sizeof(buf)); } + +// ------------------------------------------------------------------ +// CompileLog::inline_success +// +// Print about successful method inlining. +void CompileLog::inline_success(const char* reason) { + begin_elem("inline_success reason='"); + text(reason); + end_elem("'"); +} + +// ------------------------------------------------------------------ +// CompileLog::inline_fail +// +// Print about failed method inlining. +void CompileLog::inline_fail(const char* reason) { + begin_elem("inline_fail reason='"); + text(reason); + end_elem("'"); +} + +// ------------------------------------------------------------------ +// CompileLog::set_context +// +// Set XML tag as an optional marker - it is printed only if +// there are other entries after until it is reset. +void CompileLog::set_context(const char* format, ...) { + va_list ap; + va_start(ap, format); + clear_context(); + _context.print("<"); + _context.vprint(format, ap); + _context.print_cr("/>"); + va_end(ap); +} + +// ------------------------------------------------------------------ +// CompileLog::code_cache_state +// +// Print code cache state. +void CompileLog::code_cache_state() { + begin_elem("code_cache"); + CodeCache::log_state(this); + end_elem(""); +}