summaryrefslogtreecommitdiffstats
path: root/llvm/support/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-04 19:01:41 +0000
committerChris Lattner <sabre@nondot.org>2002-11-04 19:01:41 +0000
commit203be1a568692e4dae98969731c4b09dfa78236b (patch)
tree5ce1f828fa57ecde9dd3049fda08086a7e3e9843 /llvm/support/lib
parent5d606a09ff8f71f1cfae89f3ba5fcb58220302ee (diff)
downloadbcm5719-llvm-203be1a568692e4dae98969731c4b09dfa78236b.tar.gz
bcm5719-llvm-203be1a568692e4dae98969731c4b09dfa78236b.zip
mallinfo is not available on sun apparently :(
llvm-svn: 4537
Diffstat (limited to 'llvm/support/lib')
-rw-r--r--llvm/support/lib/Support/Timer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/support/lib/Support/Timer.cpp b/llvm/support/lib/Support/Timer.cpp
index 45c2128a27f..48b8f57c3fe 100644
--- a/llvm/support/lib/Support/Timer.cpp
+++ b/llvm/support/lib/Support/Timer.cpp
@@ -71,13 +71,18 @@ static TimeRecord getTimeRecord() {
perror("getrusage call failed: -time-passes info incorrect!");
}
- struct mallinfo MI = mallinfo();
-
TimeRecord Result;
Result.Elapsed = T.tv_sec + T.tv_usec/1000000.0;
Result.UserTime = RU.ru_utime.tv_sec + RU.ru_utime.tv_usec/1000000.0;
Result.SystemTime = RU.ru_stime.tv_sec + RU.ru_stime.tv_usec/1000000.0;
+
+#ifndef __sparc__
+ struct mallinfo MI = mallinfo();
Result.MaxRSS = MI.uordblks;
+#else
+ Result.MaxRSS = 0;
+#endif
+
return Result;
}
OpenPOWER on IntegriCloud