Package measurements.suites

Source Code of measurements.suites.JoinPointMeasurements1$TestException

// $Id: JoinPointMeasurements1.java,v 1.3 2008/11/18 10:41:01 anicoara Exp $
// ===============================================================

package measurements.suites;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

import junit.framework.Test;
import ch.ethz.inf.util.junit.PerformanceTest;
import ch.ethz.inf.util.junit.PerformanceTestSuite;
import ch.ethz.jvmai.*;

/**
* JoinPoint micro-measurements.
*
* Performance micro-measurements tests for method boundaries,
* fields accesses and modifications, exception handlers:
*
* 1) INVOKEVIRTUAL -> invoke a normal method
* 2) SYNC INVOKEVIRTUAL -> invoke a normal but synchronized method
* 3) INVOKEINTERFACE -> invoke a method through an interface
* 4) INVOKESPECIAL -> invoke a private method
* 5) INVOKESTATIC -> invoke a static method
* 6) GETFIELD -> used when a field has been read
* 7) PUTFIELD -> used when a field has been write
* 8) Exception Catch
* 9) Exception Throw
*
* Each test is executed "RUNS" times.
*
* @author Angela Nicoara
*/
public class JoinPointMeasurements1 extends PerformanceTest {

  public boolean useProse = false;
  public boolean checkAssert = true;

  protected JVMAspectInterface aspectInterface;
  protected TestHook hook;

  // INVOKEVIRTUAL
  public void localMethod() { }
  public void localMethodLongO(Object ob1, Object ob2) { }
  public void localMethodLongI(int ob1, int ob2) { }
  public void localMethodLongL(long ob1, long ob2) { }
  public void localMethodLongD(double ob1, double ob2) { }

  // INVOKESPECIAL
  private void privatelocalMethod() { }
  private void privatelocalMethodLongO(Object ob1, Object ob2) { }
  private void privatelocalMethodLongI(int ob1, int ob2) { }
  private void privatelocalMethodLongL(long ob1, long ob2) { }
  private void privatelocalMethodLongD(double ob1, double ob2) { }

  // INVOKEINTERFACE
  protected JoinPointTestInterface obInterface = new JoinPointTestClass();

  // SYNC INVOKEVIRTUAL
  protected JoinPointTestClass obSync = new JoinPointTestClass();

  public int theField = 0;

  // GETFIELD
  // In case of the advice weaver the field that is accessed or modified has to be in a method
  public void theFieldAccess(int runs) {
    int n = 0;

    startChronometer();
    for (int i = 0; i < RUNS; i++) n = this.theField;
    stopChronometer();
  }

  // PUTFIELD
  // In case of the advice weaver the field that is accessed or modified has to be in a method
  public void theFieldModification(int runs) {
    startChronometer();
    for (int i = 0; i < RUNS; i++) this.theField = i;
    stopChronometer();
  }

  // INVOKEVIRTUAL
  protected Method method;
  protected Method methodLongO;
  protected Method methodLongI;
  protected Method methodLongL;
  protected Method methodLongD;

  // SYNC INVOKEVIRTUAL
  protected Method syncMethod;
  protected Method syncMethodLongO;
  protected Method syncMethodLongI;
  protected Method syncMethodLongL;
  protected Method syncMethodLongD;

  // INVOKEINTERFACE
  protected Method interfaceMethod;
  protected Method interfaceMethodLongO;
  protected Method interfaceMethodLongI;
  protected Method interfaceMethodLongL;
  protected Method interfaceMethodLongD;

  // INVOKESTATIC
  protected Method staticMethod;
  protected Method staticMethodLongO;
  protected Method staticMethodLongI;
  protected Method staticMethodLongL;
  protected Method staticMethodLongD;

  // INVOKESPECIAL
  protected Method privateMethod;
  protected Method privateMethodLongO;
  protected Method privateMethodLongI;
  protected Method privateMethodLongL;
  protected Method privateMethodLongD;

  protected Field field;

  public class TestException extends Exception {};   
  public TestException exception = new TestException()

  public static int fieldAccessCount;
  public static int fieldModificationCount;
  public static int methodEntryCount;
  public static int methodExitCount;
  public static int exceptionThrowCount;
  public static int exceptionCatchCount;

