summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruzhas <[email protected]>2023-06-14 13:08:27 +0300
committeruzhas <[email protected]>2023-06-14 13:08:27 +0300
commit5facf65aed282ca187d0c765579747e30b442664 (patch)
treebda6d9fc1d65c0ee6ece2fece9fbdc1c2903e8f8
parent4b972da4fb8c047e6c1b876f3d026f213cade3b7 (diff)
fix build with enabled PROFILE_MEMORY_ALLOCATIONS
-rw-r--r--library/cpp/actors/prof/tag.cpp5
-rw-r--r--library/cpp/actors/prof/ya.make1
-rw-r--r--ydb/core/mon_alloc/CMakeLists.darwin-x86_64.txt1
-rw-r--r--ydb/core/mon_alloc/CMakeLists.linux-aarch64.txt1
-rw-r--r--ydb/core/mon_alloc/CMakeLists.linux-x86_64.txt1
-rw-r--r--ydb/core/mon_alloc/CMakeLists.windows-x86_64.txt1
-rw-r--r--ydb/core/mon_alloc/monitor.cpp5
-rw-r--r--ydb/core/mon_alloc/ya.make1
8 files changed, 12 insertions, 4 deletions
diff --git a/library/cpp/actors/prof/tag.cpp b/library/cpp/actors/prof/tag.cpp
index 9ccf03e1a97..488d79e4d2d 100644
--- a/library/cpp/actors/prof/tag.cpp
+++ b/library/cpp/actors/prof/tag.cpp
@@ -8,6 +8,7 @@
#if defined(PROFILE_MEMORY_ALLOCATIONS)
#include <library/cpp/lfalloc/dbg_info/dbg_info.h>
#include <library/cpp/ytalloc/api/ytalloc.h>
+#include <library/cpp/yt/memory/memory_tag.h>
#endif
#include <util/generic/singleton.h>
@@ -83,8 +84,8 @@ namespace NProfiling {
#if defined(PROFILE_MEMORY_ALLOCATIONS)
static ui32 SetThreadAllocTag_YT(ui32 tag) {
- auto prev = NYT::NYTAlloc::GetCurrentMemoryTag();
- NYT::NYTAlloc::SetCurrentMemoryTag(tag);
+ auto prev = NYT::GetCurrentMemoryTag();
+ NYT::SetCurrentMemoryTag(tag);
return prev;
}
diff --git a/library/cpp/actors/prof/ya.make b/library/cpp/actors/prof/ya.make
index ca29f6cf390..4bae10a4439 100644
--- a/library/cpp/actors/prof/ya.make
+++ b/library/cpp/actors/prof/ya.make
@@ -17,6 +17,7 @@ IF (PROFILE_MEMORY_ALLOCATIONS)
library/cpp/malloc/api
library/cpp/lfalloc/dbg_info
library/cpp/ytalloc/api
+ library/cpp/yt/memory
)
ENDIF()
diff --git a/ydb/core/mon_alloc/CMakeLists.darwin-x86_64.txt b/ydb/core/mon_alloc/CMakeLists.darwin-x86_64.txt
index 76a8322a605..c315b65d41b 100644
--- a/ydb/core/mon_alloc/CMakeLists.darwin-x86_64.txt
+++ b/ydb/core/mon_alloc/CMakeLists.darwin-x86_64.txt
@@ -20,6 +20,7 @@ target_link_libraries(ydb-core-mon_alloc PUBLIC
cpp-malloc-api
monlib-service-pages
cpp-ytalloc-api
+ cpp-yt-memory
ydb-core-base
ydb-core-control
)
diff --git a/ydb/core/mon_alloc/CMakeLists.linux-aarch64.txt b/ydb/core/mon_alloc/CMakeLists.linux-aarch64.txt
index 242c4e37057..64c82607651 100644
--- a/ydb/core/mon_alloc/CMakeLists.linux-aarch64.txt
+++ b/ydb/core/mon_alloc/CMakeLists.linux-aarch64.txt
@@ -21,6 +21,7 @@ target_link_libraries(ydb-core-mon_alloc PUBLIC
cpp-malloc-api
monlib-service-pages
cpp-ytalloc-api
+ cpp-yt-memory
ydb-core-base
ydb-core-control
)
diff --git a/ydb/core/mon_alloc/CMakeLists.linux-x86_64.txt b/ydb/core/mon_alloc/CMakeLists.linux-x86_64.txt
index 242c4e37057..64c82607651 100644
--- a/ydb/core/mon_alloc/CMakeLists.linux-x86_64.txt
+++ b/ydb/core/mon_alloc/CMakeLists.linux-x86_64.txt
@@ -21,6 +21,7 @@ target_link_libraries(ydb-core-mon_alloc PUBLIC
cpp-malloc-api
monlib-service-pages
cpp-ytalloc-api
+ cpp-yt-memory
ydb-core-base
ydb-core-control
)
diff --git a/ydb/core/mon_alloc/CMakeLists.windows-x86_64.txt b/ydb/core/mon_alloc/CMakeLists.windows-x86_64.txt
index 76a8322a605..c315b65d41b 100644
--- a/ydb/core/mon_alloc/CMakeLists.windows-x86_64.txt
+++ b/ydb/core/mon_alloc/CMakeLists.windows-x86_64.txt
@@ -20,6 +20,7 @@ target_link_libraries(ydb-core-mon_alloc PUBLIC
cpp-malloc-api
monlib-service-pages
cpp-ytalloc-api
+ cpp-yt-memory
ydb-core-base
ydb-core-control
)
diff --git a/ydb/core/mon_alloc/monitor.cpp b/ydb/core/mon_alloc/monitor.cpp
index 652d5bdf4ab..6cef4646960 100644
--- a/ydb/core/mon_alloc/monitor.cpp
+++ b/ydb/core/mon_alloc/monitor.cpp
@@ -14,6 +14,7 @@
#include <library/cpp/monlib/dynamic_counters/counters.h>
#include <library/cpp/monlib/service/pages/templates.h>
#include <library/cpp/ytalloc/api/ytalloc.h>
+#include <library/cpp/yt/memory/memory_tag.h>
#include <util/datetime/base.h>
#include <util/generic/hash.h>
@@ -270,7 +271,7 @@ namespace NKikimr {
void Update(TDuration interval) override {
Y_UNUSED(interval);
#ifdef PROFILE_MEMORY_ALLOCATIONS
- using namespace NYT::NYTAlloc;
+ using namespace NYT;
size_t maxTag = NProfiling::GetTagsCount();
@@ -303,7 +304,7 @@ namespace NKikimr {
void Dump(IOutputStream& out, const TString& relPath) override {
Y_UNUSED(relPath);
#ifdef PROFILE_MEMORY_ALLOCATIONS
- using namespace NYT::NYTAlloc;
+ using namespace NYT;
size_t maxTag = NProfiling::GetTagsCount();
diff --git a/ydb/core/mon_alloc/ya.make b/ydb/core/mon_alloc/ya.make
index b5e1f8f188d..c481022b424 100644
--- a/ydb/core/mon_alloc/ya.make
+++ b/ydb/core/mon_alloc/ya.make
@@ -23,6 +23,7 @@ PEERDIR(
library/cpp/malloc/api
library/cpp/monlib/service/pages
library/cpp/ytalloc/api
+ library/cpp/yt/memory
ydb/core/base
ydb/core/control
)