|
@@ -1,5 +1,7 @@
|
|
|
#include "hazard_ptr.h"
|
|
|
|
|
|
+#include "private.h"
|
|
|
+
|
|
|
#include <yt/yt/core/misc/singleton.h>
|
|
|
#include <yt/yt/core/misc/proc.h>
|
|
|
#include <yt/yt/core/misc/ring_queue.h>
|
|
@@ -23,6 +25,10 @@ using namespace NConcurrency;
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
+static constexpr auto& Logger = LockFreeLogger;
|
|
|
+
|
|
|
+////////////////////////////////////////////////////////////////////////////////
|
|
|
+
|
|
|
namespace NDetail {
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -319,6 +325,16 @@ bool THazardPointerManager::DoReclaimHazardPointers(THazardThreadState* threadSt
|
|
|
retireList.push(item);
|
|
|
});
|
|
|
|
|
|
+ YT_LOG_TRACE_IF(
|
|
|
+ !protectedPointers.empty(),
|
|
|
+ "Scanning hazard pointers (Candidates: %v, Protected: %v)",
|
|
|
+ MakeFormattableView(TRingQueueIterableWrapper(retireList), [&] (auto* builder, auto item) {
|
|
|
+ builder->AppendFormat("%v", TTaggedPtr<void>::Unpack(item.PackedPtr).Ptr);
|
|
|
+ }),
|
|
|
+ MakeFormattableView(protectedPointers, [&] (auto* builder, auto ptr) {
|
|
|
+ builder->AppendFormat("%v", ptr);
|
|
|
+ }));
|
|
|
+
|
|
|
size_t pushedCount = 0;
|
|
|
auto popCount = retireList.size();
|
|
|
while (popCount-- > 0) {
|