public final class org.apache.cassandra.utils.NativeLibrary
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.utils.NativeLibrary
super_class: java.lang.Object
{
private static final org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final org.apache.cassandra.utils.NativeLibrary$OSType osType;
descriptor: Lorg/apache/cassandra/utils/NativeLibrary$OSType;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final int MCL_CURRENT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final int MCL_FUTURE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final int ENOMEM;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 12
private static final int F_GETFL;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 3
private static final int F_SETFL;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4
private static final int F_NOCACHE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 48
private static final int O_DIRECT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 16384
private static final int O_RDONLY;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private static final int POSIX_FADV_NORMAL;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private static final int POSIX_FADV_RANDOM;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1
private static final int POSIX_FADV_SEQUENTIAL;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private static final int POSIX_FADV_WILLNEED;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 3
private static final int POSIX_FADV_DONTNEED;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4
private static final int POSIX_FADV_NOREUSE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 5
private static final org.apache.cassandra.utils.NativeLibraryWrapper wrappedLibrary;
descriptor: Lorg/apache/cassandra/utils/NativeLibraryWrapper;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static boolean jnaLockable;
descriptor: Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static final java.lang.reflect.Field FILE_DESCRIPTOR_FD_FIELD;
descriptor: Ljava/lang/reflect/Field;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.reflect.Field FILE_CHANNEL_FD_FIELD;
descriptor: Ljava/lang/reflect/Field;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static volatile int[] $SWITCH_TABLE$org$apache$cassandra$utils$NativeLibrary$OSType;
descriptor: [I
flags: (0x104a) ACC_PRIVATE, ACC_STATIC, ACC_VOLATILE, ACC_SYNTHETIC
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Lorg/apache/cassandra/utils/NativeLibrary;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.cassandra.utils.NativeLibrary.$assertionsDisabled:Z
3: ldc Lorg/apache/cassandra/utils/NativeLibrary;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
4: iconst_0
putstatic org.apache.cassandra.utils.NativeLibrary.jnaLockable:Z
5: ldc Ljava/io/FileDescriptor;
ldc "fd"
invokestatic org.apache.cassandra.utils.FBUtilities.getProtectedField:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/reflect/Field;
putstatic org.apache.cassandra.utils.NativeLibrary.FILE_DESCRIPTOR_FD_FIELD:Ljava/lang/reflect/Field;
6: ldc Lsun/nio/ch/FileChannelImpl;
ldc "fd"
invokestatic org.apache.cassandra.utils.FBUtilities.getProtectedField:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/reflect/Field;
putstatic org.apache.cassandra.utils.NativeLibrary.FILE_CHANNEL_FD_FIELD:Ljava/lang/reflect/Field;
7: invokestatic org.apache.cassandra.utils.NativeLibrary.getOsType:()Lorg/apache/cassandra/utils/NativeLibrary$OSType;
putstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
8: invokestatic org.apache.cassandra.utils.NativeLibrary.$SWITCH_TABLE$org$apache$cassandra$utils$NativeLibrary$OSType:()[I
getstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
invokevirtual org.apache.cassandra.utils.NativeLibrary$OSType.ordinal:()I
iaload
tableswitch { // 1 - 5
1: 11
2: 9
3: 10
4: 11
5: 11
default: 11
}
9: StackMap locals:
StackMap stack:
new org.apache.cassandra.utils.NativeLibraryDarwin
dup
invokespecial org.apache.cassandra.utils.NativeLibraryDarwin.<init>:()V
putstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
goto 12
10: StackMap locals:
StackMap stack:
new org.apache.cassandra.utils.NativeLibraryWindows
dup
invokespecial org.apache.cassandra.utils.NativeLibraryWindows.<init>:()V
putstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
goto 12
11: StackMap locals:
StackMap stack:
new org.apache.cassandra.utils.NativeLibraryLinux
dup
invokespecial org.apache.cassandra.utils.NativeLibraryLinux.<init>:()V
putstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
12: StackMap locals:
StackMap stack:
ldc "os.arch"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
ldc "ppc"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 24
13: getstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.LINUX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
if_acmpne 17
14: sipush 8192
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_CURRENT:I
15: sipush 16384
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_FUTURE:I
16: goto 26
17: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.AIX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
if_acmpne 21
18: sipush 256
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_CURRENT:I
19: sipush 512
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_FUTURE:I
20: goto 26
21: StackMap locals:
StackMap stack:
iconst_1
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_CURRENT:I
22: iconst_2
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_FUTURE:I
23: goto 26
24: StackMap locals:
StackMap stack:
iconst_1
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_CURRENT:I
25: iconst_2
putstatic org.apache.cassandra.utils.NativeLibrary.MCL_FUTURE:I
26: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
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
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/NativeLibrary;
private static org.apache.cassandra.utils.NativeLibrary$OSType getOsType();
descriptor: ()Lorg/apache/cassandra/utils/NativeLibrary$OSType;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=0
0: ldc "os.name"
invokestatic java.lang.System.getProperty:(Ljava/lang/String;)Ljava/lang/String;
invokevirtual java.lang.String.toLowerCase:()Ljava/lang/String;
astore 0
start local 0 1: aload 0
ldc "mac"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 3
2: getstatic org.apache.cassandra.utils.NativeLibrary$OSType.MAC:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
areturn
3: StackMap locals: java.lang.String
StackMap stack:
aload 0
ldc "windows"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 5
4: getstatic org.apache.cassandra.utils.NativeLibrary$OSType.WINDOWS:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
areturn
5: StackMap locals:
StackMap stack:
aload 0
ldc "aix"
invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
ifeq 7
6: getstatic org.apache.cassandra.utils.NativeLibrary$OSType.AIX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
areturn
7: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.LINUX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 8 0 osName Ljava/lang/String;
private static int errno(java.lang.RuntimeException);
descriptor: (Ljava/lang/RuntimeException;)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.NativeLibrary.$assertionsDisabled:Z
ifne 1
aload 0
instanceof com.sun.jna.LastErrorException
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
checkcast com.sun.jna.LastErrorException
invokevirtual com.sun.jna.LastErrorException.getErrorCode:()I
2: ireturn
3: StackMap locals:
StackMap stack: java.lang.NoSuchMethodError
pop
4: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Obsolete version of JNA present; unable to read errno. Upgrade to JNA 3.2.7 or later"
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
5: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 e Ljava/lang/RuntimeException;
Exception table:
from to target type
1 2 3 Class java.lang.NoSuchMethodError
MethodParameters:
Name Flags
e
public static boolean isAvailable();
descriptor: ()Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.isAvailable:()Z
ireturn
LocalVariableTable:
Start End Slot Name Signature
public static boolean jnaMemoryLockable();
descriptor: ()Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic org.apache.cassandra.utils.NativeLibrary.jnaLockable:Z
ireturn
LocalVariableTable:
Start End Slot Name Signature
public static void tryMlockall();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
getstatic org.apache.cassandra.utils.NativeLibrary.MCL_CURRENT:I
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callMlockall:(I)I
pop
1: iconst_1
putstatic org.apache.cassandra.utils.NativeLibrary.jnaLockable:Z
2: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "JNA mlockall successful"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
3: goto 13
4: StackMap locals:
StackMap stack: java.lang.UnsatisfiedLinkError
pop
goto 13
5: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 0
start local 0 6: aload 0
instanceof com.sun.jna.LastErrorException
ifne 8
7: aload 0
athrow
8: StackMap locals: java.lang.RuntimeException
StackMap stack:
aload 0
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
bipush 12
if_icmpne 11
getstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.LINUX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
if_acmpne 11
9: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out, especially with mmapped I/O enabled. Increase RLIMIT_MEMLOCK or run Cassandra as root."
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
10: goto 13
11: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.MAC:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
if_acmpeq 13
12: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Unknown mlockall error {}"
aload 0
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;)V
end local 0 13: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
6 13 0 e Ljava/lang/RuntimeException;
Exception table:
from to target type
0 3 4 Class java.lang.UnsatisfiedLinkError
0 3 5 Class java.lang.RuntimeException
public static void trySkipCache(java.lang.String, long, long);
descriptor: (Ljava/lang/String;JJ)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=9, args_size=3
start local 0 start local 1 start local 3 0: new java.io.File
dup
aload 0
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 5
start local 5 1: aload 5
invokevirtual java.io.File.exists:()Z
ifne 3
2: return
3: StackMap locals: java.io.File
StackMap stack:
aconst_null
astore 6
aconst_null
astore 7
4: new java.io.FileInputStream
dup
aload 5
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
astore 8
start local 8 5: aload 8
invokevirtual java.io.FileInputStream.getChannel:()Ljava/nio/channels/FileChannel;
invokestatic org.apache.cassandra.utils.NativeLibrary.getfd:(Ljava/nio/channels/FileChannel;)I
lload 1
lload 3
aload 0
invokestatic org.apache.cassandra.utils.NativeLibrary.trySkipCache:(IJJLjava/lang/String;)V
6: aload 8
ifnull 14
aload 8
invokevirtual java.io.FileInputStream.close:()V
goto 14
StackMap locals: java.lang.String long long java.io.File java.lang.Throwable java.lang.Throwable java.io.FileInputStream
StackMap stack: java.lang.Throwable
7: astore 6
aload 8
ifnull 8
aload 8
invokevirtual java.io.FileInputStream.close:()V
end local 8 StackMap locals:
StackMap stack:
8: aload 6
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
9: astore 7
aload 6
ifnonnull 10
aload 7
astore 6
goto 11
StackMap locals:
StackMap stack:
10: aload 6
aload 7
if_acmpeq 11
aload 6
aload 7
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
11: aload 6
athrow
12: StackMap locals: java.lang.String long long java.io.File
StackMap stack: java.io.IOException
astore 6
start local 6 13: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not skip cache"
aload 6
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 6 14: StackMap locals:
StackMap stack:
return
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 path Ljava/lang/String;
0 15 1 offset J
0 15 3 len J
1 15 5 f Ljava/io/File;
5 8 8 fis Ljava/io/FileInputStream;
13 14 6 e Ljava/io/IOException;
Exception table:
from to target type
5 6 7 any
4 9 9 any
3 12 12 Class java.io.IOException
MethodParameters:
Name Flags
path
offset
len
public static void trySkipCache(int, long, long, java.lang.String);
descriptor: (IJJLjava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=7, args_size=4
start local 0 start local 1 start local 3 start local 5 0: lload 3
lconst_0
lcmp
ifne 7
1: iload 0
lconst_0
iconst_0
aload 5
invokestatic org.apache.cassandra.utils.NativeLibrary.trySkipCache:(IJILjava/lang/String;)V
2: goto 7
3: StackMap locals:
StackMap stack:
ldc 2147483647
lload 3
invokestatic java.lang.Math.min:(JJ)J
l2i
istore 6
start local 6 4: iload 0
lload 1
iload 6
aload 5
invokestatic org.apache.cassandra.utils.NativeLibrary.trySkipCache:(IJILjava/lang/String;)V
5: lload 3
iload 6
i2l
lsub
lstore 3
6: lload 1
iload 6
i2l
lsub
lstore 1
end local 6 7: StackMap locals:
StackMap stack:
lload 3
lconst_0
lcmp
ifgt 3
8: return
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 fd I
0 9 1 offset J
0 9 3 len J
0 9 5 path Ljava/lang/String;
4 7 6 sublen I
MethodParameters:
Name Flags
fd
offset
len
path
public static void trySkipCache(int, long, int, java.lang.String);
descriptor: (IJILjava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=10, locals=6, args_size=4
start local 0 start local 1 start local 3 start local 4 0: iload 0
ifge 2
1: return
2: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.osType:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.LINUX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
if_acmpne 18
3: getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
iload 0
lload 1
iload 3
iconst_4
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callPosixFadvise:(IJII)I
istore 5
start local 5 4: iload 5
ifeq 18
5: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
6: getstatic org.apache.cassandra.utils.NoSpamLogger$Level.WARN:Lorg/apache/cassandra/utils/NoSpamLogger$Level;
7: ldc 10
8: getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
9: new java.lang.StringBuilder
dup
ldc "Failed trySkipCache on file: {} Error: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
iload 5
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callStrerror:(I)Lcom/sun/jna/Pointer;
lconst_0
invokevirtual com.sun.jna.Pointer.getString:(J)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
iconst_1
anewarray java.lang.Object
dup
iconst_0
10: aload 4
aastore
11: invokestatic org.apache.cassandra.utils.NoSpamLogger.log:(Lorg/slf4j/Logger;Lorg/apache/cassandra/utils/NoSpamLogger$Level;JLjava/util/concurrent/TimeUnit;Ljava/lang/String;[Ljava/lang/Object;)Z
pop
end local 5 12: goto 18
13: StackMap locals:
StackMap stack: java.lang.UnsatisfiedLinkError
pop
goto 18
14: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 5
start local 5 15: aload 5
instanceof com.sun.jna.LastErrorException
ifne 17
16: aload 5
athrow
17: StackMap locals: java.lang.RuntimeException
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "posix_fadvise({}, {}) failed, errno ({})."
iconst_3
anewarray java.lang.Object
dup
iconst_0
iload 0
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
dup
iconst_2
aload 5
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;[Ljava/lang/Object;)V
end local 5 18: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 fd I
0 19 1 offset J
0 19 3 len I
0 19 4 path Ljava/lang/String;
4 12 5 result I
15 18 5 e Ljava/lang/RuntimeException;
Exception table:
from to target type
2 12 13 Class java.lang.UnsatisfiedLinkError
2 12 14 Class java.lang.RuntimeException
MethodParameters:
Name Flags
fd
offset
len
path
public static int tryFcntl(int, int, int);
descriptor: (III)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=5, args_size=3
start local 0 start local 1 start local 2 0: iconst_m1
istore 3
start local 3 1: getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
iload 0
iload 1
iload 2
i2l
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callFcntl:(IIJ)I
istore 3
2: goto 8
3: StackMap locals: int int int int
StackMap stack: java.lang.UnsatisfiedLinkError
pop
goto 8
4: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 4
start local 4 5: aload 4
instanceof com.sun.jna.LastErrorException
ifne 7
6: aload 4
athrow
7: StackMap locals: java.lang.RuntimeException
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "fcntl({}, {}, {}) failed, errno ({})."
iconst_4
anewarray java.lang.Object
dup
iconst_0
iload 0
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_3
aload 4
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;[Ljava/lang/Object;)V
end local 4 8: StackMap locals:
StackMap stack:
iload 3
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 fd I
0 9 1 command I
0 9 2 flags I
1 9 3 result I
5 8 4 e Ljava/lang/RuntimeException;
Exception table:
from to target type
1 2 3 Class java.lang.UnsatisfiedLinkError
1 2 4 Class java.lang.RuntimeException
MethodParameters:
Name Flags
fd
command
flags
public static int tryOpenDirectory(java.lang.String);
descriptor: (Ljava/lang/String;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: iconst_m1
istore 1
start local 1 1: getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
aload 0
iconst_0
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callOpen:(Ljava/lang/String;I)I
2: ireturn
3: StackMap locals: java.lang.String int
StackMap stack: java.lang.UnsatisfiedLinkError
pop
goto 8
4: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 2
start local 2 5: aload 2
instanceof com.sun.jna.LastErrorException
ifne 7
6: aload 2
athrow
7: StackMap locals: java.lang.RuntimeException
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "open({}, O_RDONLY) failed, errno ({})."
aload 0
aload 2
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
end local 2 8: StackMap locals:
StackMap stack:
iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 path Ljava/lang/String;
1 9 1 fd I
5 8 2 e Ljava/lang/RuntimeException;
Exception table:
from to target type
1 2 3 Class java.lang.UnsatisfiedLinkError
1 2 4 Class java.lang.RuntimeException
MethodParameters:
Name Flags
path
public static void trySync(int);
descriptor: (I)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: iload 0
iconst_m1
if_icmpne 2
1: return
2: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
iload 0
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callFsync:(I)I
pop
3: goto 11
4: StackMap locals:
StackMap stack: java.lang.UnsatisfiedLinkError
pop
goto 11
5: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 1
start local 1 6: aload 1
instanceof com.sun.jna.LastErrorException
ifne 8
7: aload 1
athrow
8: StackMap locals: java.lang.RuntimeException
StackMap stack:
ldc "fsync(%s) failed, errno %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
iload 0
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 1
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 2
start local 2 9: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
aload 2
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
10: new org.apache.cassandra.io.FSWriteError
dup
aload 1
aload 2
invokespecial org.apache.cassandra.io.FSWriteError.<init>:(Ljava/lang/Throwable;Ljava/lang/String;)V
athrow
end local 2 end local 1 11: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 fd I
6 11 1 e Ljava/lang/RuntimeException;
9 11 2 errMsg Ljava/lang/String;
Exception table:
from to target type
2 3 4 Class java.lang.UnsatisfiedLinkError
2 3 5 Class java.lang.RuntimeException
MethodParameters:
Name Flags
fd
public static void tryCloseFD(int);
descriptor: (I)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=3, args_size=1
start local 0 0: iload 0
iconst_m1
if_icmpne 2
1: return
2: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
iload 0
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callClose:(I)I
pop
3: goto 11
4: StackMap locals:
StackMap stack: java.lang.UnsatisfiedLinkError
pop
goto 11
5: StackMap locals:
StackMap stack: java.lang.RuntimeException
astore 1
start local 1 6: aload 1
instanceof com.sun.jna.LastErrorException
ifne 8
7: aload 1
athrow
8: StackMap locals: java.lang.RuntimeException
StackMap stack:
ldc "close(%d) failed, errno (%d)."
iconst_2
anewarray java.lang.Object
dup
iconst_0
iload 0
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
aload 1
invokestatic org.apache.cassandra.utils.NativeLibrary.errno:(Ljava/lang/RuntimeException;)I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
astore 2
start local 2 9: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
aload 2
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
10: new org.apache.cassandra.io.FSWriteError
dup
aload 1
aload 2
invokespecial org.apache.cassandra.io.FSWriteError.<init>:(Ljava/lang/Throwable;Ljava/lang/String;)V
athrow
end local 2 end local 1 11: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 fd I
6 11 1 e Ljava/lang/RuntimeException;
9 11 2 errMsg Ljava/lang/String;
Exception table:
from to target type
2 3 4 Class java.lang.UnsatisfiedLinkError
2 3 5 Class java.lang.RuntimeException
MethodParameters:
Name Flags
fd
public static int getfd(java.nio.channels.FileChannel);
descriptor: (Ljava/nio/channels/FileChannel;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.NativeLibrary.FILE_CHANNEL_FD_FIELD:Ljava/lang/reflect/Field;
aload 0
invokevirtual java.lang.reflect.Field.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.io.FileDescriptor
invokestatic org.apache.cassandra.utils.NativeLibrary.getfd:(Ljava/io/FileDescriptor;)I
1: ireturn
2: StackMap locals:
StackMap stack: java.lang.Exception
pop
3: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Unable to read fd field from FileChannel"
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
4: iconst_m1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 channel Ljava/nio/channels/FileChannel;
Exception table:
from to target type
0 1 2 Class java.lang.IllegalArgumentException
0 1 2 Class java.lang.IllegalAccessException
MethodParameters:
Name Flags
channel
public static int getfd(java.io.FileDescriptor);
descriptor: (Ljava/io/FileDescriptor;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.NativeLibrary.FILE_DESCRIPTOR_FD_FIELD:Ljava/lang/reflect/Field;
aload 0
invokevirtual java.lang.reflect.Field.getInt:(Ljava/lang/Object;)I
1: ireturn
2: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 3: aload 1
invokestatic org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable:(Ljava/lang/Throwable;)V
4: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Unable to read fd field from FileDescriptor"
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;)V
end local 1 5: iconst_m1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 descriptor Ljava/io/FileDescriptor;
3 5 1 e Ljava/lang/Exception;
Exception table:
from to target type
0 1 2 Class java.lang.Exception
MethodParameters:
Name Flags
descriptor
public static long getProcessID();
descriptor: ()J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: getstatic org.apache.cassandra.utils.NativeLibrary.wrappedLibrary:Lorg/apache/cassandra/utils/NativeLibraryWrapper;
invokeinterface org.apache.cassandra.utils.NativeLibraryWrapper.callGetpid:()J
1: lreturn
2: StackMap locals:
StackMap stack: java.lang.Exception
astore 0
start local 0 3: getstatic org.apache.cassandra.utils.NativeLibrary.logger:Lorg/slf4j/Logger;
ldc "Failed to get PID from JNA"
aload 0
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Throwable;)V
end local 0 4: ldc -1
lreturn
LocalVariableTable:
Start End Slot Name Signature
3 4 0 e Ljava/lang/Exception;
Exception table:
from to target type
0 1 2 Class java.lang.Exception
static int[] $SWITCH_TABLE$org$apache$cassandra$utils$NativeLibrary$OSType();
descriptor: ()[I
flags: (0x1008) ACC_STATIC, ACC_SYNTHETIC
Code:
stack=3, locals=1, args_size=0
0: getstatic org.apache.cassandra.utils.NativeLibrary.$SWITCH_TABLE$org$apache$cassandra$utils$NativeLibrary$OSType:[I
dup
ifnull 1
areturn
StackMap locals:
StackMap stack: int[]
1: pop
invokestatic org.apache.cassandra.utils.NativeLibrary$OSType.values:()[Lorg/apache/cassandra/utils/NativeLibrary$OSType;
arraylength
newarray 10
astore 0
2: aload 0
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.AIX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
invokevirtual org.apache.cassandra.utils.NativeLibrary$OSType.ordinal:()I
iconst_4
iastore
3: goto 5
StackMap locals: int[]
StackMap stack: java.lang.NoSuchFieldError
4: pop
StackMap locals:
StackMap stack:
5: aload 0
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.LINUX:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
invokevirtual org.apache.cassandra.utils.NativeLibrary$OSType.ordinal:()I
iconst_1
iastore
6: goto 8
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
7: pop
StackMap locals:
StackMap stack:
8: aload 0
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.MAC:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
invokevirtual org.apache.cassandra.utils.NativeLibrary$OSType.ordinal:()I
iconst_2
iastore
9: goto 11
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
10: pop
StackMap locals:
StackMap stack:
11: aload 0
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.OTHER:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
invokevirtual org.apache.cassandra.utils.NativeLibrary$OSType.ordinal:()I
iconst_5
iastore
12: goto 14
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
13: pop
StackMap locals:
StackMap stack:
14: aload 0
getstatic org.apache.cassandra.utils.NativeLibrary$OSType.WINDOWS:Lorg/apache/cassandra/utils/NativeLibrary$OSType;
invokevirtual org.apache.cassandra.utils.NativeLibrary$OSType.ordinal:()I
iconst_3
iastore
15: goto 17
StackMap locals:
StackMap stack: java.lang.NoSuchFieldError
16: pop
StackMap locals:
StackMap stack:
17: aload 0
dup
putstatic org.apache.cassandra.utils.NativeLibrary.$SWITCH_TABLE$org$apache$cassandra$utils$NativeLibrary$OSType:[I
areturn
LocalVariableTable:
Start End Slot Name Signature
Exception table:
from to target type
2 3 4 Class java.lang.NoSuchFieldError
5 6 7 Class java.lang.NoSuchFieldError
8 9 10 Class java.lang.NoSuchFieldError
11 12 13 Class java.lang.NoSuchFieldError
14 15 16 Class java.lang.NoSuchFieldError
}
SourceFile: "NativeLibrary.java"
NestMembers:
org.apache.cassandra.utils.NativeLibrary$OSType
InnerClasses:
public final OSType = org.apache.cassandra.utils.NativeLibrary$OSType of org.apache.cassandra.utils.NativeLibrary
public final Level = org.apache.cassandra.utils.NoSpamLogger$Level of org.apache.cassandra.utils.NoSpamLogger