code: static long getPromotionSize(GcInfo info) {
      long totalBefore = getTotalUsage(info.getMemoryUsageBeforeGc());
      long totalAfter = getTotalUsage(info.getMemoryUsageAfterGc());
      return totalAfter - totalBefore;
    }
docs: Compute the amount of data promoted during a GC event.