6 #ifdef ARMNN_HEAP_PROFILING_ENABLED 9 #include "gperftools/heap-profiler.h" 16 ScopedHeapProfiler::ScopedHeapProfiler(
const std::string & tag)
20 char * locationFromEnv = ::getenv(ARMNN_HEAP_PROFILE_DUMP_DIR);
23 m_Location = locationFromEnv;
26 ss << m_Location <<
"/" << m_Tag <<
".hprof";
27 HeapProfilerStart(ss.str().c_str());
28 HeapProfilerDump(m_Tag.c_str());
31 ScopedHeapProfiler::~ScopedHeapProfiler()
33 HeapProfilerDump(m_Tag.c_str());
38 #endif // ARMNN_HEAP_PROFILING_ENABLED