  public static class TestHook extends JoinPointHook {
    public void onFieldAccess(FieldAccessJoinPoint joinPoint) { fieldAccessCount++; }
    public void onFieldModification(FieldModificationJoinPoint joinPoint) { fieldModificationCount++; }
    public void onMethodEntry(MethodEntryJoinPoint joinPoint) { methodEntryCount++; }
    public void onMethodExit(MethodExitJoinPoint joinPoint) { methodExitCount++; }
    public void onExceptionThrow(ExceptionJoinPoint joinPoint) { exceptionThrowCount++; }
    public void onExceptionCatch(ExceptionCatchJoinPoint joinPoint) { exceptionCatchCount++; }
    public void onClassLoad(Class cls) {}
    public void onConstructor(ConstructorJoinPoint joinPoint) { }
  }

  public JoinPointMeasurements1(String name) {
    super(name);
    RANGE = new int[] { 100000000 };

    String proseParam = System.getProperty("useprose");
    if (proseParam != null) useProse = true;
  }

  protected void setUp() throws Exception {
    if (useProse) {
      String providerName = System.getProperty("ch.ethz.prose.JVMAIProvider");
      Class providerClass = Class.forName(providerName);
      Provider provider = (Provider) providerClass.newInstance();

      aspectInterface = provider.getAspectInterface();
      aspectInterface.startup(null, true);

      hook = new TestHook();
      aspectInterface.setJoinPointHook(hook);

      // INVOKEVIRTUAL
      method = JoinPointMeasurements1.class.getDeclaredMethod("localMethod", new Class[] {});
      methodLongO = JoinPointMeasurements1.class.getDeclaredMethod("localMethodLongO", new Class[] {Object.class, Object.class});
      methodLongI = JoinPointMeasurements1.class.getDeclaredMethod("localMethodLongI", new Class[] {Integer.TYPE, Integer.TYPE});
      methodLongL = JoinPointMeasurements1.class.getDeclaredMethod("localMethodLongL", new Class[] {Long.TYPE, Long.TYPE});
      methodLongD = JoinPointMeasurements1.class.getDeclaredMethod("localMethodLongD", new Class[] {Double.TYPE, Double.TYPE});

      // SYNC INVOKEVIRTUAL
      syncMethod = JoinPointTestClass.class.getDeclaredMethod("syncMethodShort", new Class[] {});
      syncMethodLongO = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongO", new Class[] {Object.class, Object.class});
      syncMethodLongI = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongI", new Class[] {Integer.TYPE, Integer.TYPE});
      syncMethodLongL = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongL", new Class[] {Long.TYPE, Long.TYPE});
      syncMethodLongD = JoinPointTestClass.class.getDeclaredMethod("syncMethodLongD", new Class[] {Double.TYPE, Double.TYPE});

      // INVOKEINTERFACE
      interfaceMethod = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodShort", new Class[] {});
      interfaceMethodLongO = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongO", new Class[] {Object.class, Object.class});
      interfaceMethodLongI = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongI", new Class[] {Integer.TYPE, Integer.TYPE});
      interfaceMethodLongL = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongL", new Class[] {Long.TYPE, Long.TYPE});
      interfaceMethodLongD = JoinPointTestClass.class.getDeclaredMethod("interfaceMethodLongD", new Class[] {Double.TYPE, Double.TYPE});

      // INVOKESTATIC
      staticMethod = JoinPointTestClass.class.getDeclaredMethod("staticMethodShort", new Class[] {});
      staticMethodLongO = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongO", new Class[] {Object.class, Object.class});
      staticMethodLongI = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongI", new Class[] {Integer.TYPE, Integer.TYPE});
      staticMethodLongL = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongL", new Class[] {Long.TYPE, Long.TYPE});
      staticMethodLongD = JoinPointTestClass.class.getDeclaredMethod("staticMethodLongD", new Class[] {Double.TYPE, Double.TYPE});

      // INVOKESPECIAL
      privateMethod = JoinPointMeasurements1.class.getDeclaredMethod("privatelocalMethod", new Class[] {});
      privateMethodLongO = JoinPointMeasurements1.class.getDeclaredMethod("privatelocalMethodLongO", new Class[] {Object.class, Object.class});
      privateMethodLongI = JoinPointMeasurements1.class.getDeclaredMethod("privatelocalMethodLongI", new Class[] {Integer.TYPE, Integer.TYPE});
      privateMethodLongL = JoinPointMeasurements1.class.getDeclaredMethod("privatelocalMethodLongL", new Class[] {Long.TYPE, Long.TYPE});
      privateMethodLongD = JoinPointMeasurements1.class.getDeclaredMethod("privatelocalMethodLongD", new Class[] {Double.TYPE, Double.TYPE});

      field = JoinPointMeasurements1.class.getDeclaredField("theField");
    }

    fieldAccessCount = 0;
    fieldModificationCount = 0;
    methodEntryCount = 0;
    methodExitCount = 0;
    exceptionThrowCount = 0;
    exceptionCatchCount = 0;
  }

