diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2016-11-03 09:31:15 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2016-11-03 09:31:15 -0400 |
| commit | 6cc4a8dcd2a0a320698312fe4775a946a16575e4 (patch) | |
| tree | 5e3d27eb2cb1bf77cf1b6cd9d77a52b114160f80 /indra/llcommon/llallocator.cpp | |
| parent | 086c1342152895da28d2e0130d09432152604ca8 (diff) | |
| parent | 6d1032730881e1278bc5df0d2c21e19b81ffe3ed (diff) | |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llcommon/llallocator.cpp')
| -rw-r--r-- | indra/llcommon/llallocator.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/indra/llcommon/llallocator.cpp b/indra/llcommon/llallocator.cpp index 34fc28d8cc..ac97fb71dd 100644 --- a/indra/llcommon/llallocator.cpp +++ b/indra/llcommon/llallocator.cpp @@ -27,47 +27,6 @@ #include "linden_common.h" #include "llallocator.h" -#if (LL_USE_TCMALLOC && LL_USE_HEAP_PROFILER) - -#include "google/heap-profiler.h" -#include "google/commandlineflags_public.h" - -DECLARE_bool(heap_profile_use_stack_trace); -//DECLARE_double(tcmalloc_release_rate); - -void LLAllocator::setProfilingEnabled(bool should_enable) -{ - // NULL disables dumping to disk - static char const * const PREFIX = NULL; - if(should_enable) - { - HeapProfilerSetUseStackTrace(false); - HeapProfilerStart(PREFIX); - } - else - { - HeapProfilerStop(); - } -} - -// static -bool LLAllocator::isProfiling() -{ - return IsHeapProfilerRunning(); -} - -std::string LLAllocator::getRawProfile() -{ - // *TODO - fix google-perftools to accept an buffer to avoid this - // malloc-copy-free cycle. - char * buffer = GetHeapProfile(); - std::string ret = buffer; - free(buffer); - return ret; -} - -#else // LL_USE_TCMALLOC - // // stub implementations for when tcmalloc is disabled // @@ -87,8 +46,6 @@ std::string LLAllocator::getRawProfile() return std::string(); } -#endif // LL_USE_TCMALLOC - LLAllocatorHeapProfile const & LLAllocator::getProfile() { mProf.mLines.clear(); |
