[llvm-commits] [llvm] r171327 - in /llvm/trunk: include/llvm/Support/Process.h lib/Support/Unix/Process.inc lib/Support/Windows/Process.inc
Chandler Carruth
chandlerc at gmail.com
Mon Dec 31 14:17:59 PST 2012
Author: chandlerc
Date: Mon Dec 31 16:17:59 2012
New Revision: 171327
URL: http://llvm.org/viewvc/llvm-project?rev=171327&view=rev
Log:
Remove an unused function in the old Process interface.
Modified:
llvm/trunk/include/llvm/Support/Process.h
llvm/trunk/lib/Support/Unix/Process.inc
llvm/trunk/lib/Support/Windows/Process.inc
Modified: llvm/trunk/include/llvm/Support/Process.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Process.h?rev=171327&r1=171326&r2=171327&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Process.h (original)
+++ llvm/trunk/include/llvm/Support/Process.h Mon Dec 31 16:17:59 2012
@@ -110,13 +110,6 @@
/// allocated space.
static size_t GetMallocUsage();
- /// This static function will return the total memory usage of the
- /// process. This includes code, data, stack and mapped pages usage. Notei
- /// that the value returned here is not necessarily the Running Set Size,
- /// it is the total virtual memory usage, regardless of mapped state of
- /// that memory.
- static size_t GetTotalMemoryUsage();
-
/// This static function will set \p user_time to the amount of CPU time
/// spent in user (non-kernel) mode and \p sys_time to the amount of CPU
/// time spent in system (kernel) mode. If the operating system does not
Modified: llvm/trunk/lib/Support/Unix/Process.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Process.inc?rev=171327&r1=171326&r2=171327&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Process.inc (original)
+++ llvm/trunk/lib/Support/Unix/Process.inc Mon Dec 31 16:17:59 2012
@@ -92,26 +92,6 @@
#endif
}
-size_t
-Process::GetTotalMemoryUsage()
-{
-#if defined(HAVE_MALLINFO)
- struct mallinfo mi = ::mallinfo();
- return mi.uordblks + mi.hblkhd;
-#elif defined(HAVE_MALLOC_ZONE_STATISTICS) && defined(HAVE_MALLOC_MALLOC_H)
- malloc_statistics_t Stats;
- malloc_zone_statistics(malloc_default_zone(), &Stats);
- return Stats.size_allocated; // darwin
-#elif defined(HAVE_GETRUSAGE) && !defined(__HAIKU__)
- struct rusage usage;
- ::getrusage(RUSAGE_SELF, &usage);
- return usage.ru_maxrss;
-#else
-#warning Cannot get total memory size on this platform
- return 0;
-#endif
-}
-
void
Process::GetTimeUsage(TimeValue& elapsed, TimeValue& user_time,
TimeValue& sys_time)
Modified: llvm/trunk/lib/Support/Windows/Process.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Process.inc?rev=171327&r1=171326&r2=171327&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Process.inc (original)
+++ llvm/trunk/lib/Support/Windows/Process.inc Mon Dec 31 16:17:59 2012
@@ -78,14 +78,6 @@
return size;
}
-size_t
-Process::GetTotalMemoryUsage()
-{
- PROCESS_MEMORY_COUNTERS pmc;
- GetProcessMemoryInfo(GetCurrentProcess(), &pmc, sizeof(pmc));
- return pmc.PagefileUsage;
-}
-
void
Process::GetTimeUsage(
TimeValue& elapsed, TimeValue& user_time, TimeValue& sys_time)
More information about the llvm-commits
mailing list