Skip to content

Commit e43960a

Browse files
author
David Holmes
committed
8350616: Skip ValidateHazardPtrsClosure in non-debug builds
Reviewed-by: kbarrett, tschatzl, shade
1 parent 9ec4696 commit e43960a

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
@@ -366,6 +366,7 @@ class ScanHazardPtrPrintMatchingThreadsClosure : public ThreadClosure {
366366
}
367367
};
368368

369+
#ifdef ASSERT
369370
// Closure to validate hazard ptrs.
370371
//
371372
class ValidateHazardPtrsClosure : public ThreadClosure {
@@ -386,6 +387,7 @@ class ValidateHazardPtrsClosure : public ThreadClosure {
386387
p2i(thread));
387388
}
388389
};
390+
#endif
389391

390392
// Closure to determine if the specified JavaThread is found by
391393
// threads_do().
@@ -950,8 +952,10 @@ void ThreadsSMRSupport::free_list(ThreadsList* threads) {
950952
log_debug(thread, smr)("tid=%zu: ThreadsSMRSupport::free_list: threads=" INTPTR_FORMAT " is not freed.", os::current_thread_id(), p2i(threads));
951953
}
952954

955+
#ifdef ASSERT
953956
ValidateHazardPtrsClosure validate_cl;
954957
threads_do(&validate_cl);
958+
#endif
955959

956960
delete scan_table;
957961
}

0 commit comments

Comments
 (0)