--- a/hotspot/src/share/vm/runtime/deoptimization.cpp Sat Jan 07 10:39:23 2012 -0800
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp Sat Jan 07 13:26:43 2012 -0800
@@ -211,7 +211,7 @@
#ifdef COMPILER2
// Reallocate the non-escaping objects and restore their fields. Then
// relock objects if synchronization on them was eliminated.
- if (DoEscapeAnalysis) {
+ if (DoEscapeAnalysis || EliminateNestedLocks) {
if (EliminateAllocations) {
assert (chunk->at(0)->scope() != NULL,"expect only compiled java frames");
GrowableArray<ScopeValue*>* objects = chunk->at(0)->scope()->objects();