Oh, I just read this message after answering the previous one. Only to produce
output for woven files sounds like a smart idea. I would love to see that as a
feature.
--
Alexander Kriegisch
> Am 08.11.2013 um 01:53 schrieb Andy Clement :
>
> Before I previously responded I thought about the s
Actually I have written a comprehensive article a year or so ago about JDK
weaving from Eclipse which I intended to publish on DZone, but the completely
forgot about it because of my daytime job. ;-) when I am back home I can dig up
the document. It is complete with screenshots and step by step
Before I previously responded I thought about the solution that involved
maintaining a map/set of what you were interested in, but I didn't suggest
it - I half think the overhead of the map lookup will be worse than the
while loop - but I'll admit I haven't measured anything to confirm that.
Going
Thanks Alexander. I've been trying out weaving rt.jar and it's simple
enough. I build my project with maven and it's easy enough to weave
rt.jar. By default it does as you describe and includes the entire rt.jar
in the output. What is the ajc command line option (or
aspectj-maven-plugin option)
Oh, I forgot to mention a little trick I use often in situations like these: I
do not create a full copy of rt.jar, but just a small jar of woven JRE classes
which I *prepend* to the bootclasspath, so the classes therein are found by the
system classloader *before* the ones in the original rt.ja
Your intention is to profile low level calls. Whether you like it or not, I
think weaving rt.jar is the best choice because it does not have as much
overhead as the solutions you are thinking of. Profiling is usually not done in
production environments, so weaving the JRE should not be too much
Thanks for your response Andy.
Consider the following alternative approach to 'marking' the instances I'm
interested in. I maintain a WeakHashSet to reference
all input streams that i'm interested in. I weave all constructor calls to
FilterInputStream, adding this new stream to the set if either
> I'll also mention that I don't want to weave rt.jar.
Shame, that would make it rather easy with a pointcut on execution of
FileInputStream+.read(..).
I can imagine your proxy route might work. You can advise the constructor
calls to the various FilterInputStream and FilterOutputStreams, and th
Hi everyone,
Love AspectJ. I work on end-to-end tracing using X-Trace, and AspectJ is
an awesome mechanism to do some of the tracing that I'm interested in.
I'm trying to profile file accesses; specifically, calls to
FileInputStream+.read(..) and FileOutputStream+.write(..). However, in
many ca