File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
#include " hazard_ptr.h"
2
2
3
+ #include " private.h"
4
+
3
5
#include < yt/yt/core/misc/singleton.h>
4
6
#include < yt/yt/core/misc/proc.h>
5
7
#include < yt/yt/core/misc/ring_queue.h>
@@ -23,6 +25,10 @@ using namespace NConcurrency;
23
25
24
26
// //////////////////////////////////////////////////////////////////////////////
25
27
28
+ static constexpr auto & Logger = LockFreeLogger;
29
+
30
+ // //////////////////////////////////////////////////////////////////////////////
31
+
26
32
namespace NDetail {
27
33
28
34
// //////////////////////////////////////////////////////////////////////////////
@@ -319,6 +325,16 @@ bool THazardPointerManager::DoReclaimHazardPointers(THazardThreadState* threadSt
319
325
retireList.push (item);
320
326
});
321
327
328
+ YT_LOG_TRACE_IF (
329
+ !protectedPointers.empty (),
330
+ " Scanning hazard pointers (Candidates: %v, Protected: %v)" ,
331
+ MakeFormattableView (TRingQueueIterableWrapper (retireList), [&] (auto * builder, auto item) {
332
+ builder->AppendFormat (" %v" , TTaggedPtr<void >::Unpack (item.PackedPtr ).Ptr );
333
+ }),
334
+ MakeFormattableView (protectedPointers, [&] (auto * builder, auto ptr) {
335
+ builder->AppendFormat (" %v" , ptr);
336
+ }));
337
+
322
338
size_t pushedCount = 0 ;
323
339
auto popCount = retireList.size ();
324
340
while (popCount-- > 0 ) {
Original file line number Diff line number Diff line change 4
4
5
5
#include < yt/yt/core/concurrency/scheduler_api.h>
6
6
7
+ #include < library/cpp/yt/logging/logger.h>
8
+
7
9
#include < atomic>
8
10
9
11
namespace NYT {
You can’t perform that action at this time.
0 commit comments