Frequently Asked Questions (FAQ)

 
  1. 1)Isn’t a source distribution of the tools? :
    No, currently we distribute only a binary snapshot. However, we provide some sources of aspect samples. We are working on a open source release.

  2. 2)Can I use arbitrary aspects with MAJOR or CARAJillo ?:
    We support standard singleton aspect instances (the most common). We do not fully support per-* and Inter Type Declarations (ITD). Please check our PPPJ’08 paper for more details. 
    Note also that some restrictions are related to the JVM that is used, e.g. Sun’s JVM does not allow to add a field to java.lang.Object with ITD, whereas IBM J9’s does.


  3. 3)I modified the sample aspects, and now the JVM crashes or I have an StackOverflowException. What could be the reason?
    Check if you added new classes in the aspect, and make sure that you use correctly !within(..) to cover also these classes.
    If you changed the definition of the pointcuts, or added/removed advices, you have to weave the JDK again. You do not need to re-weave the JDK if you only modified the body of advices.
    If you added new advices, make sure that you correctly used the DIB (see next question). If you’re running a CARAJillo enabled aspect (using -c option), make sure that use this option in both ‘first’ and ‘major’. 

  4. 4)What is the DIB?
    The DIB is a FERRARI mechanism to temporarily disable the execution of instrumented (woven) code. This avoids infinite recursion when invoking woven code (typically woven JDK) from advices. The sample aspects include explicit usage of the DIB. We will release in next release the tool that automatically adds DIB to aspects.

  5. 5)How can I be sure that I’m running a woven JDK?
    The simplest way is to use ‘javap’ to disassemble the woven JDK. You will find invocations to the aspect’s aspectOf() and invocations to advices. You can try the exec-tracer sample to see that invocations are really captured within the JDK.

  6. 6)Can I use the the tools with Jikes?
    Currently not.

  7. 7) Which JVMs are supported?
    We tested several Sun’s JDK and OpenJDK (JDK 1.5, 1.6, 1.7) under Linux, Windows (cygwin) and MacOSX. IBM’s J9 is was also tested under Linux, but not yet released. Apple’s JDK is not fully supported (only soylatte port for MacOSX is supported).

  8. 8) Do I have to weave the JDK each time that I modify an aspect?
    It depends. You must weave the JDK only if you modified the pointcut definitions, and added/removed advices. If you only changed the advice body, you only have to recompile the aspect. Note that if your original aspect didn’t used ‘thisJoinPoint’, ‘thisJoinPointStaticPart’ and you introduce them on advices, you must weave the JDK. Notice that CARAJillo enabled aspects use configurable runtime, therefore you must (at least once) run ‘first’ with the -rt option to create the correct runtime.

  9. 9) How can I compile only the aspect, and how can I reweave all the JDK?
    To compile the aspect only use:
       first -a <aspect_name>
    To weave all the JDK use:
       first -a <aspect_name> -jdk

  10. 10) Does AJ-UDI works with ‘abc’?
    Currently not, but this is ongoing effort.

FERRARI, MAJOR, CARAJILLO