aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto
diff options
context:
space:
mode:
authorvlivanov <none@none>2012-10-05 18:57:10 -0700
committervlivanov <none@none>2012-10-05 18:57:10 -0700
commit9d5d9c42858e4410031b5d7867693e8324105a64 (patch)
treeb58f3c1fd56473ba76ad5bfbdd9a8269d6dc1b5d /src/share/vm/opto
parent60358ae2bcd95c00730bde44f23206c48dbe5b70 (diff)
7177003: C1: LogCompilation support
Summary: add LogCompilation support in C1 - both client and tiered mode. Reviewed-by: twisti, kvn
Diffstat (limited to 'src/share/vm/opto')
-rw-r--r--src/share/vm/opto/bytecodeInfo.cpp4
-rw-r--r--src/share/vm/opto/compile.cpp3
-rw-r--r--src/share/vm/opto/parse1.cpp6
3 files changed, 7 insertions, 6 deletions
diff --git a/src/share/vm/opto/bytecodeInfo.cpp b/src/share/vm/opto/bytecodeInfo.cpp
index 00632a239..a357cceb3 100644
--- a/src/share/vm/opto/bytecodeInfo.cpp
+++ b/src/share/vm/opto/bytecodeInfo.cpp
@@ -439,9 +439,7 @@ WarmCallInfo* InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms,
WarmCallInfo wci = *(initial_wci);
failure_msg = try_to_inline(callee_method, caller_method, caller_bci, profile, &wci);
if (failure_msg != NULL && C->log() != NULL) {
- C->log()->begin_elem("inline_fail reason='");
- C->log()->text("%s", failure_msg);
- C->log()->end_elem("'");
+ C->log()->inline_fail(failure_msg);
}
#ifndef PRODUCT
diff --git a/src/share/vm/opto/compile.cpp b/src/share/vm/opto/compile.cpp
index 36933f976..cefd4674c 100644
--- a/src/share/vm/opto/compile.cpp
+++ b/src/share/vm/opto/compile.cpp
@@ -828,6 +828,9 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
has_unsafe_access(),
SharedRuntime::is_wide_vector(max_vector_size())
);
+
+ if (log() != NULL) // Print code cache state into compiler log
+ log()->code_cache_state();
}
}
diff --git a/src/share/vm/opto/parse1.cpp b/src/share/vm/opto/parse1.cpp
index c3daeecc8..d0b52f554 100644
--- a/src/share/vm/opto/parse1.cpp
+++ b/src/share/vm/opto/parse1.cpp
@@ -1381,8 +1381,7 @@ void Parse::do_one_block() {
// that occur during parsing of this BC. If there is no log
// output until the next context string, this context string
// will be silently ignored.
- log->context()->reset();
- log->context()->print_cr("<bc code='%d' bci='%d'/>", (int)bc(), bci());
+ log->set_context("bc code='%d' bci='%d'", (int)bc(), bci());
}
if (block()->has_trap_at(bci())) {
@@ -1411,7 +1410,8 @@ void Parse::do_one_block() {
NOT_PRODUCT( parse_histogram()->record_change(); );
- if (log != NULL) log->context()->reset(); // done w/ this one
+ if (log != NULL)
+ log->clear_context(); // skip marker if nothing was printed
// Fall into next bytecode. Each bytecode normally has 1 sequential
// successor which is typically made ready by visiting this bytecode.