Mercurial > hg > graal-compiler
changeset 3568:409ef3a68dc8
re-lock objects whose lock was removed by escape analysis, enable stack walking compilation policy (-XX:CompilationPolicyChoice=1)
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 01 Sep 2011 15:28:24 +0200 |
parents | dbf8d6a4201f |
children | da1b32a58d7e |
files | src/share/vm/graal/graalCodeInstaller.cpp src/share/vm/runtime/arguments.cpp src/share/vm/runtime/compilationPolicy.cpp src/share/vm/runtime/compilationPolicy.hpp src/share/vm/runtime/rframe.cpp |
diffstat | 5 files changed, 16 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Sep 01 09:52:58 2011 +0200 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Sep 01 15:28:24 2011 +0200 @@ -526,7 +526,8 @@ LocationValue* loc = (LocationValue*)value; int monitor_offset = loc->location().stack_offset(); LocationValue* obj = new LocationValue(Location::new_stk_loc(Location::oop, monitor_offset + BasicObjectLock::obj_offset_in_bytes())); - monitors->append(new MonitorValue(obj, Location::new_stk_loc(Location::normal, monitor_offset + BasicObjectLock::lock_offset_in_bytes()))); + bool eliminated = value->is_object(); + monitors->append(new MonitorValue(obj, Location::new_stk_loc(Location::normal, monitor_offset + BasicObjectLock::lock_offset_in_bytes()), eliminated)); } if (second != NULL) { i++;
--- a/src/share/vm/runtime/arguments.cpp Thu Sep 01 09:52:58 2011 +0200 +++ b/src/share/vm/runtime/arguments.cpp Thu Sep 01 15:28:24 2011 +0200 @@ -2018,7 +2018,7 @@ if (UseGraal) { if (PrintVMOptions) { - tty->print("Running Graal VM... "); + tty->print_cr("Running Graal VM... "); } const int BUFFER_SIZE = 1024; char maxine_dir[BUFFER_SIZE]; @@ -2026,7 +2026,7 @@ if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { fatal("Must set MAXINE environment variable to a Maxine project directory."); } - if (PrintVMOptions) tty->print("MAXINE=%s", maxine_dir); + if (PrintVMOptions) tty->print_cr("MAXINE=%s", maxine_dir); SysClassPath scp_compiler(Arguments::get_sysclasspath()); sprintf(temp, "%s/com.oracle.max.cri/bin", maxine_dir); scp_compiler.add_prefix(temp);
--- a/src/share/vm/runtime/compilationPolicy.cpp Thu Sep 01 09:52:58 2011 +0200 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu Sep 01 15:28:24 2011 +0200 @@ -60,11 +60,11 @@ break; case 1: -#ifdef COMPILER2 +//#ifdef COMPILER2 CompilationPolicy::set_policy(new StackWalkCompPolicy()); -#else - Unimplemented(); -#endif +//#else +// Unimplemented(); +//#endif break; case 2: #ifdef TIERED @@ -422,7 +422,7 @@ } // StackWalkCompPolicy - walk up stack to find a suitable method to compile -#ifdef COMPILER2 +//#ifdef COMPILER2 const char* StackWalkCompPolicy::_msg = NULL; @@ -649,4 +649,4 @@ -#endif // COMPILER2 +//#endif // COMPILER2
--- a/src/share/vm/runtime/compilationPolicy.hpp Thu Sep 01 09:52:58 2011 +0200 +++ b/src/share/vm/runtime/compilationPolicy.hpp Thu Sep 01 15:28:24 2011 +0200 @@ -114,7 +114,7 @@ // StackWalkCompPolicy - existing C2 policy -#ifdef COMPILER2 +//#ifdef COMPILER2 class StackWalkCompPolicy : public NonTieredCompPolicy { public: virtual void method_invocation_event(methodHandle m, TRAPS); @@ -134,6 +134,6 @@ // negative filter: should send NOT be inlined? returns NULL (--> inline) or rejection msg }; -#endif +//#endif #endif // SHARE_VM_RUNTIME_COMPILATIONPOLICY_HPP
--- a/src/share/vm/runtime/rframe.cpp Thu Sep 01 09:52:58 2011 +0200 +++ b/src/share/vm/runtime/rframe.cpp Thu Sep 01 15:28:24 2011 +0200 @@ -152,11 +152,11 @@ void RFrame::print(const char* kind) { #ifndef PRODUCT -#ifdef COMPILER2 +//#ifdef COMPILER2 int cnt = top_method()->interpreter_invocation_count(); -#else - int cnt = top_method()->invocation_count(); -#endif +//#else +// int cnt = top_method()->invocation_count(); +//#endif tty->print("%3d %s ", _num, is_interpreted() ? "I" : "C"); top_method()->print_short_name(tty); tty->print_cr(": inv=%5d(%d) cst=%4d", _invocations, cnt, cost());