Skip to content

Commit 5032ba7

Browse files
authored
[Backport stable-25-3] Use tcmalloc DWARF backtraces only for memory profiling (#28877)
2 parents 0d6e872 + 65ec73c commit 5032ba7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ydb/core/mon_alloc/tcmalloc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ class TAllocationAnalyzer {
211211
bool Prepared = false;
212212

213213
private:
214-
#if defined(USE_DWARF_BACKTRACE)
214+
// Using DWARF to resolve backtraces is expensive - i.e. the cloud disk I/O may block process for minutes, while loading debug sections.
215+
#if defined(USE_DWARF_BACKTRACE) && defined(PROFILE_MEMORY_ALLOCATIONS)
215216
void PrintBackTrace(IOutputStream& out, void* const* stack, size_t size, const char* sep) {
216217
// TODO: ignore symbol cache for now - because of inlines.
217218
if (auto error = NDwarf::ResolveBacktrace(TArrayRef<const void* const>(stack, size), [&](const NDwarf::TLineInfo& info) {

0 commit comments

Comments
 (0)