Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.LineAnnotation


    return result;
  }
 
  private void checkLine(Map<Integer, LineAnnotation> result, int index, String annotation, Color colour)
  {
    LineAnnotation line = result.get(index);

    assertNotNull(line);
       
    assertTrue(line.getAnnotation().contains(annotation));
    assertEquals(colour, line.getColour());
  }
View Full Code Here


   
    String unhighlightedStyle = STYLE_UNHIGHLIGHTED;
   
    if (annotations != null)
    {
      LineAnnotation annotation = annotations.get(offset);

      if (annotation != null)
      {           
        Color colour = annotation.getColour();

        unhighlightedStyle = STYLE_UNHIGHLIGHTED + "-fx-text-fill:" + toRGBCode(colour) + C_SEMICOLON;

        instructionToolTipBuilder = new StringBuilder();
        instructionToolTipBuilder.append(annotation.getAnnotation());
      }
    }
   
    lblLine.setUnhighlightedStyle(unhighlightedStyle);
   
View Full Code Here

          }

          String reason = tagAttrs.get(ATTR_REASON);
          String annotationText = InlineUtil.buildInlineAnnotationText(true, reason, callAttrs, methodAttrs);

          result.put(currentBytecode, new LineAnnotation(annotationText, Color.GREEN));
        }
      }
        break;
      case TAG_INLINE_FAIL:
      {
        if (inMethod || isC2)
        {
          if (!sanityCheckInline(currentInstruction))
          {
            throw new AnnotationException("Expected an invoke instruction (in INLINE_FAIL)", currentBytecode,
                currentInstruction);
          }

          String reason = tagAttrs.get(ATTR_REASON);
          String annotationText = InlineUtil.buildInlineAnnotationText(false, reason, callAttrs, methodAttrs);

          result.put(currentBytecode, new LineAnnotation(annotationText, Color.RED));
        }
      }
        break;
      case TAG_BRANCH:
      {
        if (!result.containsKey(currentBytecode))
        {
          if (inMethod || isC2)
          {
            if (!sanityCheckBranch(currentInstruction))
            {
              throw new AnnotationException("Expected a branch instruction (in BRANCH)", currentBytecode,
                  currentInstruction);
            }

            String branchAnnotation = buildBranchAnnotation(tagAttrs);

            result.put(currentBytecode, new LineAnnotation(branchAnnotation, Color.BLUE));
          }
        }
      }
        break;
      case TAG_INTRINSIC:
      {
        if (inMethod || isC2)
        {
          if (!sanityCheckIntrinsic(currentInstruction))
          {
            for (BytecodeInstruction ins : instructions)
            {
              logger.info("! instruction: {}", ins);
            }

            throw new AnnotationException("Expected an invoke instruction (IN INTRINSIC)", currentBytecode,
                currentInstruction);
          }

          StringBuilder reason = new StringBuilder();
          reason.append("Intrinsic: ").append(tagAttrs.get(ATTR_ID));

          result.put(currentBytecode, new LineAnnotation(reason.toString(), Color.GREEN));
        }
      }
        break;
       
      case TAG_ELIMINATE_ALLOCATION:
View Full Code Here

TOP

Related Classes of org.adoptopenjdk.jitwatch.model.LineAnnotation

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.