+ CDS_EXPORT_API void smr::statistics( stat& st )
+ {
+ st.clear();
+# ifdef CDS_ENABLE_HPSTAT
+ for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ))
+ {
+ CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
+ ++st.thread_rec_count;
+ st.guard_allocated += hprec->hazards_.alloc_guard_count_;
+ st.guard_freed += hprec->hazards_.free_guard_count_;
+ st.hp_extend_count += hprec->hazards_.extend_call_count_;
+ st.retired_count += hprec->retired_.retire_call_count_;
+ st.retired_extend_count += hprec->retired_.extend_call_count_;
+ st.free_count += hprec->free_call_count_;
+ st.scan_count += hprec->scan_call_count_;
+ st.help_scan_count += hprec->help_scan_call_count_;
+ CDS_TSAN_ANNOTATE_IGNORE_READS_END;
+ }
+
+ CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
+ st.hp_block_count = hp_allocator_.block_allocated_.load( atomics::memory_order_relaxed );
+ st.retired_block_count = retired_allocator_.block_allocated_.load( atomics::memory_order_relaxed );
+ CDS_TSAN_ANNOTATE_IGNORE_READS_END;
+# endif
+ }
+
+