public class oadd.org.apache.drill.exec.memory.AllocationManager extends java.lang.Object
{
private static final java.util.concurrent.atomic.AtomicLong MANAGER_ID_GENERATOR;
private static final java.util.concurrent.atomic.AtomicLong LEDGER_ID_GENERATOR;
static final oadd.io.netty.buffer.PooledByteBufAllocatorL INNER_ALLOCATOR;
private final oadd.org.apache.drill.exec.memory.RootAllocator root;
private final long allocatorManagerId;
private final int size;
private final oadd.io.netty.buffer.UnsafeDirectLittleEndian underlying;
private final java.util.IdentityHashMap map;
private final java.util.concurrent.locks.ReadWriteLock lock;
private final oadd.org.apache.drill.common.concurrent.AutoCloseableLock readLock;
private final oadd.org.apache.drill.common.concurrent.AutoCloseableLock writeLock;
private final long amCreationTime;
private volatile oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger owningLedger;
private volatile long amDestructionTime;
void <init>(oadd.org.apache.drill.exec.memory.BaseAllocator, int)
{
oadd.org.apache.drill.exec.memory.BaseAllocator v;
oadd.io.netty.buffer.UnsafeDirectLittleEndian v, v;
long v, v;
java.util.concurrent.locks.ReentrantReadWriteLock v;
oadd.io.netty.buffer.PooledByteBufAllocatorL v;
int v, v;
java.util.concurrent.locks.ReadWriteLock v, v;
java.util.IdentityHashMap v;
oadd.org.apache.drill.common.concurrent.AutoCloseableLock v, v;
oadd.org.apache.drill.exec.memory.RootAllocator v;
oadd.org.apache.drill.exec.memory.AllocationManager v;
java.util.concurrent.atomic.AtomicLong v;
java.util.concurrent.locks.Lock v, v;
oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger v;
v := @this: oadd.org.apache.drill.exec.memory.AllocationManager;
v := @parameter: oadd.org.apache.drill.exec.memory.BaseAllocator;
v := @parameter: int;
specialinvoke v.<java.lang.Object: void <init>()>();
v = <oadd.org.apache.drill.exec.memory.AllocationManager: java.util.concurrent.atomic.AtomicLong MANAGER_ID_GENERATOR>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long incrementAndGet()>();
v.<oadd.org.apache.drill.exec.memory.AllocationManager: long allocatorManagerId> = v;
v = new java.util.IdentityHashMap;
specialinvoke v.<java.util.IdentityHashMap: void <init>()>();
v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.IdentityHashMap map> = v;
v = new java.util.concurrent.locks.ReentrantReadWriteLock;
specialinvoke v.<java.util.concurrent.locks.ReentrantReadWriteLock: void <init>()>();
v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.concurrent.locks.ReadWriteLock lock> = v;
v = new oadd.org.apache.drill.common.concurrent.AutoCloseableLock;
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.concurrent.locks.ReadWriteLock lock>;
v = interfaceinvoke v.<java.util.concurrent.locks.ReadWriteLock: java.util.concurrent.locks.Lock readLock()>();
specialinvoke v.<oadd.org.apache.drill.common.concurrent.AutoCloseableLock: void <init>(java.util.concurrent.locks.Lock)>(v);
v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.common.concurrent.AutoCloseableLock readLock> = v;
v = new oadd.org.apache.drill.common.concurrent.AutoCloseableLock;
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.concurrent.locks.ReadWriteLock lock>;
v = interfaceinvoke v.<java.util.concurrent.locks.ReadWriteLock: java.util.concurrent.locks.Lock writeLock()>();
specialinvoke v.<oadd.org.apache.drill.common.concurrent.AutoCloseableLock: void <init>(java.util.concurrent.locks.Lock)>(v);
v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.common.concurrent.AutoCloseableLock writeLock> = v;
v = staticinvoke <java.lang.System: long nanoTime()>();
v.<oadd.org.apache.drill.exec.memory.AllocationManager: long amCreationTime> = v;
v.<oadd.org.apache.drill.exec.memory.AllocationManager: long amDestructionTime> = 0L;
staticinvoke <org.apache.drill.shaded.guava.com.google.common.base.Preconditions: java.lang.Object checkNotNull(java.lang.Object)>(v);
virtualinvoke v.<oadd.org.apache.drill.exec.memory.BaseAllocator: void assertOpen()>();
v = v.<oadd.org.apache.drill.exec.memory.BaseAllocator: oadd.org.apache.drill.exec.memory.RootAllocator root>;
v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.exec.memory.RootAllocator root> = v;
v = <oadd.org.apache.drill.exec.memory.AllocationManager: oadd.io.netty.buffer.PooledByteBufAllocatorL INNER_ALLOCATOR>;
v = virtualinvoke v.<oadd.io.netty.buffer.PooledByteBufAllocatorL: oadd.io.netty.buffer.UnsafeDirectLittleEndian allocate(int)>(v);
v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.io.netty.buffer.UnsafeDirectLittleEndian underlying> = v;
v = specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger associate(oadd.org.apache.drill.exec.memory.BaseAllocator,boolean)>(v, 0);
v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger owningLedger> = v;
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.io.netty.buffer.UnsafeDirectLittleEndian underlying>;
v = virtualinvoke v.<oadd.io.netty.buffer.UnsafeDirectLittleEndian: int capacity()>();
v.<oadd.org.apache.drill.exec.memory.AllocationManager: int size> = v;
return;
}
oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger associate(oadd.org.apache.drill.exec.memory.BaseAllocator)
{
oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger v;
oadd.org.apache.drill.exec.memory.BaseAllocator v;
oadd.org.apache.drill.exec.memory.AllocationManager v;
v := @this: oadd.org.apache.drill.exec.memory.AllocationManager;
v := @parameter: oadd.org.apache.drill.exec.memory.BaseAllocator;
v = specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger associate(oadd.org.apache.drill.exec.memory.BaseAllocator,boolean)>(v, 1);
return v;
}
private oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger associate(oadd.org.apache.drill.exec.memory.BaseAllocator, boolean)
{
java.lang.Throwable v, v;
java.lang.IllegalStateException v;
oadd.org.apache.drill.exec.memory.BaseAllocator v;
boolean v, v;
java.util.IdentityHashMap v, v, v;
oadd.org.apache.drill.common.concurrent.AutoCloseableLock v, v;
oadd.org.apache.drill.exec.memory.RootAllocator v, v;
oadd.org.apache.drill.exec.memory.AllocationManager v;
oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger v;
oadd.org.apache.drill.exec.memory.AllocationManager$ReleaseListener v;
oadd.org.apache.drill.common.AutoCloseables$Closeable v, v;
java.lang.Object v, v, v;
v := @this: oadd.org.apache.drill.exec.memory.AllocationManager;
v := @parameter: oadd.org.apache.drill.exec.memory.BaseAllocator;
v := @parameter: boolean;
virtualinvoke v.<oadd.org.apache.drill.exec.memory.BaseAllocator: void assertOpen()>();
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.exec.memory.RootAllocator root>;
v = v.<oadd.org.apache.drill.exec.memory.BaseAllocator: oadd.org.apache.drill.exec.memory.RootAllocator root>;
if v == v goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("A buffer can only be associated between two allocators that share the same root.");
throw v;
label:
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.common.concurrent.AutoCloseableLock readLock>;
v = virtualinvoke v.<oadd.org.apache.drill.common.concurrent.AutoCloseableLock: oadd.org.apache.drill.common.AutoCloseables$Closeable open()>();
label:
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.IdentityHashMap map>;
v = virtualinvoke v.<java.util.IdentityHashMap: java.lang.Object get(java.lang.Object)>(v);
if v == null goto label;
if v == 0 goto label;
specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger: void inc()>();
label:
if v == null goto label;
interfaceinvoke v.<oadd.org.apache.drill.common.AutoCloseables$Closeable: void close()>();
label:
return v;
label:
if v == null goto label;
interfaceinvoke v.<oadd.org.apache.drill.common.AutoCloseables$Closeable: void close()>();
goto label;
label:
v := @caughtexception;
throw v;
label:
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.org.apache.drill.common.concurrent.AutoCloseableLock writeLock>;
v = virtualinvoke v.<oadd.org.apache.drill.common.concurrent.AutoCloseableLock: oadd.org.apache.drill.common.AutoCloseables$Closeable open()>();
label:
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.IdentityHashMap map>;
v = virtualinvoke v.<java.util.IdentityHashMap: java.lang.Object get(java.lang.Object)>(v);
if v == null goto label;
if v == 0 goto label;
specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger: void inc()>();
label:
if v == null goto label;
interfaceinvoke v.<oadd.org.apache.drill.common.AutoCloseables$Closeable: void close()>();
label:
return v;
label:
v = new oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger;
v = new oadd.org.apache.drill.exec.memory.AllocationManager$ReleaseListener;
specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager$ReleaseListener: void <init>(oadd.org.apache.drill.exec.memory.AllocationManager,oadd.org.apache.drill.exec.memory.BufferAllocator)>(v, v);
specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger: void <init>(oadd.org.apache.drill.exec.memory.AllocationManager,oadd.org.apache.drill.exec.memory.BaseAllocator,oadd.org.apache.drill.exec.memory.AllocationManager$ReleaseListener)>(v, v, v);
if v == 0 goto label;
specialinvoke v.<oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger: void inc()>();
label:
v = v.<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.IdentityHashMap map>;
v = virtualinvoke v.<java.util.IdentityHashMap: java.lang.Object put(java.lang.Object,java.lang.Object)>(v, v);
if v != null goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <org.apache.drill.shaded.guava.com.google.common.base.Preconditions: void checkArgument(boolean)>(v);
virtualinvoke v.<oadd.org.apache.drill.exec.memory.BaseAllocator: void associateLedger(oadd.org.apache.drill.exec.memory.AllocationManager$BufferLedger)>(v);
label:
if v == null goto label;
interfaceinvoke v.<oadd.org.apache.drill.common.AutoCloseables$Closeable: void close()>();
label:
return v;
label:
v := @caughtexception;
throw v;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public static int chunkSize()
{
int v;
oadd.io.netty.buffer.PooledByteBufAllocatorL v;
v = <oadd.org.apache.drill.exec.memory.AllocationManager: oadd.io.netty.buffer.PooledByteBufAllocatorL INNER_ALLOCATOR>;
v = virtualinvoke v.<oadd.io.netty.buffer.PooledByteBufAllocatorL: int getChunkSize()>();
return v;
}
static void <clinit>()
{
java.util.concurrent.atomic.AtomicLong v, v;
oadd.com.codahale.metrics.MetricRegistry v;
oadd.io.netty.buffer.PooledByteBufAllocatorL v;
v = new java.util.concurrent.atomic.AtomicLong;
specialinvoke v.<java.util.concurrent.atomic.AtomicLong: void <init>(long)>(0L);
<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.concurrent.atomic.AtomicLong MANAGER_ID_GENERATOR> = v;
v = new java.util.concurrent.atomic.AtomicLong;
specialinvoke v.<java.util.concurrent.atomic.AtomicLong: void <init>(long)>(0L);
<oadd.org.apache.drill.exec.memory.AllocationManager: java.util.concurrent.atomic.AtomicLong LEDGER_ID_GENERATOR> = v;
v = new oadd.io.netty.buffer.PooledByteBufAllocatorL;
v = staticinvoke <oadd.org.apache.drill.exec.metrics.DrillMetrics: oadd.com.codahale.metrics.MetricRegistry getRegistry()>();
specialinvoke v.<oadd.io.netty.buffer.PooledByteBufAllocatorL: void <init>(oadd.com.codahale.metrics.MetricRegistry)>(v);
<oadd.org.apache.drill.exec.memory.AllocationManager: oadd.io.netty.buffer.PooledByteBufAllocatorL INNER_ALLOCATOR> = v;
return;
}
}