[Swift-commit] r7567 - tags/swift-0.95-RC4/src/org/griphyn/vdl/karajan/lib
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Tue Feb 4 14:38:15 CST 2014
Author: davidk
Date: 2014-02-04 14:38:15 -0600 (Tue, 04 Feb 2014)
New Revision: 7567
Modified:
tags/swift-0.95-RC4/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
Mem logging from trunk
Modified: tags/swift-0.95-RC4/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- tags/swift-0.95-RC4/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2014-02-04 20:30:32 UTC (rev 7566)
+++ tags/swift-0.95-RC4/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2014-02-04 20:38:15 UTC (rev 7567)
@@ -288,7 +288,7 @@
}
}
}
-
+
void shutdown() {
shutdown = true;
}
@@ -379,6 +379,16 @@
logger.info(msg);
}
+ if (logger.isInfoEnabled()) {
+ Runtime r = Runtime.getRuntime();
+ long maxHeap = r.maxMemory();
+ long freeMemory = r.freeMemory();
+ long totalMemory = r.totalMemory();
+ long usedMemory = totalMemory - freeMemory;
+
+ logger.info("HeapMax: " + maxHeap + ", CrtHeap: " + totalMemory + ", UsedHeap: " + usedMemory);
+ }
+
return true;
}
More information about the Swift-commit
mailing list