diff options
author | Alexander Gololobov <davenger@yandex-team.com> | 2022-02-10 16:47:37 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:37 +0300 |
commit | 39608cdb86363c75ce55b2b9a69841c3b71f22cf (patch) | |
tree | 4ec132c1665bd4d68e3628aa18d937c70d32413b /library/cpp/lfalloc/alloc_profiler/profiler.cpp | |
parent | 54295b9bd4dc45c54d804084fd846d945148a7f0 (diff) | |
download | ydb-39608cdb86363c75ce55b2b9a69841c3b71f22cf.tar.gz |
Restoring authorship annotation for Alexander Gololobov <davenger@yandex-team.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/lfalloc/alloc_profiler/profiler.cpp')
-rw-r--r-- | library/cpp/lfalloc/alloc_profiler/profiler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/lfalloc/alloc_profiler/profiler.cpp b/library/cpp/lfalloc/alloc_profiler/profiler.cpp index 0e30927a5a..beb0ffb289 100644 --- a/library/cpp/lfalloc/alloc_profiler/profiler.cpp +++ b/library/cpp/lfalloc/alloc_profiler/profiler.cpp @@ -8,7 +8,7 @@ #include <util/generic/vector.h> #include <util/stream/str.h> -namespace NAllocProfiler { +namespace NAllocProfiler { namespace { @@ -50,32 +50,32 @@ void DeallocationCallback(int stackId, int tag, size_t size, int sizeIdx) //////////////////////////////////////////////////////////////////////////////// -bool StartAllocationSampling(bool profileAllThreads) +bool StartAllocationSampling(bool profileAllThreads) { auto& collector = AllocationStackCollector(); collector.Clear(); - NAllocDbg::SetProfileAllThreads(profileAllThreads); + NAllocDbg::SetProfileAllThreads(profileAllThreads); NAllocDbg::SetAllocationCallback(AllocationCallback); NAllocDbg::SetDeallocationCallback(DeallocationCallback); NAllocDbg::SetAllocationSamplingEnabled(true); return true; } -bool StopAllocationSampling(IAllocationStatsDumper &out, int count) +bool StopAllocationSampling(IAllocationStatsDumper &out, int count) { NAllocDbg::SetAllocationCallback(nullptr); NAllocDbg::SetDeallocationCallback(nullptr); NAllocDbg::SetAllocationSamplingEnabled(false); auto& collector = AllocationStackCollector(); - collector.Dump(count, out); + collector.Dump(count, out); return true; } -bool StopAllocationSampling(IOutputStream& out, int count) { - TAllocationStatsDumper dumper(out); - return StopAllocationSampling(dumper, count); +bool StopAllocationSampling(IOutputStream& out, int count) { + TAllocationStatsDumper dumper(out); + return StopAllocationSampling(dumper, count); } } // namespace NProfiler |