  protected void tearDown() {
    if (useProse) aspectInterface.teardown();
  }

  //=====================================================

  // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testVirtualMethod_no_jp_NoArg() {
    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethod();
    stopChronometer();
  }

  // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
  public void testVirtualMethodEntry_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread())//suspend all the events(notifications) before the watch(es) has been set
      aspectInterface.setMethodEntryWatch(method, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());    //advice weaving: all the joinpoints are activated atomically
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethod();
    stopChronometer();
  }

  // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
  public void testVirtualMethodExit_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(method, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethod();
    stopChronometer();
  }

  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodEntry_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(method, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethod();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodExit_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(method, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethod();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testSyncVirtualMethod_no_jp_NoArg() {
    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
    stopChronometer();
  }

  // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
  public void testSyncVirtualMethodEntry_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread())//suspend all the events(notifications) before the watch(es) has been set
      aspectInterface.setMethodEntryWatch(syncMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());    //advice weaving: all the joinpoints are activated atomically
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
    stopChronometer();
  }

  // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
  public void testSyncVirtualMethodExit_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(syncMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
    stopChronometer();
  }

  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodEntry_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(syncMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodExit_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(syncMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodShort();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
  public void testInterfaceMethod_no_jp_NoArg() {
    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
    stopChronometer();
  }

  // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
  public void testInterfaceMethodEntry_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(interfaceMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
    stopChronometer();
  }

  // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
  public void testInterfaceMethodExit_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(interfaceMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
    stopChronometer();
  }

  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodEntry_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(interfaceMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodExit_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(interfaceMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodShort();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
  public void testStaticMethod_no_jp_NoArg() {
    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
    stopChronometer();
  }

  // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
  public void testStaticMethodEntry_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(staticMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
    stopChronometer();
  }

  // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
  public void testStaticMethodExit_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(staticMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
    stopChronometer();
  }

  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodEntry_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(staticMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodExit_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(staticMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodShort();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
  public void testSpecialMethod_no_jp_NoArg() {
    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethod();
    stopChronometer();
  }

  // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
  public void testSpecialMethodEntry_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(privateMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethod();
    stopChronometer();
  }

  // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
  public void testSpecialMethodExit_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(privateMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethod();
    stopChronometer();
  }

  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodEntry_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(privateMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethod();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodExit_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(privateMethod, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethod();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) GETFIELD - no call to weaver because the joinpoint isn't activated
  public void testFieldAccess_no_jp_NoArg() {
    this.theFieldAccess(RUNS);
  }

  // 2) GETFIELD - no call to weaver because joinpoint is activated but locked
  public void testFieldAccess_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setFieldAccessWatch(field, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    this.theFieldAccess(RUNS);
  }

  // 3) GETFIELD - call to empty weaver because of on active, unlocked joinpoint
  public void testFieldAccess_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setFieldAccessWatch(field, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    this.theFieldAccess(RUNS);

    if (checkAssert) assertEquals("Hook notifications", RUNS, fieldAccessCount);
  }

  //=====================================================

  // 1) PUTFIELD - no call to weaver because the joinpoint isn't activated
  public void testFieldModification_no_jp_NoArg() {
    this.theFieldModification(RUNS);
  }

  // 2) PUTFIELD - no call to weaver because joinpoint is activated but locked
  public void testFieldModification_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setFieldModificationWatch(field, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    this.theFieldModification(RUNS);
  }

  // 3) PUTFIELD - call to empty weaver because of on active, unlocked joinpoint
  public void testFieldModification_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setFieldModificationWatch(field, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    this.theFieldModification(RUNS);

    if (checkAssert) assertEquals("Hook notifications", RUNS, fieldModificationCount);
  }

  //=====================================================

  public void exceptionThrow() throws TestException {
    throw exception;
  }

  public void exceptionCatch() {
    try {
      exceptionThrow();
    } catch (TestException e) {}
  }   

  //=====================================================

  // 1) THROW - no call to weaver because the joinpoint isn't activated
  public void testExceptionThrow_no_jp_NoArg() {
    //RUNS = 1000000;
    TestException e = new TestException();

    startChronometer();
    for (int i = 0; i < RUNS; i++) exceptionCatch();
    stopChronometer()
  }

  // 2) THROW - no call to weaver because joinpoint is activated but locked
  public void testExceptionThrow_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setExceptionThrowWatch(TestException.class, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    //RUNS = 1000000;
    TestException e = new TestException();

    startChronometer();
    for (int i = 0; i < RUNS; i++) exceptionCatch();
    stopChronometer();
  }

  // 3) THROW - call to empty weaver because of on active, unlocked joinpoint
  public void testExceptionThrow_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setExceptionThrowWatch(TestException.class, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    //RUNS = 1000000;
    TestException e = new TestException();

    startChronometer();
    for (int i = 0; i < RUNS; i++) exceptionCatch();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, exceptionThrowCount);
  }

  //=====================================================

  // 1) CATCH - no call to weaver because the joinpoint isn't activated
  public void testExceptionCatch_no_jp_NoArg() {
    //RUNS = 1000000;
    TestException e = new TestException();

    startChronometer();
    for (int i = 0; i < RUNS; i++) exceptionCatch();
    stopChronometer()
  }

  // 2) CATCH - no call to weaver because joinpoint is activated but locked
  public void testExceptionCatch_jp_activated_locked_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setExceptionCatchWatch(TestException.class, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
      aspectInterface.suspendNotification(Thread.currentThread());
    }

    //RUNS = 1000000;
    TestException e = new TestException();

    startChronometer();
    for (int i = 0; i < RUNS; i++) exceptionCatch();
    stopChronometer();
  }

  // 3) CATCH - call to empty weaver because of on active, unlocked joinpoint
  public void testExceptionCatch_jp_activated_NoArg() {
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setExceptionCatchWatch(TestException.class, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    //RUNS = 1000000;
    TestException e = new TestException();

    startChronometer();
    for (int i = 0; i < RUNS; i++) exceptionCatch();
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, exceptionCatchCount);
  }


  //=====================================================
  //=====================================================
  //=====================================================
  //=====================================================
  //=====================================================

  // Method arguments: (Object, Object)
  //=====================================================

  // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testVirtualMethod_LongO() {
    Object obj = new Object();
    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodEntry_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(methodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodExit_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(methodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodEntry_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(methodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodExit_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(methodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testSyncVirtualMethod_LongO() {
    Object obj = new Object();
    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
    stopChronometer();
  }
  /*
    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodEntry_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(syncMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
      stopChronometer();
    }

    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodExit_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(syncMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
      stopChronometer();
    }
   */
  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodEntry_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(syncMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodExit_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(syncMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
  public void testInterfaceMethod_LongO() {
    Object obj = new Object();
    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodEntry_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(interfaceMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodExit_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(interfaceMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
      stopChronometer();
    }
   */
  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodEntry_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(interfaceMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodExit_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(interfaceMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
  public void testStaticMethod_LongO() {
    Object obj = new Object();
    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodEntry_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(staticMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodExit_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(staticMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodEntry_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(staticMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodExit_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(staticMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
  public void testSpecialMethod_LongO() {
    Object obj = new Object();
    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodEntry_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(privateMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodExit_jp_activated_locked_LongO() {
      Object obj = new Object();
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(privateMethodLongO, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodEntry_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(privateMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodExit_jp_activated_LongO() {
    Object obj = new Object();
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(privateMethodLongO, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongO(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================
  //=====================================================


  // Method arguments: (int, int)
  //=====================================================

  // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testVirtualMethod_LongI() {
    int obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodEntry_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(methodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodExit_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(methodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodEntry_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(methodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodExit_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(methodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testSyncVirtualMethod_LongI() {
    int obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodEntry_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(syncMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
      stopChronometer();
    }

    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodExit_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(syncMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
      stopChronometer();
    }
   */   
  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodEntry_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(syncMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodExit_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(syncMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
  public void testInterfaceMethod_LongI() {
    int obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodEntry_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(interfaceMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodExit_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread()); 
        aspectInterface.setMethodExitWatch(interfaceMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodEntry_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(interfaceMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodExit_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(interfaceMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
  public void testStaticMethod_LongI() {
    int obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodEntry_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(staticMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodExit_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(staticMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodEntry_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(staticMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodExit_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(staticMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
  public void testSpecialMethod_LongI() {
    int obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodEntry_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(privateMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodExit_jp_activated_locked_LongI() {
      int obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(privateMethodLongI, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodEntry_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(privateMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodExit_jp_activated_LongI() {
    int obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(privateMethodLongI, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongI(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================
  //=====================================================   


  // Method arguments: (long, long)
  //=====================================================

  // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testVirtualMethod_LongL() {
    long obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodEntry_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(methodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodExit_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(methodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodEntry_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(methodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodExit_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(methodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testSyncVirtualMethod_LongL() {
    long obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodEntry_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(syncMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
      stopChronometer();
    }

    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodExit_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(syncMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
      stopChronometer();
    }
   */   
  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodEntry_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(syncMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodExit_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(syncMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
  public void testInterfaceMethod_LongL() {
    long obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodEntry_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(interfaceMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodExit_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(interfaceMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodEntry_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(interfaceMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodExit_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(interfaceMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
  public void testStaticMethod_LongL() {
    long obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodEntry_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(staticMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodExit_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(staticMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodEntry_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(staticMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodExit_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(staticMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
  public void testSpecialMethod_LongL() {
    long obj = 1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodEntry_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(privateMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodExit_jp_activated_locked_LongL() {
      long obj = 1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(privateMethodLongL, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodEntry_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(privateMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodExit_jp_activated_LongL() {
    long obj = 1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(privateMethodLongL, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongL(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================
  //=====================================================   


  // Method arguments: (double, double)
  //=====================================================

  // 1) INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testVirtualMethod_LongD() {
    double obj = 10.1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodEntry_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(methodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testVirtualMethodExit_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(methodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodEntry_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(methodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testVirtualMethodExit_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(methodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) localMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }


  //=====================================================

  // 1) SYNC INVOKEVIRTUAL - no call to weaver because the joinpoint isn't activated
  public void testSyncVirtualMethod_LongD() {
    double obj = 10.1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodEntry_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(syncMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
      stopChronometer();
    }

    // 2) SYNC INVOKEVIRTUAL - no call to weaver because joinpoint is activated but locked
    public void testSyncVirtualMethodExit_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(syncMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
      stopChronometer();
    }
   */   
  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodEntry_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(syncMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) SYNC INVOKEVIRTUAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSyncVirtualMethodExit_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(syncMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obSync.syncMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKEINTERFACE - no call to weaver because the joinpoint isn't activated
  public void testInterfaceMethod_LongD() {
    double obj = 10.1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodEntry_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(interfaceMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
      stopChronometer();
    }

    // 2) INVOKEINTERFACE - no call to weaver because joinpoint is activated but locked
    public void testInterfaceMethodExit_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(interfaceMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodEntry_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(interfaceMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKEINTERFACE - call to empty weaver because of on active, unlocked joinpoint
  public void testInterfaceMethodExit_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(interfaceMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) obInterface.interfaceMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESTATIC - no call to weaver because the joinpoint isn't activated
  public void testStaticMethod_LongD() {
    double obj = 10.1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodEntry_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(staticMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESTATIC - no call to weaver because joinpoint is activated but locked
    public void testStaticMethodExit_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(staticMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodEntry_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(staticMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESTATIC - call to empty weaver because of on active, unlocked joinpoint
  public void testStaticMethodExit_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(staticMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) JoinPointTestClass.staticMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================

  // 1) INVOKESPECIAL - no call to weaver because the joinpoint isn't activated
  public void testSpecialMethod_LongD() {
    double obj = 10.1;
    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
    stopChronometer();
  }
  /*   
    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodEntry_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodEntryWatch(privateMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
      stopChronometer();
    }

    // 2) INVOKESPECIAL - no call to weaver because joinpoint is activated but locked
    public void testSpecialMethodExit_jp_activated_locked_LongD() {
      double obj = 10.1;
      if (useProse) {
        aspectInterface.suspendNotification(Thread.currentThread());
        aspectInterface.setMethodExitWatch(privateMethodLongD, new Object());
        aspectInterface.resumeNotification(Thread.currentThread());
        aspectInterface.suspendNotification(Thread.currentThread());
      }

      startChronometer();
      for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
      stopChronometer();
    }
   */   
  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodEntry_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodEntryWatch(privateMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodEntryCount);
  }

  // 3) INVOKESPECIAL - call to empty weaver because of on active, unlocked joinpoint
  public void testSpecialMethodExit_jp_activated_LongD() {
    double obj = 10.1;
    if (useProse) {
      aspectInterface.suspendNotification(Thread.currentThread());
      aspectInterface.setMethodExitWatch(privateMethodLongD, new Object());
      aspectInterface.resumeNotification(Thread.currentThread());
    }

    startChronometer();
    for (int i = 0; i < RUNS; i++) privatelocalMethodLongD(obj, obj);
    stopChronometer();

    if (checkAssert) assertEquals("Hook notifications", RUNS, methodExitCount);
  }

  //=====================================================
  //=====================================================   

  public static Test suite() {
    return new PerformanceTestSuite(JoinPointMeasurements1.class);
  }

}
TOP

Related Classes of measurements.suites.JoinPointMeasurements1$TestException

TOP
Copyright © 2018 www.massapi.com. 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.
//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-20639858-1', 'auto'); ga('send', 'pageview');