< prev index next >

test/lib/sun/hotspot/WhiteBox.java

Print this page
@  rev 56288 : 8230305: Cgroups v2: Container awareness
|  Reviewed-by: bobv
~

@@ -536,10 +536,17 @@
   // Returns true on linux if library has the noexecstack flag set.
   public native boolean checkLibSpecifiesNoexecstack(String libfilename);
 
   // Container testing
   public native boolean isContainerized();
+  public native String cgroupType();
+  public boolean isCgroupsV1() {
+    return "cgroupv1".equals(cgroupType());
+  }
+  public boolean isCgroupsV2() {
+    return "cgroupv2".equals(cgroupType());
+  }
   public native void printOsInfo();
 
   // Decoder
   public native void disableElfSectionCache();
 
< prev index next >