Skip to content

Commit d8291c5

Browse files
committed
Fix likely/unlikely placement in deopt checks
1 parent 57be0a1 commit d8291c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ddprof-lib/src/main/cpp/stackWalker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ __attribute__((no_sanitize("address"))) int StackWalker::walkVM(void* ucontext,
400400
}
401401

402402
if (nm->isInterpreter()) {
403-
if (unlikely(vm_thread != NULL && vm_thread->inDeopt())) {
403+
if (vm_thread != NULL && unlikely(vm_thread->inDeopt())) {
404404
fillFrame(frames[depth++], BCI_ERROR, "break_deopt");
405405
break;
406406
}
@@ -447,7 +447,7 @@ __attribute__((no_sanitize("address"))) int StackWalker::walkVM(void* ucontext,
447447
break;
448448
} else if (nm->isNMethod()) {
449449
// Check if deoptimization is in progress before walking compiled frames
450-
if (unlikely(vm_thread != NULL && vm_thread->inDeopt())) {
450+
if (vm_thread != NULL && unlikely(vm_thread->inDeopt())) {
451451
fillFrame(frames[depth++], BCI_ERROR, "break_deopt_compiled");
452452
break;
453453
}

0 commit comments

Comments
 (0)