public class jdk.internal.platform.CgroupSubsystemFactory
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: jdk.internal.platform.CgroupSubsystemFactory
super_class: java.lang.Object
{
private static final java.lang.String CPU_CTRL;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "cpu"
private static final java.lang.String CPUACCT_CTRL;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "cpuacct"
private static final java.lang.String CPUSET_CTRL;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "cpuset"
private static final java.lang.String BLKIO_CTRL;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "blkio"
private static final java.lang.String MEMORY_CTRL;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "memory"
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljdk/internal/platform/CgroupSubsystemFactory;
static jdk.internal.platform.CgroupMetrics create();
descriptor: ()Ljdk/internal/platform/CgroupMetrics;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=3, args_size=0
0: aconst_null
astore 0
start local 0 1: ldc "/proc/self/mountinfo"
ldc "/proc/cgroups"
invokestatic jdk.internal.platform.CgroupSubsystemFactory.determineType:(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Optional;
astore 0
2: goto 5
StackMap locals: java.util.Optional
StackMap stack: java.io.IOException
3: pop
4: aconst_null
areturn
5: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.util.Optional.isEmpty:()Z
ifeq 7
6: aconst_null
areturn
7: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.util.Optional.get:()Ljava/lang/Object;
checkcast jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult
astore 1
start local 1 8: aload 1
invokevirtual jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult.isAnyControllersEnabled:()Z
ifne 10
9: aconst_null
areturn
10: StackMap locals: jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult
StackMap stack:
aload 1
invokevirtual jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult.isAnyCgroupV1Controllers:()Z
ifeq 14
aload 1
invokevirtual jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult.isAnyCgroupV2Controllers:()Z
ifeq 14
11: ldc "jdk.internal.platform"
invokestatic java.lang.System.getLogger:(Ljava/lang/String;)Ljava/lang/System$Logger;
astore 2
start local 2 12: aload 2
getstatic java.lang.System$Logger$Level.DEBUG:Ljava/lang/System$Logger$Level;
ldc "Mixed cgroupv1 and cgroupv2 not supported. Metrics disabled."
invokeinterface java.lang.System$Logger.log:(Ljava/lang/System$Logger$Level;Ljava/lang/String;)V
13: aconst_null
areturn
end local 2 14: StackMap locals:
StackMap stack:
aload 1
invokevirtual jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult.isCgroupV2:()Z
ifeq 19
15: invokestatic jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance:()Ljdk/internal/platform/CgroupSubsystem;
astore 2
start local 2 16: aload 2
ifnull 17
new jdk.internal.platform.CgroupMetrics
dup
aload 2
invokespecial jdk.internal.platform.CgroupMetrics.<init>:(Ljdk/internal/platform/CgroupSubsystem;)V
goto 18
StackMap locals: jdk.internal.platform.CgroupSubsystem
StackMap stack:
17: aconst_null
StackMap locals:
StackMap stack: jdk.internal.platform.CgroupMetrics
18: areturn
end local 2 19: StackMap locals:
StackMap stack:
invokestatic jdk.internal.platform.cgroupv1.CgroupV1Subsystem.getInstance:()Ljdk/internal/platform/cgroupv1/CgroupV1Subsystem;
astore 2
start local 2 20: aload 2
ifnull 21
new jdk.internal.platform.CgroupV1MetricsImpl
dup
aload 2
invokespecial jdk.internal.platform.CgroupV1MetricsImpl.<init>:(Ljdk/internal/platform/CgroupV1Metrics;)V
goto 22
StackMap locals: jdk.internal.platform.cgroupv1.CgroupV1Subsystem
StackMap stack:
21: aconst_null
StackMap locals:
StackMap stack: jdk.internal.platform.CgroupV1MetricsImpl
22: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 23 0 optResult Ljava/util/Optional<Ljdk/internal/platform/CgroupSubsystemFactory$CgroupTypeResult;>;
8 23 1 result Ljdk/internal/platform/CgroupSubsystemFactory$CgroupTypeResult;
12 14 2 logger Ljava/lang/System$Logger;
16 19 2 subsystem Ljdk/internal/platform/CgroupSubsystem;
20 23 2 subsystem Ljdk/internal/platform/cgroupv1/CgroupV1Subsystem;
Exception table:
from to target type
1 2 3 Class java.io.IOException
public static java.util.Optional<jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult> determineType(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljava/util/Optional;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=12, args_size=2
start local 0 start local 1 0: new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
astore 2
start local 2 1: aload 1
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
invokestatic jdk.internal.platform.CgroupUtil.readAllLinesPrivileged:(Ljava/nio/file/Path;)Ljava/util/List;
astore 3
start local 3 2: aload 3
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 5
goto 18
StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List top java.util.Iterator
StackMap stack:
3: aload 5
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 4: aload 4
ldc "#"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 6
5: goto 18
6: StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List java.lang.String java.util.Iterator
StackMap stack:
aload 4
invokestatic jdk.internal.platform.CgroupInfo.fromCgroupsLine:(Ljava/lang/String;)Ljdk/internal/platform/CgroupInfo;
astore 6
start local 6 7: aload 6
invokevirtual jdk.internal.platform.CgroupInfo.getName:()Ljava/lang/String;
dup
astore 7
invokevirtual java.lang.String.hashCode:()I
lookupswitch { // 5
-1353647686: 8
-1077756671: 9
98728: 10
93828679: 11
986056123: 12
default: 18
}
StackMap locals: jdk.internal.platform.CgroupInfo java.lang.String
StackMap stack:
8: aload 7
ldc "cpuset"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 15
goto 18
StackMap locals:
StackMap stack:
9: aload 7
ldc "memory"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 16
goto 18
StackMap locals:
StackMap stack:
10: aload 7
ldc "cpu"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 13
goto 18
StackMap locals:
StackMap stack:
11: aload 7
ldc "blkio"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 17
goto 18
StackMap locals:
StackMap stack:
12: aload 7
ldc "cpuacct"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 14
goto 18
13: StackMap locals:
StackMap stack:
aload 2
ldc "cpu"
aload 6
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
goto 18
14: StackMap locals:
StackMap stack:
aload 2
ldc "cpuacct"
aload 6
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
goto 18
15: StackMap locals:
StackMap stack:
aload 2
ldc "cpuset"
aload 6
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
goto 18
16: StackMap locals:
StackMap stack:
aload 2
ldc "memory"
aload 6
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
goto 18
17: StackMap locals:
StackMap stack:
aload 2
ldc "blkio"
aload 6
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 6 end local 4 18: StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List top java.util.Iterator
StackMap stack:
aload 5
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
19: iconst_1
istore 4
start local 4 20: iconst_0
istore 5
start local 5 21: iconst_0
istore 6
start local 6 22: iconst_0
istore 7
start local 7 23: aload 2
invokeinterface java.util.Map.values:()Ljava/util/Collection;
invokeinterface java.util.Collection.iterator:()Ljava/util/Iterator;
astore 9
goto 37
StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List int int int int top java.util.Iterator
StackMap stack:
24: aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast jdk.internal.platform.CgroupInfo
astore 8
start local 8 25: iload 7
ifne 26
aload 8
invokevirtual jdk.internal.platform.CgroupInfo.getHierarchyId:()I
ifne 26
iconst_0
goto 27
StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List int int int int jdk.internal.platform.CgroupInfo java.util.Iterator
StackMap stack:
26: iconst_1
StackMap locals:
StackMap stack: int
27: istore 7
28: iload 6
ifne 29
aload 8
invokevirtual jdk.internal.platform.CgroupInfo.getHierarchyId:()I
ifeq 29
iconst_0
goto 30
StackMap locals:
StackMap stack:
29: iconst_1
StackMap locals:
StackMap stack: int
30: istore 6
31: iload 4
ifeq 32
aload 8
invokevirtual jdk.internal.platform.CgroupInfo.getHierarchyId:()I
ifne 32
iconst_1
goto 33
StackMap locals:
StackMap stack:
32: iconst_0
StackMap locals:
StackMap stack: int
33: istore 4
34: iload 5
ifne 35
aload 8
invokevirtual jdk.internal.platform.CgroupInfo.isEnabled:()Z
ifne 35
iconst_0
goto 36
StackMap locals:
StackMap stack:
35: iconst_1
StackMap locals:
StackMap stack: int
36: istore 5
end local 8 37: StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List int int int int top java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 24
38: aconst_null
astore 8
aconst_null
astore 9
39: aload 0
iconst_0
anewarray java.lang.String
invokestatic java.nio.file.Paths.get:(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
invokestatic jdk.internal.platform.CgroupUtil.readFilePrivileged:(Ljava/nio/file/Path;)Ljava/util/stream/Stream;
astore 10
start local 10 40: aload 10
invokedynamic test()Ljava/util/function/Predicate;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Z
jdk/internal/platform/CgroupSubsystemFactory.lambda$0(Ljava/lang/String;)Z (6)
(Ljava/lang/String;)Z
invokeinterface java.util.stream.Stream.anyMatch:(Ljava/util/function/Predicate;)Z
istore 11
start local 11 41: iload 11
ifne 45
iload 4
ifeq 45
42: invokestatic java.util.Optional.empty:()Ljava/util/Optional;
43: aload 10
ifnull 44
aload 10
invokeinterface java.util.stream.Stream.close:()V
44: StackMap locals: java.lang.String java.lang.String java.util.Map java.util.List int int int int java.lang.Throwable java.lang.Throwable java.util.stream.Stream int
StackMap stack: java.util.Optional
areturn
end local 11 45: StackMap locals:
StackMap stack:
aload 10
ifnull 51
aload 10
invokeinterface java.util.stream.Stream.close:()V
goto 51
StackMap locals:
StackMap stack: java.lang.Throwable
46: astore 8
aload 10
ifnull 47
aload 10
invokeinterface java.util.stream.Stream.close:()V
end local 10 StackMap locals:
StackMap stack:
47: aload 8
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
48: astore 9
aload 8
ifnonnull 49
aload 9
astore 8
goto 50
StackMap locals:
StackMap stack:
49: aload 8
aload 9
if_acmpeq 50
aload 8
aload 9
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
50: aload 8
athrow
51: StackMap locals:
StackMap stack:
new jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult
dup
iload 4
iload 5
iload 6
iload 7
invokespecial jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult.<init>:(ZZZZ)V
astore 8
start local 8 52: aload 8
invokestatic java.util.Optional.of:(Ljava/lang/Object;)Ljava/util/Optional;
areturn
end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 53 0 mountInfo Ljava/lang/String;
0 53 1 cgroups Ljava/lang/String;
1 53 2 infos Ljava/util/Map<Ljava/lang/String;Ljdk/internal/platform/CgroupInfo;>;
2 53 3 lines Ljava/util/List<Ljava/lang/String;>;
4 18 4 line Ljava/lang/String;
7 18 6 info Ljdk/internal/platform/CgroupInfo;
20 53 4 isCgroupsV2 Z
21 53 5 anyControllersEnabled Z
22 53 6 anyCgroupsV2Controller Z
23 53 7 anyCgroupsV1Controller Z
25 37 8 info Ljdk/internal/platform/CgroupInfo;
40 47 10 mntInfo Ljava/util/stream/Stream<Ljava/lang/String;>;
41 45 11 anyCgroupMounted Z
52 53 8 result Ljdk/internal/platform/CgroupSubsystemFactory$CgroupTypeResult;
Exception table:
from to target type
40 43 46 any
39 44 48 any
45 48 48 any
Exceptions:
throws java.io.IOException
Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/util/Optional<Ljdk/internal/platform/CgroupSubsystemFactory$CgroupTypeResult;>;
MethodParameters:
Name Flags
mountInfo
cgroups
private static boolean lambda$0(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc "cgroup"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 line Ljava/lang/String;
}
SourceFile: "CgroupSubsystemFactory.java"
NestMembers:
jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult
InnerClasses:
public abstract Logger = java.lang.System$Logger of java.lang.System
public final Level = java.lang.System$Logger$Level of java.lang.System$Logger
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public final CgroupTypeResult = jdk.internal.platform.CgroupSubsystemFactory$CgroupTypeResult of jdk.internal.platform.CgroupSubsystemFactory