Package org.adoptopenjdk.jitwatch.optimizedvcall

Examples of org.adoptopenjdk.jitwatch.optimizedvcall.VirtualCallSite


  @Test
  public void testOptimizedVirtualCallRegex()
  {
    String valid = "; - FooClass::fooMethod@1 (line 42)";
    VirtualCallSite callSite = OptimizedVirtualCallFinder.buildCallSiteForLine(valid);

    assertNotNull(callSite);
    assertEquals("FooClass", callSite.getClassName());
    assertEquals("fooMethod", callSite.getMemberName());
    assertEquals(1, callSite.getBytecodeOffset());
    assertEquals(42, callSite.getSourceLine());
  }
View Full Code Here


  @Test
  public void testOptimizedVirtualCallRegexConstructor()
  {
    String valid = "; - FooClass::<init>@1 (line 42)";
    VirtualCallSite callSite = OptimizedVirtualCallFinder.buildCallSiteForLine(valid);

    assertNotNull(callSite);
    assertEquals("FooClass", callSite.getClassName());
    assertEquals("<init>", callSite.getMemberName());
    assertEquals(1, callSite.getBytecodeOffset());
    assertEquals(42, callSite.getSourceLine());
  }
View Full Code Here

  @Test
  public void testOptimizedVirtualCallRegexNegativeBCI()
  {
    String valid = "; - FooClass::foo@-1 (line 42)";
    VirtualCallSite callSite = OptimizedVirtualCallFinder.buildCallSiteForLine(valid);

    assertNotNull(callSite);
    assertEquals("FooClass", callSite.getClassName());
    assertEquals("foo", callSite.getMemberName());
    assertEquals(-1, callSite.getBytecodeOffset());
    assertEquals(42, callSite.getSourceLine());
  }
View Full Code Here

  @Test
  public void testOptimizedVirtualCallRegexInnerClass()
  {
    String valid = "; - FooClass$Inner::foo@-1 (line 42)";
    VirtualCallSite callSite = OptimizedVirtualCallFinder.buildCallSiteForLine(valid);

    assertNotNull(callSite);
    assertEquals("FooClass$Inner", callSite.getClassName());
    assertEquals("foo", callSite.getMemberName());
    assertEquals(-1, callSite.getBytecodeOffset());
    assertEquals(42, callSite.getSourceLine());
  }
View Full Code Here

    OptimizedVirtualCall vCall = OptimizedVirtualCallFinder.findOptimizedCall(null, ins);

    assertNotNull(vCall);

    VirtualCallSite caller = vCall.getCaller();
    VirtualCallSite callee = vCall.getCallee();

    assertEquals("FooClass", caller.getClassName());
    assertEquals("fooMethod", caller.getMemberName());
    assertEquals(11, caller.getBytecodeOffset());
    assertEquals(76, caller.getSourceLine());

    assertEquals("BarClass", callee.getClassName());
    assertEquals("barMethod", callee.getMemberName());
    assertEquals(22, callee.getBytecodeOffset());
    assertEquals(19, callee.getSourceLine());
  }
View Full Code Here

TOP

Related Classes of org.adoptopenjdk.jitwatch.optimizedvcall.VirtualCallSite

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.