< prev index next >

src/java.base/share/classes/jdk/internal/platform/Metrics.java

Print this page
@  rev 56863 : 8231111: Cgroups v2: Rework Metrics in java.base so as to recognize unified hierarchy
|  Reviewed-by: bobv
~

@@ -54,13 +54,11 @@
      *
      * @return Metrics object or null if not supported on this platform.
      */
     public static Metrics systemMetrics() {
         try {
-            // We currently only support cgroupv1
-            Class<?> c = Class.forName("jdk.internal.platform.cgroupv1.Metrics");
-            @SuppressWarnings("unchecked")
+            Class<?> c = Class.forName("jdk.internal.platform.CgroupMetrics");
             Method m = c.getMethod("getInstance");
             return (Metrics) m.invoke(null);
         } catch (ClassNotFoundException e) {
             return null;
         } catch (ReflectiveOperationException e) {
< prev index next >