src/share/vm/runtime/deoptimization.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/deoptimization.cpp Mon Feb 8 11:00:34 2010
--- new/src/share/vm/runtime/deoptimization.cpp Mon Feb 8 11:00:34 2010
*** 143,152 ****
--- 143,165 ----
// relock objects if synchronization on them was eliminated.
if (DoEscapeAnalysis) {
if (EliminateAllocations) {
assert (chunk->at(0)->scope() != NULL,"expect only compiled java frames");
GrowableArray<ScopeValue*>* objects = chunk->at(0)->scope()->objects();
+ bool save_oop_result = chunk->at(0)->scope()->return_oop();
+ Handle return_value;
+ if (save_oop_result) {
+ // Reallocation may trigger GC. If deoptimization happened on return from
+ // call which returns oop we need to save it since it is not in oopmap.
+ oop result = deoptee.saved_oop_result(&map);
+ assert(result == NULL || result->is_oop(), "must be oop");
+ return_value = Handle(thread, result);
+ assert(Universe::heap()->is_in_or_null(result), "must be heap pointer");
+ if (TraceDeoptimization) {
+ tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, result, thread);
+ }
+ }
bool reallocated = false;
if (objects != NULL) {
JRT_BLOCK
reallocated = realloc_objects(thread, &deoptee, objects, THREAD);
JRT_END
*** 159,169 ****
--- 172,186 ----
tty->print_cr("REALLOC OBJECTS in thread " INTPTR_FORMAT, thread);
print_objects(objects);
}
#endif
}
+ if (save_oop_result) {
+ // Restore result.
+ deoptee.set_saved_oop_result(&map, return_value());
}
+ }
if (EliminateLocks) {
#ifndef PRODUCT
bool first = true;
#endif
for (int i = 0; i < chunk->length(); i++) {
src/share/vm/runtime/deoptimization.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File