Package javax.tools.diagnostics.image

Examples of javax.tools.diagnostics.image.ImageThread


//      return (ImageStackFrame) defaultImageThread().getStackFrames().next();
//    } catch (DataUnavailable e) {
      // Try harder to find a thread with a stack.
      Iterator it = defaultImageProcess().getThreads().iterator();
      while (it.hasNext()) {
        ImageThread thread = (ImageThread) it.next();
        try {
          if (thread.getStackFrames().isEmpty()==false) {
            return (ImageStackFrame) thread.getStackFrames().get(0);
          }
        } catch (DataUnavailable e1) {
          // Ignore
        }
      }
View Full Code Here


    Iterator it = defaultImageProcess().getThreads().iterator();
   
    assertNotNull(it);
    assertTrue(it.hasNext());
   
    ImageThread thread = null;
    while (null == thread && it.hasNext()) {
      Object next = it.next();
      if (next instanceof CorruptData)
        continue;
      thread = (ImageThread) next;
View Full Code Here

    {
      ImageAddressSpace ias = (ImageAddressSpace)properties.get("current_address_space");
      String id;
     
      try {
        ImageThread it = ias.getCurrentProcess().getCurrentThread();
        if (null != it)
          id = it.getID();
        else
        {
          out.print("\n\tNo current (failing) thread, try specifying a native thread ID or '*'\n");
         
          ImageProcess ip = ias.getCurrentProcess();
View Full Code Here

  }
 
  private boolean printThreadInfo(ImageProcess ip, Output out, String id, Map threads)
  {
    Iterator itThread;
    ImageThread it;
    boolean found = false;
   
    itThread = ip.getThreads().iterator();
    while (itThread.hasNext())
    {
      Object next = itThread.next();
      if (next instanceof CorruptData) {
        continue;
      }
      it = (ImageThread)next;
      String currID;
     
      try {
        currID = it.getID();
      } catch (CorruptDataException e) {
        currID = null;
      }
     
      if (null == id || id.equals(currID))
      {
        out.print("\t  thread id: ");
        out.print(currID);
        out.print("\n");
        printRegisters(it);
       
        out.print("\t   stack sections:");
        out.print("\n");
       
        Iterator itStackSection = it.getStackSections().iterator();
        while (itStackSection.hasNext()) {
          Object nextStackSection = itStackSection.next();
          if (nextStackSection instanceof CorruptData) {
            out.print("\t    " + Exceptions.getCorruptDataExceptionString() + "\n");
            continue;
View Full Code Here

        while (itThread.hasNext()) {
          JavaThread jt = (JavaThread)itThread.next();
          String currID;

          try {
            ImageThread it = jt.getImageThread()
            currID = it.getID();
          } catch (DiagnosticException e) {
            currID = null;
          }
         
          if (null == id) {
View Full Code Here

     
    while (itThread.hasNext()) {
      Object next = itThread.next();
      if (next instanceof CorruptData)
            continue;
      ImageThread it = (ImageThread)next;
     
      if (count % 8 == 0) {
        if (0 == count)
          out.print("\n\n\tNative thread IDs for current process:");
        out.print("\n\t ");
      }
     
      try {
        out.print(Utils.padWithSpaces(it.getID(), 8));
      } catch (CorruptDataException e) {
        out.print(Exceptions.getCorruptDataExceptionString());
      }
      count++;
    }
View Full Code Here

    while (itThread.hasNext())
    {
      Object next = itThread.next();
      if (next instanceof CorruptData)
            continue;
      ImageThread it = (ImageThread)next;

      try {
        String threadID = it.getID();
        if (threadID != null) {
          if (lineLength + threadID.length() > 80) {
            out.print("\n\t  ");
            lineLength = 10;
          }
          out.print(it.getID() + " ");
          lineLength += threadID.length() + 1;
        }
      } catch (CorruptDataException e) {
        out.print(Exceptions.getCorruptDataExceptionString());
      }
View Full Code Here

TOP

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

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.