[abc-dev] About the initialization of thisJoinPoint

From: Isaac Yuen <isaac.yuen@mail.mcgill.ca>
Date: Wed Mar 29 2006 - 22:40:45 BST

Hi,

I am trying to do some optimization with the thisJoinPoint object, possibly trying to run some {inter/intra}procedural analysis to minimize the amount of initialization with makeJP (which I assume where the overhead comes from... is it correct?)

I have a test with 3 aspect: A, B, C, that are identical:

aspect {A|B|C} {

    declare precedence: A, B, C;

    public int numCall = 0;
    pointcut trace(Object obj) : (execution(* MyInteger+.*(..)))// || execution(MyInteger+.new(..)))
        && target(obj);

    Object around(Object obj) : trace(obj){
        System.out.println("(NA) Target class: "+obj.getClass());
        //System.out.println("(NA) Target class (through reflection): "+thisJoinPoint.getTarget().getClass());
        System.out.println("(NA) Join Point signature (through reflection)\t:");
    ...
}

The pointcuts intercept the MyInteger.add(int i) method...

I 've found some peculiarities in the jimple code.

Usual sequence of call is add() -> A.shadow -> MyInt.inline$1... -> B.shadow -> MyInt.inline$2 -> C.shadow -> MyInt.inline$3 ...

1) makeJP is called in *.shadow. However, is it necessary to put the inline code in MyInt.inline and have shadow call the inline code?

2) if I want to get rid of the inlined code and put them into the shadow (so that I can run an intraprocedural analysis in soot), what I can do?

3) although it's obvious that the pointcuts are identical, at each shadow call, a new thisJoinPoint object is initialized by the shadow method. Is it the case that I will get a new thisJointPoint at every shadow? Any case that it's not true?

4) How do you detect the different aspect and actually have the same pointcut and create the cascading calls according to the precedence?

Thanks,

Isaac
Received on Wed Mar 29 22:41:40 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 30 2006 - 01:40:05 BST