Commit 92a2a9b3 authored by Maged Michael's avatar Maged Michael Committed by Facebook GitHub Bot

hazptr: Rename warning function

Summary:
Change name of warning_list_too_large to hazptr_warning_list_too_large for consistency with other hazptr warning functions.

Add missing  FOLLY_EXPORT.

Reviewed By: yfeldblum

Differential Revision: D23436826

fbshipit-source-id: 149c62c9d1cd3320ef525a90c0b591b274228054
parent 2d4d958f
......@@ -307,7 +307,7 @@ class hazptr_domain {
Atom<uint64_t>& sync_time) {
int rcount = rlist.count();
if (rcount > kListTooLarge) {
warning_list_too_large(rlist, lock, rcount);
hazptr_warning_list_too_large(rlist, lock, rcount);
}
if (!(lock && rlist.check_lock()) &&
(rlist.check_threshold_try_zero_count(threshold()) ||
......@@ -322,17 +322,6 @@ class hazptr_domain {
}
}
/** warning_list_too_large **/
FOLLY_NOINLINE void
warning_list_too_large(RetiredList& rlist, bool lock, int rcount) {
static std::atomic<uint64_t> warning_count{0};
if ((warning_count++ % 10000) == 0) {
LOG(WARNING) << "Hazptr retired list too large:"
<< " rlist=" << &rlist << " lock=" << lock
<< " rcount=" << rcount;
}
}
/** check_sync_time_and_reclaim **/
void check_sync_time_and_reclaim() {
if (!tagged_.check_lock() && check_sync_time()) {
......@@ -655,6 +644,16 @@ class hazptr_domain {
}
}
FOLLY_EXPORT FOLLY_NOINLINE void
hazptr_warning_list_too_large(RetiredList& rlist, bool lock, int rcount) {
static std::atomic<uint64_t> warning_count{0};
if ((warning_count++ % 10000) == 0) {
LOG(WARNING) << "Hazptr retired list too large:"
<< " rlist=" << &rlist << " lock=" << lock
<< " rcount=" << rcount;
}
}
FOLLY_EXPORT FOLLY_NOINLINE void hazptr_warning_executor_backlog(
int backlog) {
static std::atomic<uint64_t> warning_count{0};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment