sa-jdi

(int)maxLoadersField.getValue(addr);
  }
  
  public Oop initiatingLoader(int i)
  {
    if (Assert.ASSERTS_ENABLED) {
      Assert.that((i >= 0) && (i < numLoaders()), "invalid index");
    }
    Address loaders = loadersField.getValue(addr);
    OopHandle loader = loaders.addOffsetToAsOopHandle(i * VM.getVM().getOopSize());
    return VM.getVM().getObjectHeap().newOop(loader);
  }
  
  public LoaderConstraintEntry(Address addr)
  {
    super(addr);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.LoaderConstraintEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class LoaderConstraintTable$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    LoaderConstraintTable.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.LoaderConstraintTable.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.TwoOopHashtable;

public class LoaderConstraintTable
  extends TwoOopHashtable
{
  private static int nofBuckets;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        LoaderConstraintTable.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("LoaderConstraintTable");
    nofBuckets = db.lookupIntConstant("LoaderConstraintTable::_nof_buckets").intValue();
  }
  
  public static int getNumOfBuckets()
  {
    return nofBuckets;
  }
  
  public LoaderConstraintTable(Address addr)
  {
    super(addr);
  }
  
  protected Class getHashtableEntryClass()
  {
    return LoaderConstraintEntry.class;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.LoaderConstraintTable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class MemRegion$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    MemRegion.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.MemRegion.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.CIntegerField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.AddressOps;

public class MemRegion
  implements Cloneable
{
  private Address start;
  private long byteSize;
  private static AddressField startField;
  private static CIntegerField wordSizeField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        MemRegion.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("MemRegion");
    
    startField = type.getAddressField("_start");
    wordSizeField = type.getCIntegerField("_word_size");
  }
  
  public MemRegion(Address memRegionAddr)
  {
    this(startField.getValue(memRegionAddr), wordSizeField.getValue(memRegionAddr));
  }
  
  public MemRegion(Address start, long wordSize)
  {
    setStart(start);
    setWordSize(wordSize);
  }
  
  public MemRegion(Address start, Address limit)
  {
    setStart(start);
    byteSize = limit.minus(start);
  }
  
  public Object clone()
  {
    return new MemRegion(start, byteSize);
  }
  
  public MemRegion copy()
  {
    return (MemRegion)clone();
  }
  
  public MemRegion intersection(MemRegion mr2)
  {
    MemRegion res = new MemRegion();
    if (AddressOps.gt(mr2.start(), start())) {
      res.setStart(mr2.start());
    } else {
      res.setStart(start());
    }
    Address end = end();
    Address mr2End = mr2.end();
    Address resEnd;
    Address resEnd;
    if (AddressOps.lt(end, mr2End)) {
      resEnd = end;
    } else {
      resEnd = mr2End;
    }
    if (AddressOps.lt(resEnd, res.start()))
    {
      res.setStart(null);
      res.setWordSize(0L);
    }
    else
    {
      res.setEnd(resEnd);
    }
    return res;
  }
  
  public MemRegion union(MemRegion mr2)
  {
    MemRegion res = new MemRegion();
    if (AddressOps.lt(mr2.start(), start())) {
      res.setStart(mr2.start());
    } else {
      res.setStart(start());
    }
    Address end = end();
    Address mr2End = mr2.end();
    Address resEnd;
    Address resEnd;
    if (AddressOps.gt(end, mr2End)) {
      resEnd = end;
    } else {
      resEnd = mr2End;
    }
    res.setEnd(resEnd);
    return res;
  }
  
  public Address start()
  {
    return start;
  }
  
  public OopHandle startAsOopHandle()
  {
    return start().addOffsetToAsOopHandle(0L);
  }
  
  public Address end()
  {
    return start.addOffsetTo(byteSize);
  }
  
  public OopHandle endAsOopHandle()
  {
    return end().addOffsetToAsOopHandle(0L);
  }
  
  public void setStart(Address start)
  {
    this.start = start;
  }
  
  public void setEnd(Address end)
  {
    byteSize = end.minus(start);
  }
  
  public void setWordSize(long wordSize)
  {
    byteSize = (VM.getVM().getAddressSize() * wordSize);
  }
  
  public boolean contains(MemRegion mr2)
  {
    return (AddressOps.lte(start, start)) && (AddressOps.gte(end(), mr2.end()));
  }
  
  public boolean contains(Address addr)
  {
    return (AddressOps.gte(addr, start())) && (AddressOps.lt(addr, end()));
  }
  
  public long byteSize()
  {
    return byteSize;
  }
  
  public long wordSize()
  {
    return byteSize / VM.getVM().getAddressSize();
  }
  
  public MemRegion() {}
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.MemRegion
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.debugger.Address;

public class OffsetTableContigSpace
  extends ContiguousSpace
{
  public OffsetTableContigSpace(Address addr)
  {
    super(addr);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.OffsetTableContigSpace
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class OneContigSpaceCardGeneration$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    OneContigSpaceCardGeneration.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.OneContigSpaceCardGeneration.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.io.PrintStream;
import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.runtime.VirtualSpace;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;

public abstract class OneContigSpaceCardGeneration
  extends CardGeneration
{
  private static AddressField theSpaceField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        OneContigSpaceCardGeneration.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("OneContigSpaceCardGeneration");
    
    theSpaceField = type.getAddressField("_the_space");
  }
  
  public OneContigSpaceCardGeneration(Address addr)
  {
    super(addr);
  }
  
  public ContiguousSpace theSpace()
  {
    return (ContiguousSpace)VMObjectFactory.newObject(ContiguousSpace.class, theSpaceField.getValue(addr));
  }
  
  public boolean isIn(Address p)
  {
    return theSpace().contains(p);
  }
  
  public long capacity()
  {
    return theSpace().capacity();
  }
  
  public long used()
  {
    return theSpace().used();
  }
  
  public long free()
  {
    return theSpace().free();
  }
  
  public long contiguousAvailable()
  {
    return theSpace().free() + virtualSpace().uncommittedSize();
  }
  
  public void spaceIterate(SpaceClosure blk, boolean usedOnly)
  {
    blk.doSpace(theSpace());
  }
  
  public void printOn(PrintStream tty)
  {
    tty.print("  old ");
    theSpace().printOn(tty);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.OneContigSpaceCardGeneration
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.debugger.Address;

public class ParNewGeneration
  extends DefNewGeneration
{
  public ParNewGeneration(Address addr)
  {
    super(addr);
  }
  
  public Generation.Name kind()
  {
    return Generation.Name.PAR_NEW;
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.ParNewGeneration
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.runtime.VMObject;

public abstract class PermGen
  extends VMObject
{
  public PermGen(Address addr)
  {
    super(addr);
  }
  
  public abstract Generation asGen();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.PermGen
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class PlaceholderEntry$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    PlaceholderEntry.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.PlaceholderEntry.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.types.OopField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.HashtableEntry;

public class PlaceholderEntry
  extends HashtableEntry
{
  private static OopField loaderField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        PlaceholderEntry.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("PlaceholderEntry");
    loaderField = type.getOopField("_loader");
  }
  
  public Oop loader()
  {
    return VM.getVM().getObjectHeap().newOop(loaderField.getValue(addr));
  }
  
  public PlaceholderEntry(Address addr)
  {
    super(addr);
  }
  
  public Symbol klass()
  {
    return (Symbol)literal();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.PlaceholderEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.FieldType;
import sun.jvm.hotspot.oops.FieldType.ArrayInfo;
import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.BasicType;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.utilities.TwoOopHashtable;

public class PlaceholderTable
  extends TwoOopHashtable
{
  public PlaceholderTable(Address addr)
  {
    super(addr);
  }
  
  protected Class getHashtableEntryClass()
  {
    return PlaceholderEntry.class;
  }
  
  public void primArrayClassesDo(SystemDictionary.ClassAndLoaderVisitor v)
  {
    ObjectHeap heap = VM.getVM().getObjectHeap();
    int tblSize = tableSize();
    for (int index = 0; index < tblSize; index++) {
      for (PlaceholderEntry probe = (PlaceholderEntry)bucket(index); probe != null; probe = (PlaceholderEntry)probe.next())
      {
        Symbol sym = probe.klass();
        
        FieldType ft = new FieldType(sym);
        if (ft.isArray())
        {
          FieldType.ArrayInfo info = ft.getArrayInfo();
          if (info.elementBasicType() != BasicType.getTObject())
          {
            Klass arrayKlass = heap.typeArrayKlassObj(info.elementBasicType());
            arrayKlass = arrayKlass.arrayKlassOrNull(info.dimension());
            v.visit(arrayKlass, probe.loader());
          }
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.PlaceholderTable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class ProtectionDomainEntry$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    ProtectionDomainEntry.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.ProtectionDomainEntry.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObject;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.OopField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;

public class ProtectionDomainEntry
  extends VMObject
{
  private static AddressField nextField;
  private static OopField protectionDomainField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        ProtectionDomainEntry.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("ProtectionDomainEntry");
    
    nextField = type.getAddressField("_next");
    protectionDomainField = type.getOopField("_protection_domain");
  }
  
  public ProtectionDomainEntry(Address addr)
  {
    super(addr);
  }
  
  public ProtectionDomainEntry next()
  {
    return (ProtectionDomainEntry)VMObjectFactory.newObject(ProtectionDomainEntry.class, addr);
  }
  
  public Oop protectionDomain()
  {
    return VM.getVM().getObjectHeap().newOop(protectionDomainField.getValue(addr));
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.ProtectionDomainEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class SharedHeap$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    SharedHeap.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SharedHeap.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.gc_interface.CollectedHeap;
import sun.jvm.hotspot.gc_interface.CollectedHeapName;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VirtualConstructor;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;

public abstract class SharedHeap
  extends CollectedHeap
{
  private static AddressField permGenField;
  private static VirtualConstructor ctor;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        SharedHeap.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("SharedHeap");
    permGenField = type.getAddressField("_perm_gen");
    ctor = new VirtualConstructor(db);
    ctor.addMapping("CompactingPermGen", CompactingPermGen.class);
    ctor.addMapping("CMSPermGen", CMSPermGen.class);
  }
  
  public SharedHeap(Address addr)
  {
    super(addr);
  }
  
  public PermGen perm()
  {
    return (PermGen)ctor.instantiateWrapperFor(permGenField.getValue(addr));
  }
  
  public CollectedHeapName kind()
  {
    return CollectedHeapName.SHARED_HEAP;
  }
  
  public Generation permGen()
  {
    return perm().asGen();
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SharedHeap
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class Space$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    Space.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.Space.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.io.PrintStream;
import java.util.List;
import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObject;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;

public abstract class Space
  extends VMObject
{
  private static AddressField bottomField;
  private static AddressField endField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        Space.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("Space");
    
    bottomField = type.getAddressField("_bottom");
    endField = type.getAddressField("_end");
  }
  
  public Space(Address addr)
  {
    super(addr);
  }
  
  public Address bottom()
  {
    return bottomField.getValue(addr);
  }
  
  public Address end()
  {
    return endField.getValue(addr);
  }
  
  public MemRegion usedRegion()
  {
    return new MemRegion(bottom(), end());
  }
  
  public OopHandle bottomAsOopHandle()
  {
    return bottomField.getOopHandle(addr);
  }
  
  public OopHandle nextOopHandle(OopHandle handle, long size)
  {
    return handle.addOffsetToAsOopHandle(size);
  }
  
  public long capacity()
  {
    return end().minus(bottom());
  }
  
  public boolean contains(Address p)
  {
    return (bottom().lessThanOrEqual(p)) && (end().greaterThan(p));
  }
  
  public void print()
  {
    printOn(System.out);
  }
  
  public void printOn(PrintStream tty)
  {
    tty.print(" space capacity = ");
    tty.print(capacity());
    tty.print(", ");
    tty.print(used() * 100.0D / capacity());
    tty.print(" used");
  }
  
  public abstract List getLiveRegions();
  
  public abstract long used();
  
  public abstract long free();
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.Space
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

public abstract interface SpaceClosure
{
  public abstract void doSpace(Space paramSpace);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SpaceClosure
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class StringTable$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    StringTable.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.StringTable.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.oops.Instance;

public abstract interface StringTable$StringVisitor
{
  public abstract void visit(Instance paramInstance);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.StringTable.StringVisitor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.Instance;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.Hashtable;
import sun.jvm.hotspot.utilities.HashtableEntry;

public class StringTable
  extends Hashtable
{
  private static AddressField theTableField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        StringTable.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("StringTable");
    theTableField = type.getAddressField("_the_table");
  }
  
  public static StringTable getTheTable()
  {
    Address tmp = theTableField.getValue();
    return (StringTable)VMObjectFactory.newObject(StringTable.class, tmp);
  }
  
  public StringTable(Address addr)
  {
    super(addr);
  }
  
  public void stringsDo(StringVisitor visitor)
  {
    int numBuckets = tableSize();
    for (int i = 0; i < numBuckets; i++) {
      for (HashtableEntry e = (HashtableEntry)bucket(i); e != null; e = (HashtableEntry)e.next()) {
        visitor.visit((Instance)e.literal());
      }
    }
  }
  
  public static abstract interface StringVisitor
  {
    public abstract void visit(Instance paramInstance);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.StringTable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class SymbolTable$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    SymbolTable.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SymbolTable.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.oops.Symbol;

public abstract interface SymbolTable$SymbolVisitor
{
  public abstract void visit(Symbol paramSymbol);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SymbolTable.SymbolVisitor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.utilities.Hashtable;
import sun.jvm.hotspot.utilities.HashtableEntry;

public class SymbolTable
  extends Hashtable
{
  private static AddressField theTableField;
  private static int symbolTableSize;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        SymbolTable.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("SymbolTable");
    theTableField = type.getAddressField("_the_table");
    symbolTableSize = db.lookupIntConstant("SymbolTable::symbol_table_size").intValue();
  }
  
  public static SymbolTable getTheTable()
  {
    Address tmp = theTableField.getValue();
    return (SymbolTable)VMObjectFactory.newObject(SymbolTable.class, tmp);
  }
  
  public static int getSymbolTableSize()
  {
    return symbolTableSize;
  }
  
  public SymbolTable(Address addr)
  {
    super(addr);
  }
  
  public Symbol probe(String name)
  {
    try
    {
      return probe(toModifiedUTF8Bytes(name));
    }
    catch (IOException e) {}
    return null;
  }
  
  public Symbol probe(byte[] name)
  {
    long hashValue = hashSymbol(name);
    for (HashtableEntry e = (HashtableEntry)bucket(hashToIndex(hashValue)); e != null; e = (HashtableEntry)e.next()) {
      if (e.hash() == hashValue)
      {
        Symbol sym = (Symbol)e.literal();
        if (sym.equals(name)) {
          return sym;
        }
      }
    }
    return null;
  }
  
  public void symbolsDo(SymbolVisitor visitor)
  {
    int numBuckets = tableSize();
    for (int i = 0; i < numBuckets; i++) {
      for (HashtableEntry e = (HashtableEntry)bucket(i); e != null; e = (HashtableEntry)e.next()) {
        visitor.visit((Symbol)e.literal());
      }
    }
  }
  
  private static byte[] toModifiedUTF8Bytes(String name)
    throws IOException
  {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(baos);
    dos.writeUTF(name);
    dos.flush();
    byte[] buf = baos.toByteArray();
    byte[] res = new byte[buf.length - 2];
    
    System.arraycopy(buf, 2, res, 0, res.length);
    return res;
  }
  
  public static abstract interface SymbolVisitor
  {
    public abstract void visit(Symbol paramSymbol);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SymbolTable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class SystemDictionary$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    SystemDictionary.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SystemDictionary.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.oops.Klass;

final class SystemDictionary$2
  implements SystemDictionary.ClassVisitor
{
  private final SystemDictionary this$0;
  
  SystemDictionary$2(SystemDictionary paramSystemDictionary, SystemDictionary.ClassVisitor paramClassVisitor) {}
  
  public void visit(Klass k)
  {
    for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
      val$v.visit(l);
    }
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SystemDictionary.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.Oop;

public abstract interface SystemDictionary$ClassAndLoaderVisitor
{
  public abstract void visit(Klass paramKlass, Oop paramOop);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SystemDictionary.ClassAndLoaderVisitor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.oops.Klass;

public abstract interface SystemDictionary$ClassVisitor
{
  public abstract void visit(Klass paramKlass);
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SystemDictionary.ClassVisitor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.oops.InstanceKlass;
import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.oops.Symbol;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VMObjectFactory;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.OopField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;

public class SystemDictionary
{
  private static AddressField dictionaryField;
  private static AddressField sharedDictionaryField;
  private static AddressField placeholdersField;
  private static AddressField loaderConstraintTableField;
  private static OopField javaSystemLoaderField;
  private static int nofBuckets;
  private static OopField objectKlassField;
  private static OopField classLoaderKlassField;
  private static OopField stringKlassField;
  private static OopField systemKlassField;
  private static OopField threadKlassField;
  private static OopField threadGroupKlassField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        SystemDictionary.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("SystemDictionary");
    
    dictionaryField = type.getAddressField("_dictionary");
    sharedDictionaryField = type.getAddressField("_shared_dictionary");
    placeholdersField = type.getAddressField("_placeholders");
    loaderConstraintTableField = type.getAddressField("_loader_constraints");
    javaSystemLoaderField = type.getOopField("_java_system_loader");
    nofBuckets = db.lookupIntConstant("SystemDictionary::_nof_buckets").intValue();
    
    objectKlassField = type.getOopField(WK_KLASS("Object_klass"));
    classLoaderKlassField = type.getOopField(WK_KLASS("ClassLoader_klass"));
    stringKlassField = type.getOopField(WK_KLASS("String_klass"));
    systemKlassField = type.getOopField(WK_KLASS("System_klass"));
    threadKlassField = type.getOopField(WK_KLASS("Thread_klass"));
    threadGroupKlassField = type.getOopField(WK_KLASS("ThreadGroup_klass"));
  }
  
  private static String WK_KLASS(String name)
  {
    return "_well_known_klasses[SystemDictionary::" + WK_KLASS_ENUM_NAME(name) + "]";
  }
  
  private static String WK_KLASS_ENUM_NAME(String kname)
  {
    return kname + "_knum";
  }
  
  public Dictionary dictionary()
  {
    Address tmp = dictionaryField.getValue();
    return (Dictionary)VMObjectFactory.newObject(Dictionary.class, tmp);
  }
  
  public Dictionary sharedDictionary()
  {
    Address tmp = sharedDictionaryField.getValue();
    return (Dictionary)VMObjectFactory.newObject(Dictionary.class, tmp);
  }
  
  public PlaceholderTable placeholders()
  {
    Address tmp = placeholdersField.getValue();
    return (PlaceholderTable)VMObjectFactory.newObject(PlaceholderTable.class, tmp);
  }
  
  public LoaderConstraintTable constraints()
  {
    Address tmp = placeholdersField.getValue();
    return (LoaderConstraintTable)VMObjectFactory.newObject(LoaderConstraintTable.class, tmp);
  }
  
  public static InstanceKlass getThreadKlass()
  {
    return (InstanceKlass)newOop(threadKlassField.getValue());
  }
  
  public static InstanceKlass getThreadGroupKlass()
  {
    return (InstanceKlass)newOop(threadGroupKlassField.getValue());
  }
  
  public static InstanceKlass getObjectKlass()
  {
    return (InstanceKlass)newOop(objectKlassField.getValue());
  }
  
  public static InstanceKlass getStringKlass()
  {
    return (InstanceKlass)newOop(stringKlassField.getValue());
  }
  
  public static InstanceKlass getClassLoaderKlass()
  {
    return (InstanceKlass)newOop(classLoaderKlassField.getValue());
  }
  
  public static InstanceKlass getSystemKlass()
  {
    return (InstanceKlass)newOop(systemKlassField.getValue());
  }
  
  public InstanceKlass getAbstractOwnableSynchronizerKlass()
  {
    return (InstanceKlass)find("java/util/concurrent/locks/AbstractOwnableSynchronizer", null, null);
  }
  
  public static Oop javaSystemLoader()
  {
    return newOop(javaSystemLoaderField.getValue());
  }
  
  public static int getNumOfBuckets()
  {
    return nofBuckets;
  }
  
  private static Oop newOop(OopHandle handle)
  {
    return VM.getVM().getObjectHeap().newOop(handle);
  }
  
  public Klass find(String className, Oop classLoader, Oop protectionDomain)
  {
    Symbol sym = VM.getVM().getSymbolTable().probe(className);
    if (sym == null) {
      return null;
    }
    return find(sym, classLoader, protectionDomain);
  }
  
  public Klass find(Symbol className, Oop classLoader, Oop protectionDomain)
  {
    Dictionary dict = dictionary();
    long hash = dict.computeHash(className, classLoader);
    int index = dict.hashToIndex(hash);
    return dict.find(index, hash, className, classLoader, protectionDomain);
  }
  
  public void allClassesDo(final ClassVisitor v)
  {
    ClassVisitor visitor = new ClassVisitor()
    {
      public void visit(Klass k)
      {
        for (Klass l = k; l != null; l = l.arrayKlassOrNull()) {
          v.visit(l);
        }
      }
    };
    classesDo(visitor);
    VM.getVM().getUniverse().basicTypeClassesDo(visitor);
  }
  
  public void classesDo(ClassVisitor v)
  {
    dictionary().classesDo(v);
  }
  
  public void classesDo(ClassAndLoaderVisitor v)
  {
    dictionary().classesDo(v);
  }
  
  public void primArrayClassesDo(ClassAndLoaderVisitor v)
  {
    placeholders().primArrayClassesDo(v);
  }
  
  public static abstract interface ClassAndLoaderVisitor
  {
    public abstract void visit(Klass paramKlass, Oop paramOop);
  }
  
  public static abstract interface ClassVisitor
  {
    public abstract void visit(Klass paramKlass);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.SystemDictionary
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.debugger.Address;

public class TenuredGeneration
  extends OneContigSpaceCardGeneration
{
  public TenuredGeneration(Address addr)
  {
    super(addr);
  }
  
  public Generation.Name kind()
  {
    return Generation.Name.MARK_SWEEP_COMPACT;
  }
  
  public String name()
  {
    return "tenured generation";
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.TenuredGeneration
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import sun.jvm.hotspot.debugger.Address;

public class TenuredSpace
  extends OffsetTableContigSpace
{
  public TenuredSpace(Address addr)
  {
    super(addr);
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.TenuredSpace
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.runtime.VM;

final class Universe$1
  implements Observer
{
  public void update(Observable o, Object data)
  {
    Universe.access$000(VM.getVM().getTypeDataBase());
  }
}

/* Location:
 * Qualified Name:     sun.jvm.hotspot.memory.Universe.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package sun.jvm.hotspot.memory;

import java.io.PrintStream;
import java.util.Observable;
import java.util.Observer;
import sun.jvm.hotspot.debugger.Address;
import sun.jvm.hotspot.debugger.OopHandle;
import sun.jvm.hotspot.gc_implementation.parallelScavenge.ParallelScavengeHeap;
import sun.jvm.hotspot.gc_interface.CollectedHeap;
import sun.jvm.hotspot.oops.Klass;
import sun.jvm.hotspot.oops.ObjectHeap;
import sun.jvm.hotspot.oops.Oop;
import sun.jvm.hotspot.runtime.BasicType;
import sun.jvm.hotspot.runtime.VM;
import sun.jvm.hotspot.runtime.VirtualConstructor;
import sun.jvm.hotspot.types.AddressField;
import sun.jvm.hotspot.types.CIntegerField;
import sun.jvm.hotspot.types.OopField;
import sun.jvm.hotspot.types.Type;
import sun.jvm.hotspot.types.TypeDataBase;
import sun.jvm.hotspot.types.WrongTypeException;

public class Universe
{
  private static AddressField collectedHeapField;
  private static VirtualConstructor heapConstructor;
  private static OopField mainThreadGroupField;
  private static OopField systemThreadGroupField;
  private static OopField boolArrayKlassObjField;
  private static OopField byteArrayKlassObjField;
  private static OopField charArrayKlassObjField;
  private static OopField intArrayKlassObjField;
  private static OopField shortArrayKlassObjField;
  private static OopField longArrayKlassObjField;
  private static OopField singleArrayKlassObjField;
  private static OopField doubleArrayKlassObjField;
  private static OopField systemObjArrayKlassObjField;
  private static AddressField narrowOopBaseField;
  private static CIntegerField narrowOopShiftField;
  
  static
  {
    VM.registerVMInitializedObserver(new Observer()
    {
      public void update(Observable o, Object data)
      {
        Universe.initialize(VM.getVM().getTypeDataBase());
      }
    });
  }
  
  private static synchronized void initialize(TypeDataBase db)
  {
    Type type = db.lookupType("Universe");
    
    collectedHeapField = type.getAddressField("_collectedHeap");
    
    heapConstructor = new VirtualConstructor(db);
    heapConstructor.addMapping("GenCollectedHeap", GenCollectedHeap.class);
    heapConstructor.addMapping("ParallelScavengeHeap", ParallelScavengeHeap.class);
    
    mainThreadGroupField = type.getOopField("_main_thread_group");
    systemThreadGroupField = type.getOopField("_system_thread_group");
    
    boolArrayKlassObjField = type.getOopField("_boolArrayKlassObj");
    byteArrayKlassObjField = type.getOopField("_byteArrayKlassObj");
    charArrayKlassObjField = type.getOopField("_charArrayKlassObj");
    intArrayKlassObjField = type.getOopField("_intArrayKlassObj");
    shortArrayKlassObjField = type.getOopField("_shortArrayKlassObj");
    longArrayKlassObjField = type.getOopField("_longArrayKlassObj");
    singleArrayKlassObjField = type.getOopField("_singleArrayKlassObj");
    doubleArrayKlassObjField = type.getOopField("_doubleArrayKlassObj");
    
    systemObjArrayKlassObjField = type.getOopField("_systemObjArrayKlassObj");
    
    narrowOopBaseField = type.getAddressField("_narrow_oop._base");
    narrowOopShiftField = type.getCIntegerField("_narrow_oop._shift");
  }
  
  public CollectedHeap heap()
  {
    try
    {
      return (CollectedHeap)heapConstructor.instantiateWrapperFor(collectedHeapField.getValue());
    }
    catch (WrongTypeException e) {}
    return new CollectedHeap(collectedHeapField.getValue());
  }
  
  public static long getNarrowOopBase()
  {
    if (narrowOopBaseField.getValue() == null) {
      return 0L;
    }
    return narrowOopBaseField.getValue().minus(null);
  }
  
  public static int getNarrowOopShift()
  {
    return (int)narrowOopShiftField.getValue();
  }
  
  public boolean isIn(Address p)
  {
    return heap().isIn(p);
  }
  
  public boolean isInReserved(Address p)
  {
    return heap().isInReserved(p);
  }
  
  private Oop newOop(OopHandle handle)
  {
    return VM.getVM().getObjectHeap().newOop(handle);
  }
  
  public Oop mainThreadGroup()
  {
    return newOop(mainThreadGroupField.getValue());
  }
  
  public Oop systemThreadGroup()
  {
    return newOop(systemThreadGroupField.getValue
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd