public final class org.apache.cassandra.utils.HeapUtils
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.utils.HeapUtils
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/utils/HeapUtils;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.utils.HeapUtils.logger:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public static void logHeapHistogram();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=0
0: getstatic org.apache.cassandra.utils.HeapUtils.logger:Lorg/slf4j/Logger;
ldc "Trying to log the heap histogram using jcmd"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
1: invokestatic org.apache.cassandra.utils.HeapUtils.getProcessId:()Ljava/lang/Long;
astore 0
start local 0 2: aload 0
ifnonnull 5
3: getstatic org.apache.cassandra.utils.HeapUtils.logger:Lorg/slf4j/Logger;
ldc "The process ID could not be retrieved. Skipping heap histogram generation."
invokeinterface org.slf4j.Logger.error:(Ljava/lang/String;)V
4: return
5: StackMap locals: java.lang.Long
StackMap stack:
invokestatic org.apache.cassandra.utils.HeapUtils.getJcmdPath:()Ljava/lang/String;
astore 1
start local 1 6: aload 1
ifnonnull 7
ldc "jcmd"
goto 8
StackMap locals: java.lang.String
StackMap stack:
7: aload 1
StackMap locals:
StackMap stack: java.lang.String
8: astore 2
start local 2 9: iconst_3
anewarray java.lang.String
dup
iconst_0
aload 2
aastore
dup
iconst_1
10: aload 0
invokevirtual java.lang.Long.toString:()Ljava/lang/String;
aastore
dup
iconst_2
11: ldc "GC.class_histogram"
aastore
12: astore 3
start local 3 13: invokestatic java.lang.Runtime.getRuntime:()Ljava/lang/Runtime;
aload 3
invokevirtual java.lang.Runtime.exec:([Ljava/lang/String;)Ljava/lang/Process;
invokestatic org.apache.cassandra.utils.HeapUtils.logProcessOutput:(Ljava/lang/Process;)V
end local 3 end local 2 end local 1 end local 0 14: goto 17
15: StackMap locals:
StackMap stack: java.lang.Throwable
astore 0
start local 0 16: getstatic org.apache.cassandra.utils.HeapUtils.logger:Lorg/slf4j/Logger;
ldc "The heap histogram could not be generated due to the following error: "
aload 0
invokeinterface org.slf4j.Logger.error:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 0 17: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
2 14 0 processId Ljava/lang/Long;
6 14 1 jcmdPath Ljava/lang/String;
9 14 2 jcmdCommand Ljava/lang/String;
13 14 3 histoCommands [Ljava/lang/String;
16 17 0 e Ljava/lang/Throwable;
Exception table:
from to target type
0 4 15 Class java.lang.Throwable
5 14 15 Class java.lang.Throwable
private static java.lang.String getJcmdPath();
descriptor: ()Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=3, args_size=0
0: ldc "JAVA_HOME"
invokestatic java.lang.System.getenv:(Ljava/lang/String;)Ljava/lang/String;
astore 0
start local 0 1: aload 0
ifnonnull 3
2: aconst_null
areturn
3: StackMap locals: java.lang.String
StackMap stack:
new java.io.File
dup
aload 0
ldc "bin"
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 1
start local 1 4: aload 1
new org.apache.cassandra.utils.HeapUtils$1
dup
invokespecial org.apache.cassandra.utils.HeapUtils$1.<init>:()V
invokevirtual java.io.File.listFiles:(Ljava/io/FilenameFilter;)[Ljava/io/File;
astore 2
start local 2 5: aload 2
invokestatic org.apache.commons.lang3.ArrayUtils.isEmpty:([Ljava/lang/Object;)Z
ifeq 6
aconst_null
goto 7
StackMap locals: java.io.File java.io.File[]
StackMap stack:
6: aload 2
iconst_0
aaload
invokevirtual java.io.File.getPath:()Ljava/lang/String;
StackMap locals:
StackMap stack: java.lang.String
7: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
1 8 0 javaHome Ljava/lang/String;
4 8 1 javaBinDirectory Ljava/io/File;
5 8 2 files [Ljava/io/File;
private static void logProcessOutput(java.lang.Process);
descriptor: (Ljava/lang/Process;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=6, args_size=1
start local 0 0: aconst_null
astore 1
aconst_null
astore 2
1: new java.io.BufferedReader
dup
new java.io.InputStreamReader
dup
aload 0
invokevirtual java.lang.Process.getInputStream:()Ljava/io/InputStream;
invokespecial java.io.InputStreamReader.<init>:(Ljava/io/InputStream;)V
invokespecial java.io.BufferedReader.<init>:(Ljava/io/Reader;)V
astore 3
start local 3 2: new org.apache.commons.lang3.text.StrBuilder
dup
invokespecial org.apache.commons.lang3.text.StrBuilder.<init>:()V
astore 4
start local 4 3: goto 5
start local 5 4: StackMap locals: java.lang.Process java.lang.Throwable java.lang.Throwable java.io.BufferedReader org.apache.commons.lang3.text.StrBuilder java.lang.String
StackMap stack:
aload 4
aload 5
invokevirtual org.apache.commons.lang3.text.StrBuilder.appendln:(Ljava/lang/String;)Lorg/apache/commons/lang3/text/StrBuilder;
pop
end local 5 5: StackMap locals:
StackMap stack:
aload 3
invokevirtual java.io.BufferedReader.readLine:()Ljava/lang/String;
dup
astore 5
start local 5 6: ifnonnull 4
7: getstatic org.apache.cassandra.utils.HeapUtils.logger:Lorg/slf4j/Logger;
aload 4
invokevirtual org.apache.commons.lang3.text.StrBuilder.toString:()Ljava/lang/String;
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
end local 5 end local 4 8: aload 3
ifnull 14
aload 3
invokevirtual java.io.BufferedReader.close:()V
goto 14
StackMap locals: java.lang.Process java.lang.Throwable java.lang.Throwable java.io.BufferedReader
StackMap stack: java.lang.Throwable
9: astore 1
aload 3
ifnull 10
aload 3
invokevirtual java.io.BufferedReader.close:()V
end local 3 StackMap locals:
StackMap stack:
10: aload 1
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
11: astore 2
aload 1
ifnonnull 12
aload 2
astore 1
goto 13
StackMap locals:
StackMap stack:
12: aload 1
aload 2
if_acmpeq 13
aload 1
aload 2
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
13: aload 1
athrow
14: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 p Ljava/lang/Process;
2 10 3 input Ljava/io/BufferedReader;
3 8 4 builder Lorg/apache/commons/lang3/text/StrBuilder;
4 5 5 line Ljava/lang/String;
6 8 5 line Ljava/lang/String;
Exception table:
from to target type
2 8 9 any
1 11 11 any
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
p
private static java.lang.Long getProcessId();
descriptor: ()Ljava/lang/Long;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=2, args_size=0
0: invokestatic org.apache.cassandra.utils.NativeLibrary.getProcessID:()J
lstore 0
start local 0 1: lload 0
lconst_0
lcmp
iflt 3
2: lload 0
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
areturn
3: StackMap locals: long
StackMap stack:
invokestatic org.apache.cassandra.utils.HeapUtils.getProcessIdFromJvmName:()Ljava/lang/Long;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 4 0 pid J
private static java.lang.Long getProcessIdFromJvmName();
descriptor: ()Ljava/lang/Long;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=0
0: invokestatic java.lang.management.ManagementFactory.getRuntimeMXBean:()Ljava/lang/management/RuntimeMXBean;
invokeinterface java.lang.management.RuntimeMXBean.getName:()Ljava/lang/String;
astore 0
start local 0 1: aload 0
ldc "@"
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
iconst_0
aaload
invokestatic java.lang.Long.valueOf:(Ljava/lang/String;)Ljava/lang/Long;
2: areturn
3: StackMap locals: java.lang.String
StackMap stack: java.lang.NumberFormatException
pop
4: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 5 0 jvmName Ljava/lang/String;
Exception table:
from to target type
1 2 3 Class java.lang.NumberFormatException
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/utils/HeapUtils;
}
SourceFile: "HeapUtils.java"
NestMembers:
org.apache.cassandra.utils.HeapUtils$1
InnerClasses:
org.apache.cassandra.utils.HeapUtils$1