[Swift-commit] r7566 - branches/release-0.95/src/org/griphyn/vdl/karajan/lib

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Tue Feb 4 14:30:32 CST 2014


Author: davidk
Date: 2014-02-04 14:30:32 -0600 (Tue, 04 Feb 2014)
New Revision: 7566

Modified:
   branches/release-0.95/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
Memory logging from trunk


Modified: branches/release-0.95/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- branches/release-0.95/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java	2014-02-04 19:59:55 UTC (rev 7565)
+++ branches/release-0.95/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java	2014-02-04 20:30:32 UTC (rev 7566)
@@ -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