8136421: JEP 243: Java-Level JVM Compiler Interface

Reviewed-by: ihse, alanb, roland, coleenp, iveresov, kvn, kbarrett
This commit is contained in:
Christian Thalinger 2015-10-08 12:49:30 -10:00
parent f5b4bb46f5
commit 16526e000e
505 changed files with 50394 additions and 915 deletions

View file

@ -26,6 +26,7 @@
#include "precompiled.hpp"
#include "code/codeCache.hpp"
#include "compiler/compileBroker.hpp"
#include "compiler/disassembler.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "prims/whitebox.hpp"
#include "runtime/arguments.hpp"
@ -511,11 +512,15 @@ void VMError::report(outputStream* st) {
JDK_Version::runtime_version() : "";
st->print_cr("# JRE version: %s (%s) (build %s)", runtime_name, buf, runtime_version);
// This is the long version with some default settings added
st->print_cr("# Java VM: %s (%s, %s%s%s, %s, %s)",
st->print_cr("# Java VM: %s (%s, %s%s%s%s%s, %s, %s)",
Abstract_VM_Version::vm_name(),
Abstract_VM_Version::vm_release(),
Abstract_VM_Version::vm_info_string(),
TieredCompilation ? ", tiered" : "",
#if INCLUDE_JVMCI
EnableJVMCI ? ", jvmci" : "",
UseJVMCICompiler ? ", jvmci compiler" : "",
#endif
UseCompressedOops ? ", compressed oops" : "",
gc_mode(),
Abstract_VM_Version::vm_platform_string()
@ -704,6 +709,31 @@ void VMError::report(outputStream* st) {
st->cr();
}
STEP(265, "(printing code blob if possible)")
if (_verbose && _context) {
CodeBlob* cb = CodeCache::find_blob(_pc);
if (cb != NULL) {
if (Interpreter::contains(_pc)) {
// The interpreter CodeBlob is very large so try to print the codelet instead.
InterpreterCodelet* codelet = Interpreter::codelet_containing(_pc);
if (codelet != NULL) {
codelet->print_on(st);
Disassembler::decode(codelet->code_begin(), codelet->code_end(), st);
}
} else {
StubCodeDesc* desc = StubCodeDesc::desc_for(_pc);
if (desc != NULL) {
desc->print_on(st);
Disassembler::decode(desc->begin(), desc->end(), st);
} else {
Disassembler::decode(cb, st);
st->cr();
}
}
}
}
STEP(270, "(printing VM operation)" )
if (_verbose && _thread && _thread->is_VM_thread()) {