Skip to content

Commit ba9e7ad

Browse files
committed
Fix marking-cycle solution
1 parent 471c48d commit ba9e7ad

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/hotspot/cpu/x86/continuationChunk_x86.inline.hpp

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,25 +230,30 @@ void Continuation::stack_chunk_iterate_stack(oop chunk, OopClosureType* closure)
230230
address pc = *(address*)(sp - 1);
231231
log_develop_trace(jvmcont)("stack_chunk_iterate_stack sp: %ld pc: " INTPTR_FORMAT, sp - start, p2i(pc));
232232
assert (pc != NULL, "");
233+
if (Continuation::is_return_barrier_entry(pc)) {
234+
assert ((int)(sp - start) < jdk_internal_misc_StackChunk::sp(chunk), ""); // only happens when starting from gcSP
235+
break;
236+
}
233237

234238
int slot;
235239
cb = ContinuationCodeBlobLookup::find_blob_and_oopmap(pc, slot);
236240
assert (cb != NULL, "");
237241
assert (cb->is_compiled(), "");
238242
assert (cb->frame_size() > 0, "");
239-
assert (!cb->as_compiled_method()->is_deopt_pc(pc), "");
240243

241-
assert (slot >= 0, "");
244+
// assert (!cb->as_compiled_method()->is_deopt_pc(pc), "");
245+
// assert (slot >= 0, "");
242246
const ImmutableOopMap* oopmap = cb->oop_map_for_slot(slot, pc);
243-
// if (LIKELY(slot >= 0)) {
244-
// oopmap = cb->oop_map_for_slot(slot, pc);
245-
// } else {
246-
// CompiledMethod* cm = cb->as_compiled_method();
247-
// assert (cm->is_deopt_pc(pc), "");
248-
// pc = *(address*)((address)sp + cm->orig_pc_offset());
249-
// oopmap = cb->oop_map_for_return_address(pc);
250-
// }
247+
if (LIKELY(slot >= 0)) {
248+
oopmap = cb->oop_map_for_slot(slot, pc);
249+
} else {
250+
CompiledMethod* cm = cb->as_compiled_method();
251+
assert (cm->is_deopt_pc(pc), "");
252+
pc = *(address*)((address)sp + cm->orig_pc_offset());
253+
oopmap = cb->oop_map_for_return_address(pc);
254+
}
251255
assert (oopmap != NULL, "");
256+
252257
log_develop_trace(jvmcont)("stack_chunk_iterate_stack slot: %d codeblob:", slot);
253258
if (log_develop_is_enabled(Trace, jvmcont)) cb->print_value_on(tty);
254259

0 commit comments

Comments
 (0)