Package javax.tools.diagnostics.image

Examples of javax.tools.diagnostics.image.ImageAddressSpace


    for(Object nextSpace : spaces) {     
      if(nextSpace instanceof CorruptData) {
        continue;
      }
     
      ImageAddressSpace space = (ImageAddressSpace) nextSpace;
     
      List processes = space.getProcesses();
     
      for (Object nextProcess : processes) {
       
        if (nextProcess instanceof CorruptData) {
          continue;
View Full Code Here


      out.print(Utils.toHex(currAddr));
      out.print(": ");
     
      while (itImageAddressSpace.hasNext() && !found)
      {
        ImageAddressSpace ias = (ImageAddressSpace)itImageAddressSpace.next();
        ImagePointer ip = ias.getPointer(currAddr);
       
        byte b = 0;
        short s = 0;
        int i = 0;
        long l = 0;
View Full Code Here

      out.error("invalid hex address specified; address must be specified as "
          + "\"0x<hex_address>\"");
      return;
    }
   
    ImageAddressSpace ias = (ImageAddressSpace)properties.get("current_address_space");
    int pointerSize = getIASPointerSize(ias);
    int unitSize;
   
    if (pointerSize > 32)
      unitSize = 8;
    else
      unitSize = 4;
   
    out.print("\n");
   
    for (int index = 0; index < numUnits; index++)
    {
      boolean found = false;
      long currAddr = address.longValue() + (index * unitSize);
      ImagePointer ip = ias.getPointer(currAddr);
     
      out.print("\t");
      out.print(Utils.toHex(currAddr));
      out.print("   ");

View Full Code Here

      out.print(Utils.toHex(currAddr));
      out.print(": ");
     
      while (itImageAddressSpace.hasNext() && !found)
      {
        ImageAddressSpace ias = (ImageAddressSpace)itImageAddressSpace.next();
        ImagePointer ip = ias.getPointer(currAddr);
       
        byte b = 0;
        short s = 0;
        int i = 0;
        long l = 0;
View Full Code Here

    Vector runtimes = new Vector();
    Iterator itAddressSpace;
    Iterator itProcess;
    Iterator itRuntime;
    ManagedRuntime mr;
    ImageAddressSpace ias;
    ImageProcess ip;
   
    itAddressSpace = loadedImage.getAddressSpaces().iterator();
    while (itAddressSpace.hasNext()) {
      ias = (ImageAddressSpace)itAddressSpace.next();
      itProcess = ias.getProcesses().iterator();
      while (itProcess.hasNext())
      {
        ip = (ImageProcess)itProcess.next();
        itRuntime = ip.getRuntimes().iterator();
        while (itRuntime.hasNext()) {
View Full Code Here

    return s;
  }
 
  public static ImageAddressSpace _extractAddressSpace(Image loadedImage)
  {
    ImageAddressSpace space = null;
    Iterator spaces = loadedImage.getAddressSpaces().iterator();
   
    while ((null == space) && (spaces.hasNext())) {
      space = (ImageAddressSpace) spaces.next();
    }
View Full Code Here

  public static Iterator getAddressSapceSectionInfo(Image loadedImage){
    Iterator itAddressSpace = loadedImage.getAddressSpaces().iterator();
    Vector vSections = new Vector();
    while(itAddressSpace.hasNext()){
      ImageAddressSpace imageAddressSpace = (ImageAddressSpace)itAddressSpace.next();
      Iterator iSections = imageAddressSpace.getImageSections().iterator();
      while(iSections.hasNext()){
        vSections.add(iSections.next());
      }
    }
    return vSections.iterator();
View Full Code Here

    _numberOfClasses = 0;
   
    Object verboseModeStr = properties.get("verbose.mode");
    _verbose = verboseModeStr != null ? verboseModeStr.equals("on") : false;
   
    ImageAddressSpace addressSpace = (ImageAddressSpace) properties.get("current_address_space");
   
    if(addressSpace == null) {
      out.error("Couldn't get handle on address space");
      return;
    }

    JavaRuntime runtime = getRuntime(addressSpace);
   
    if(runtime == null) {
      return;
    }
   
    if(! heapArgumentsAreValid(runtime,heapsToDump)) {
      return;
    }

    String version = getVersionString(runtime);

    boolean is64Bit = addressSpace.getCurrentProcess().getPointerSize() == 64;
    String filename = HeapDumpSettings.getFileName(properties);
    boolean phdFormat = HeapDumpSettings.areHeapDumpsPHD(properties);
   
    try {
      if(HeapDumpSettings.multipleHeapsInMultipleFiles(properties)) {
View Full Code Here

  }
 
  private void printAddressSpaceInfo(Image loadedImage, Output out)
  {
    Iterator itAddressSpace;
    ImageAddressSpace ias;
    int asnum = 0;
   
    itAddressSpace = loadedImage.getAddressSpaces().iterator();
    while (itAddressSpace.hasNext())
    {
      ias = (ImageAddressSpace)itAddressSpace.next();
      out.print("\taddress space # " + asnum + "\n");
     
      ImageProcess ip = ias.getCurrentProcess();
      if (ip == null)
      {
        out.print("\t(No current process in this address space)\n");
      }
      else
View Full Code Here

   */
  private JavaRuntime getJavaRuntime(Image loadedImage) {
   
    for(Object space:loadedImage.getAddressSpaces()) {
      if(space instanceof  ImageAddressSpace ) {
        ImageAddressSpace addr=(ImageAddressSpace) space;
        ImageProcess process=addr.getCurrentProcess();
        if(process!=null) {
          for(Object rt:process.getRuntimes()) {
            if(rt instanceof JavaRuntime) return (JavaRuntime) rt;
          }
        }
View Full Code Here

TOP

Related Classes of javax.tools.diagnostics.image.ImageAddressSpace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.