I have been using YourKit using JVMTI with
the AspectJ javaagent and they work together very well. AspectJ doesn’t
hot swap classes, although it also won’t reweave them if you try. YourKit
seems to only HotSwap java.lang.Object to track memory use. I have also used it
to count calls and that seemed to not interfere with AspectJ either.
From:
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Erc Crahen
Sent: Tuesday, June 27, 2006 1:34
PM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users]
OutOfMemryError LTW
Wow, that does chew up quite a bit of memory.
How are you able to estimate the size of the heap thats required? I usually hit
errors when I try enable both LTW and a profiler like Netbeans Profiler because
both javaagents are trying to hotswap classes
Ron Bodkin
<rbodkin@xxxxxxxxxxxxxx> wrote:
AspectJ load-time weaving is still quite
memory intensive although it has improved a lot since 1.5.0. For example, I
found that starting Tomcat with some small applications without AspectJ
load-time weaving requires 11mb of heap and 18 mb of non-heap memory. If I
deploy a development version of Glassbox with AspectJ 1.5.2 rc1, it requires 41
mb of heap and 23 mb of non-heap memory. (*)
In the meanwhile, one technique you can
use to limit memory use by the weaver is to use the include type patterns to
only weave into code you need to affect. E.g., if you have an application
specific aspect, if you add <include within=â€com.myco.myapp..*â€/>
to your META-INF/aop.xml then you should find a much lower memory overhead.
(*) I am working on two ideas for improving
this situation:
* The patch submitted with AspectJ
enhancement #148773 reduces the heap required to 33 mb
* Allowing loading common aspect
definitions once per system instead of many times with many copies. Memory
profiles show me that most of the overhead is pinned by having 10 copies of the
weaving definitions one for each ClassLoader affected. This could also reduce
the time overhead for weaving, too. The tricky part about doing this is to
support nondelegating ClassLoaders that provide a different definition of
parent types.
From:
aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Erc Crahen
Sent: Tuesday, June 27, 2006 12:42
AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users]
OutOfMemryError LTW
When using the load time weaving agent, I'm runing into OutOfMemory
errors. I think that it could be that some of my classes refer to so many other
classes that the bytecode intrumentation pieces are running of heap weaving the
aspects.
Is there any debugging or anything I can do to confirm this? Or aleviate it? I
have a 96M heap which is plenty when the app runs w/o weaving on...
- Eric
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
- Eric
How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone
call rates.