/** * Requires JVM argument {@code -XX:NativeMemoryTracking=summary}. * Logs a warning if there was an error getting the NMT summary or if NMT was disabled. * This warning will be logged only once per process instance. * Produces simpler and more concise human-readable summary of NMT than the native human-readable output from the * JVM. * @return Human-readable NMT summary. null if there was an error getting the summary. * @see #getNmt() */ @Nullable public static String formatNmt() { final Nmt nmt = Nmt.get(); if (nmt == null) { return null; } return nmt.toString(); }