# HG changeset patch # User Lukas Stadler # Date 1314883704 -7200 # Node ID 409ef3a68dc837430777341b6476b9dd142c0a16 # Parent dbf8d6a4201fdd4e5516e5c5804e1c092f86d1a5 re-lock objects whose lock was removed by escape analysis, enable stack walking compilation policy (-XX:CompilationPolicyChoice=1) diff -r dbf8d6a4201f -r 409ef3a68dc8 src/share/vm/graal/graalCodeInstaller.cpp --- 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++; diff -r dbf8d6a4201f -r 409ef3a68dc8 src/share/vm/runtime/arguments.cpp --- 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); diff -r dbf8d6a4201f -r 409ef3a68dc8 src/share/vm/runtime/compilationPolicy.cpp --- 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 diff -r dbf8d6a4201f -r 409ef3a68dc8 src/share/vm/runtime/compilationPolicy.hpp --- 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 diff -r dbf8d6a4201f -r 409ef3a68dc8 src/share/vm/runtime/rframe.cpp --- 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());