Skip to content

Commit 9cd4dc6

Browse files
committed
Better fix
1 parent bb8d479 commit 9cd4dc6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

ydb/core/mon_alloc/tcmalloc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <ydb/library/actors/prof/tag.h>
66
#include <library/cpp/cache/cache.h>
77

8-
#if defined(_unix_)
8+
#if defined(USE_DWARF_BACKTRACE)
99
# include <library/cpp/dwarf_backtrace/backtrace.h>
1010
#endif
1111

@@ -211,7 +211,7 @@ class TAllocationAnalyzer {
211211
bool Prepared = false;
212212

213213
private:
214-
#if defined(_unix_)
214+
#if defined(USE_DWARF_BACKTRACE)
215215
void PrintBackTrace(IOutputStream& out, void* const* stack, size_t size, const char* sep) {
216216
// TODO: ignore symbol cache for now - because of inlines.
217217
if (auto error = NDwarf::ResolveBacktrace(TArrayRef<const void* const>(stack, size), [&](const NDwarf::TLineInfo& info) {

ydb/core/mon_alloc/ya.make

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ SRCS(
1515
)
1616

1717
IF (OS_LINUX AND ARCH_X86_64)
18+
CFLAGS(
19+
-DUSE_DWARF_BACKTRACE
20+
)
1821
PEERDIR(
1922
library/cpp/dwarf_backtrace
2023
)

0 commit comments

Comments
 (0)