Skip to content

Commit 03828f8

Browse files
Satyen Subramaniamshipilev
authored andcommitted
8350616: Skip ValidateHazardPtrsClosure in non-debug builds
Backport-of: e43960a0170bf29b28ff4733e1c8c927947fb0bb
1 parent 682c939 commit 03828f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/hotspot/share/runtime/threadSMR.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ class ScanHazardPtrPrintMatchingThreadsClosure : public ThreadClosure {
367367
}
368368
};
369369

370+
#ifdef ASSERT
370371
// Closure to validate hazard ptrs.
371372
//
372373
class ValidateHazardPtrsClosure : public ThreadClosure {
@@ -387,6 +388,7 @@ class ValidateHazardPtrsClosure : public ThreadClosure {
387388
p2i(thread));
388389
}
389390
};
391+
#endif
390392

391393
// Closure to determine if the specified JavaThread is found by
392394
// threads_do().
@@ -928,8 +930,10 @@ void ThreadsSMRSupport::free_list(ThreadsList* threads) {
928930
log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::free_list: threads=" INTPTR_FORMAT " is not freed.", os::current_thread_id(), p2i(threads));
929931
}
930932

933+
#ifdef ASSERT
931934
ValidateHazardPtrsClosure validate_cl;
932935
threads_do(&validate_cl);
936+
#endif
933937

934938
delete scan_table;
935939
}

0 commit comments

Comments
 (0)