Hi,
I am using AspectJ version 1.8.9 and I am using the following aspect to instrument classes in dacapo-benchmark (avrora).
import java.util.*;
aspect BaseAspect {
pointcut notwithin() :
!within(sun..*) &&
!within(java..*) &&
!within(javax..*) &&
!within(com.sun..*) &&
!within(org.apache.commons..*) &&
!within(org.apache.geronimo..*) &&
!within(net.sf.cglib..*);
}
public aspect UnionJoinPointsAspect {
pointcut MOP_CommonPointCut() : !adviceexecution() && BaseAspect.notwithin();
pointcut SafeSyncMap_syncCreateIter(Set mapSet) : (call(* Collection+.iterator()) && target(mapSet)) && MOP_CommonPointCut();
after (Set mapSet) returning (Iterator iter) : SafeSyncMap_syncCreateIter(mapSet) {
System.out.println(thisEnclosingJoinPointStaticPart.toString());
}
}
When dumping with AspectJ weaver using (<dump> with beforeandafter options in aop-ajc.xml). I could see the class being instrumented e.g. avrora.sim.radio.Medium$BasicArbitrator and the aspect is woven in method
mergeTransmissions(avrora.sim.radio.Medium$Receiver, java.util.List, long, int) but advice code (which is the reflective information) cannot be seen in the output, which only shows the following:-
===== DaCapo 9.12 avrora starting =====
execution(boolean org.dacapo.harness.Benchmark.validate(String))
===== DaCapo 9.12 avrora PASSED in 1874 msec =====
execution(void org.dacapo.harness.Benchmark.postIterationCleanup(String))
Regards,
Omar