Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Good Techniques of Tracing

I'd probably use !cflow(within(TraceAspect) && adviceexecution()), although
often you get better performance if you just use && !(execution(*
Object.*(..)) || call(* Object.*(..))), which matches toString and hashCode,
the two methods that typically trigger recursive tracing...

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Eric Bodden
Sent: Friday, July 13, 2007 7:10 AM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] Good Techniques of Tracing

Yes, because you have to use && !cflow(within(TraceAspect));

This is because your aspect necessarily calls other code int he
program, which is then in turn advised.

Eric

On 13/07/07, ramilani12 <ramilani@xxxxxxxxx> wrote:
> Hello Eric
>
> Imagine my System have a 300 Class if I want capture any execution or call
> method.
> Using this pointcut:
>
> pointcut traceMethods1():  execution(* *.*(..) ) || call(* *.*(..))
>     && !within(TraceAspect);
>
> The problem that will occur is Exception java.lang.SatckOverflow?
>
>
>
>
> On 7/13/07, Eric Bodden < eric.bodden@xxxxxxxxxxxxxx> wrote:
> > Actually, I think as an alternative, you can also just import the
> > type. That should work, too.
> >
> > Eric
> >
> > On 12/07/07, Eric Bodden <eric.bodden@xxxxxxxxxxxxxx> wrote:
> > > Oh, right. That is indeed really subtle. AspectJ assumes a fully
> > > qualified type if you do not use any wildcards. That's really subtle.
> > > (Add negation using "!" and you get completely lost ;-).) You can
> > > match any package using *.. as in:
> > >
> > > call(* *..ArquivoTcs.*(..))
> > >
> > > Eric
> > >
> > > On 12/07/07, ramilani12 <ramilani@xxxxxxxxx> wrote:
> > > > Hello Guys
> > > > I fixed my problem , this skill:
> > > >
> > > > pointcut traceMethods():  execution(* escala.engine.ArquivoTcs.*(..)
)
> ||
> > > > call(* escala.engine.ArquivoTcs.*(..))
> > > >     && !within(TraceAspect);
> > > >
> > > > before(): traceMethods()
> > > >     {
> > > >         if ( log.isEnabledFor(Level.INFO) )
> > > >         {
> > > >             Signature sig =
> > > > thisJoinPointStaticPart.getSignature();
> > > >             log.log (Level.INFO , "Entering [
> > > > "+sig.getDeclaringType().getName()+" .
> > > > "+sig.getName()+"]");
> > > >         }
> > > >     }
> > > >
> > > > I need specify which package and sub package which the Class it
> belongs
> > > > Why that? , what´s difference between specify package and sub
package
> and
> > > > don´t specify package and sub package?
> > > >  I don´t understand?!
> > > > I use Eclipse 3.3 and last version AspectJ
> > > >
> > > >
> > > > Nice twist Eric about pointcut doctor , but bad only run on Eclipse
> 3.2 and
> > > > AJDT 1.4
> > > >
> > > >
> > > >
> > > > On 7/12/07, Eric Bodden < eric.bodden@xxxxxxxxxxxxxx> wrote:
> > > > > I agree that it looks like a totally useful feature. I think as
soon
> > > > > as this will get into AJDT, the traffic on this mailing list may
> > > > > decrease quite a bit. ;-)
> > > > >
> > > > > Eric
> > > > >
> > > > > On 12/07/07, Andy Clement < andrew.clement@xxxxxxxxx> wrote:
> > > > > > they have some small changes to the weaver that are open as bug
> > > > > > reports for us to address.
> > > > > >
> > > > > > On 12/07/07, Barry Kaplan < groups1@xxxxxxxxxxx> wrote:
> > > > > > > Sigh. I just saw that they /replace/ the aspectj-weaver, which
> will
> > > > > > > almost certainly mean using an old version. And also only ajdt
> 1.4 is
> > > > > > > supported. This is really too bad. Are there any plans to add
> this
> > > > > > > capability into the main aspectj product?
> > > > > > >
> > > > > > > -barry
> > > > > > >
> > > > > > > Barry Kaplan wrote:
> > > > > > > > Eric Bodden wrote:
> > > > > > > >> I can't see anything wrong with it. Is your setup correct?
> You
> > > > might
> > > > > > > >> want to try the pointcut doctor:
> > > > http://pointcutdoctor.cs.ubc.ca/
> > > > > > > >
> > > > > > > > Wow! pointcutdoctor is amazing. This plugin needs some
> marketing. I
> > > > > > > > have never gotten a hint of it before now.
> > > > > > > >
> > > > > > > > -barry
> > > > > > > >
> _______________________________________________
> > > > > > > > aspectj-users mailing list
> > > > > > > > aspectj-users@xxxxxxxxxxx
> > > > > > > >
> > > >
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > aspectj-users mailing list
> > > > > > > aspectj-users@xxxxxxxxxxx
> > > > > > >
> > > >
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > > > > >
> > > > > > _______________________________________________
> > > > > > aspectj-users mailing list
> > > > > > aspectj-users@xxxxxxxxxxx
> > > > > >
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Eric Bodden
> > > > > Sable Research Group
> > > > > McGill University, Montréal, Canada
> > > > > _______________________________________________
> > > > > aspectj-users mailing list
> > > > > aspectj-users@xxxxxxxxxxx
> > > > >
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > raphael milani
> > > > :=]
> > > > _______________________________________________
> > > > aspectj-users mailing list
> > > > aspectj-users@xxxxxxxxxxx
> > > >
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > >
> > > >
> > >
> > >
> > > --
> > > Eric Bodden
> > > Sable Research Group
> > > McGill University, Montréal, Canada
> > >
> >
> >
> > --
> > Eric Bodden
> > Sable Research Group
> > McGill University, Montréal, Canada
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
>
>
>
> --
> raphael milani
> :=]
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top