Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.JITDataModel


        "<code_cache nmethods='124' free_code_cache='250227008' adapters='142' total_blobs='349' stamp='13.088'/>",
        "<task_done inlined_bytes='142' success='1' count='1' backedge_count='100000' stamp='13.173' nmsize='3624'/>",
        "</task>"
    };
   
    JITDataModel testModel = new JITDataModel();
    String fqClassName = "org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog";
    String methodName = "testCallChain3";
   
    try
    {
      testModel.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(fqClassName));
     
      String fqClassNameSB = "java.lang.AbstractStringBuilder";
      testModel.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(fqClassNameSB));
    }
    catch (ClassNotFoundException cnfe)
    {     
      fail();
    }

    MetaClass metaClass = testModel.getPackageManager().getMetaClass(fqClassName);
   
    MemberSignatureParts msp = MemberSignatureParts.fromLogCompilationSignature("org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog " + methodName + " ()V");
   
    IMetaMember testMember = metaClass.getMemberFromSignature(msp);
View Full Code Here


        "<code_cache total_blobs='255' nmethods='75' adapters='134' free_code_cache='49824384' largest_free_block='49810304'/>",
        "<task_done success='1' nmsize='800' count='10000' backedge_count='5317' inlined_bytes='79' stamp='11.662'/>",
        "</task>"   
    };

    JITDataModel testModel = new JITDataModel();

    String methodName = "testCallChain";
    String fqClassName = "org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog";

    try
    {
      testModel.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(fqClassName));

      String fqClassNameSB = "java.lang.AbstractStringBuilder";
      testModel.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(fqClassNameSB));
    }
    catch (ClassNotFoundException cnfe)
    {
      fail();
    }

    MetaClass metaClass = testModel.getPackageManager().getMetaClass(fqClassName);
    IMetaMember testMember = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(fqClassName, methodName, "void", new String[] { "long" }));

    assertNotNull(testMember);
   
    CompileNode root = buildCompileNodeForXML(lines, testMember, testModel);
View Full Code Here

        "<dependency type='unique_concrete_method' ctxk='747' x='819'/>",
        "<code_cache total_blobs='263' nmethods='73' adapters='142' free_code_cache='49731968'/>",
        "<task_done success='1' nmsize='800' count='10000' backedge_count='5317' inlined_bytes='79' stamp='11.194'/>",
        "</task>" };

    JITDataModel testModel = new JITDataModel();

    String methodName = "testCallChain";
    String fqClassName = "org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog";

    try
    {
      testModel.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(fqClassName));

      String fqClassNameSB = "java.lang.AbstractStringBuilder";
      testModel.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(fqClassNameSB));
    }
    catch (ClassNotFoundException cnfe)
    {
      fail();
    }

    MetaClass metaClass = testModel.getPackageManager().getMetaClass(fqClassName);
    IMetaMember testMember = metaClass.getMemberFromSignature(MemberSignatureParts.fromParts(fqClassName, methodName, "void", new String[] { "long" }));

    assertNotNull(testMember);
   
    CompileNode root = buildCompileNodeForXML(lines, testMember, testModel);
View Full Code Here

  @Test
  public void testVarArgsInBytecodeSignatureMatches()
  {
    String coreClassWithVarArgs = getClass().getName();
       
    JITDataModel model = new JITDataModel();
   
    MetaClass metaClass = null;
   
    try
    {
      metaClass = model.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(coreClassWithVarArgs));
    }
    catch (ClassNotFoundException cnfe)
    {
      cnfe.printStackTrace();
      fail();
View Full Code Here

  @Test
  public void testMethodWithUnderscores()
  {
    String thisClass = getClass().getName();
       
    JITDataModel model = new JITDataModel();
   
    MetaClass metaClass = null;
   
    try
    {
      metaClass = model.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(thisClass));
    }
    catch (ClassNotFoundException cnfe)
    {
      cnfe.printStackTrace();
      fail();
View Full Code Here

  @Test
  public void testMethodWithInnerClassDollarSign()
  {
    String awtWindowClass = "java.awt.Window";
       
    JITDataModel model = new JITDataModel();
   
    MetaClass metaClass = null;
   
    try
    {
      metaClass = model.buildAndGetMetaClass(ClassUtil.loadClassWithoutInitialising(awtWindowClass));
    }
    catch (ClassNotFoundException cnfe)
    {
      cnfe.printStackTrace();
      fail();
View Full Code Here

  @Test
  public void testParseMemberFromBytecodeInvokeCommentConstructor() throws Exception
  {
    String comment1 = "java/lang/Object.\"<init>\":()V";

    JITDataModel model = new JITDataModel();

    model.buildAndGetMetaClass(Object.class);

    IMetaMember member1 = ParseUtil.getMemberFromComment(model, comment1);

    assertEquals("public java.lang.Object()", member1.toString());
  }
View Full Code Here

  @Test
  public void testParseMemberFromBytecodeInvokeCommentObjectReturn() throws Exception
  {
    String comment2 = "java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;";

    JITDataModel model = new JITDataModel();

    model.buildAndGetMetaClass(StringBuilder.class);

    IMetaMember member2 = ParseUtil.getMemberFromComment(model, comment2);

    assertEquals("public java.lang.StringBuilder java.lang.StringBuilder.append(int)", member2.toString());
  }
View Full Code Here

  @Test
  public void testParseMemberFromBytecodeInvokeCommentPrimitive() throws Exception
  {
    String comment3 = "org/adoptopenjdk/jitwatch/demo/MakeHotSpotLog.chainA1:(J)J";

    JITDataModel model = new JITDataModel();

    model.buildAndGetMetaClass(MakeHotSpotLog.class);

    IMetaMember member3 = ParseUtil.getMemberFromComment(model, comment3);

    assertEquals("private long org.adoptopenjdk.jitwatch.demo.MakeHotSpotLog.chainA1(long)", member3.toString());
  }
View Full Code Here

    assertEquals("uk.co.foo.bar.Anonymised$$Lambda$40", parts[0]);
    assertEquals("applyAsInt", parts[1]);
    assertEquals("Ljava.lang.Object;", parts[2]);
    assertEquals("I", parts[3]);

    JITDataModel model = new JITDataModel();

    try
    {
      ParseUtil.findMemberWithSignature(model, sig);
      fail();
View Full Code Here

TOP

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

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.