summaryrefslogtreecommitdiffstats
path: root/library/cpp/balloc/lib/alloc_stats.h
diff options
context:
space:
mode:
authorudovichenko-r <[email protected]>2022-07-04 14:16:38 +0300
committerudovichenko-r <[email protected]>2022-07-04 14:16:38 +0300
commit5fe1c2b2d90b4ddbd7d1683191a48851363cf53d (patch)
treec413b43fb69611ff1185ead7813a8e0973dca3dc /library/cpp/balloc/lib/alloc_stats.h
parentf9651ab5ad67347bf06d6d0789b5d6eb31a7b2cc (diff)
[KIKIMR-15108] Add perf programs to build
ref:8f081efde09627da76e52231d32a83e34b78c1e4
Diffstat (limited to 'library/cpp/balloc/lib/alloc_stats.h')
-rw-r--r--library/cpp/balloc/lib/alloc_stats.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/library/cpp/balloc/lib/alloc_stats.h b/library/cpp/balloc/lib/alloc_stats.h
new file mode 100644
index 00000000000..a36686cc85f
--- /dev/null
+++ b/library/cpp/balloc/lib/alloc_stats.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <util/system/types.h>
+
+namespace NAllocStats {
+
+bool IsEnabled() noexcept;
+void EnableAllocStats(bool enable) noexcept;
+void IncThreadAllocStats(i64 size) noexcept;
+void DecThreadAllocStats(i64 size) noexcept;
+void ResetThreadAllocStats() noexcept;
+i64 GetThreadAllocMax() noexcept;
+void IncLiveLockCounter() noexcept;
+ui64 GetLiveLockCounter() noexcept;
+void IncMmapCounter(ui64 amount) noexcept;
+ui64 GetMmapCounter() noexcept;
+
+} // namespace NAllocStats