!7 sclass GCNotification > DynPrintLog { transient Q q; void start { q = startQ("GC Notification"); ownTimer(onGC(voidfunc(final GarbageCollectionNotificationInfo info) { q.add(r { printInfo(info) }) })); } void printInfo(GarbageCollectionNotificationInfo info) { print(); GcInfo gcInfo = info.getGcInfo(); print("GC! " + gcInfo.getDuration() + " ms @ " + localDateWithSeconds()); print(); print(" Cause: " + info.getGcCause()); print(" Collector: " + info.getGcName()); print(" Action: " + info.getGcAction()); print(" Changes: " + gcRenderChangesInUsedMemory(gcInfo)); print(); } }