[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] after throwing problem

Ashley,

Can you share the snippet from your tracing aspect, especially the advice part? The cause for performance degradation of 10x is definitely something to look at. AspectJ shouldn't be adding much more than, say, 10% overhead regardless of the syntax used.

Thanks.

-Ramnivas

On Dec 3, 2007 5:26 AM, Ashley Williams <ashley.williams@xxxxxx> wrote:

Thanks for spending time on this. I've decided to exclusively use the language extentions
for now and avoid using annotations as markers. This strategy seems to be working really
well and my initial excitement with aspectj has now been rekindled.

My next task will be to capture some better performance metrics. The rudimentary metrics
I captured with the annotation style of development didn't look good: aspect tracing was
10 times slower than hardcoded tracing for a single method called a million times. I obviously
can't take this story to the team if I'm to persuade them to begin adoption of aspectj.

However my tracing implementation is a lot simpler now without the need for annotation markers
or pertypewithin facility. I will report back on my performance findings.

- Ashley

aspectj-users-bounces@xxxxxxxxxxx wrote on 01/12/2007 12:46:54:


> I have a workaround for now if you need it, change the order of the
> parameters in logException, from:
>
> public void logException(JoinPoint thisJoinPoint, Tracing tracing,
> Throwable t) {
>
> to
>
> public void logException(JoinPoint thisJoinPoint, Throwable t, Tracing
> tracing) {
>
> Andy.
>
> On 29/11/2007, Ashley Williams <ashley.williams@xxxxxx> wrote:
> >
> > Hi,
> >
> > Having converted my aspects to use the @AspectJ style, I'm now getting a
> > strange error message when a compile my tracing aspect,.
> > First here is the section of code:
> >
> >
> >         @Pointcut("execution(@Tracing * *(..)) && @annotation(tracing)")
> >         void annotatedMethods(Tracing tracing) {
> >         }
> >
> >         @AfterThrowing(pointcut = "annotatedMethods(tracing)", throwing =
> > "t")
> >         public void logException(JoinPoint thisJoinPoint, Tracing tracing,
> >                         Throwable t) {
> >                 Level level = Level.toLevel(tracing.level());
> >                 if (logger.isEnabledFor(level)) {
> >                         logger.log(level,
> > formatter.formatSignatureThrowing(thisJoinPoint),
> >                                         t);
> >                 }
> >         }
> >
> > So I am matching on all methods annotated with @Tracing and logging the
> > subclass of Throwable that may have been thrown.
> > However when I run my test case i get the following error:
> >
> > java.lang.VerifyError: (class: com/db/abfo/tracing/PojoOne, method:
> > calculate signature: ()V) catch_type not a subclass of Throwable
> >
> > This used to work when I used the aspectj after throwing language extention
> > form:
> >
> >
> >         pointcut annotatedMethods(Tracing tracing) : execution(@Tracing *
> > *(..)) && @annotation(tracing);
> >
> >         after(Tracing tracing) throwing(Throwable t) :
> > annotatedMethods(tracing) {
> >                 Level level = tracing.level().getLevel();
> >                 if (logger.isEnabledFor(level)) {
> >                         logger.log(level,
> > formatter.formatSignatureThrowing(thisJoinPoint),
> >                                         t);
> >                 }
> >         }
> >
> > Any ideas?
> > - Ashley
> >  ---
> >
> >  This e-mail may contain confidential and/or privileged information. If you
> > are not the intended recipient (or have received this e-mail in error)
> > please notify the sender immediately and delete this e-mail. Any
> > unauthorized copying, disclosure or distribution of the material in this
> > e-mail is strictly forbidden.
> >
> >  Please refer to
> > http://www.db.com/en/content/eu_disclosures.htm for
> > additional EU corporate and regulatory disclosures.
> >
> > _______________________________________________
> > 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

---

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users