From: mwebster Date: Wed, 4 Oct 2006 14:41:49 +0000 (+0000) Subject: Trace loader parent and class lookup X-Git-Tag: BEFORE_133532~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=81427c39398b2134bffa5485adc0defaee7db607;p=aspectj.git Trace loader parent and class lookup --- diff --git a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java index f7afb1c6f..2f775a0b1 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/Aj.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/Aj.java @@ -64,7 +64,8 @@ public class Aj implements ClassPreProcessor { return bytes; } - if (trace.isTraceEnabled()) trace.enter("preProcess",this,new Object[] {className, bytes, loader, Thread.currentThread().getContextClassLoader()}); + if (trace.isTraceEnabled()) trace.enter("preProcess",this,new Object[] {className, bytes, loader}); + if (trace.isTraceEnabled()) trace.event("preProcess",this,new Object[] {loader.getParent(), Thread.currentThread().getContextClassLoader()}); try { synchronized (loader) { diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index 2e13c5d54..a34454c8d 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -77,6 +77,8 @@ import org.aspectj.weaver.patterns.FormalBinding; import org.aspectj.weaver.patterns.PerClause; import org.aspectj.weaver.patterns.Pointcut; import org.aspectj.weaver.patterns.SimpleScope; +import org.aspectj.weaver.tools.Trace; +import org.aspectj.weaver.tools.TraceFactory; public class BcelWorld extends World implements Repository { private ClassPathManager classPath; @@ -86,6 +88,8 @@ public class BcelWorld extends World implements Repository { //private ClassPathManager aspectPath = null; // private List aspectPathEntries; + + private static Trace trace = TraceFactory.getTraceFactory().getTrace(BcelWorld.class); // ---- constructors @@ -347,7 +351,9 @@ public class BcelWorld extends World implements Repository { private JavaClass lookupJavaClass(ClassPathManager classPath, String name) { if (classPath == null) { try { - return delegate.loadClass(name); + JavaClass jc = delegate.loadClass(name); + if (trace.isTraceEnabled()) trace.event("lookupJavaClass",this,new Object[] { name, jc }); + return jc; } catch (ClassNotFoundException e) { return null; }