Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Some questions about load-time weaving



Eric,

It does seem that the FAQ is a little out of date as the 1.2 release
included full support for load-time weaving (which at least one project is
using judging by https://bugs.eclipse.org/bugs/show_bug.cgi?id=74246) and
an example weaving class loader.

>Are there any decent estimations so far of the performance impacts
>inwolved at class loadtime?
Not yet. The impact of course will very much depend on the aspects used as
well as the application.

>If the approach also applicable for people who already use a custom
>classloader to do whatever in their aspected application?
The purpose of the WeavingAdaptor in AspectJ 1.2 is to allow existing
custom class loaders to simply become weaving class loaders.

>Can problems arise when code that was woven at compile-time is woven
>again at load-time?
Yes. Code cannot be rewoven at any time either using static binary weaving
or LTW. The -Xreweavable option is a requirement for compiling an
application  with aspects that wishes to be available for subsequent LTW.
Otherwise the application will fail to load: all classes loaded by a
weaving classloader should be subject to weaving by the same set of
aspects.

>What would happen if somebody wove in an aspect at compile-time and
>then tried to weave that very same aspect in again at load-time?
The application will be rewoven with whatever version of the aspect is
available in the run-time environement as determined by aspectpath.

>What about the reweavable feature? (How) does that affect
>compile-time weaving?
See above.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/


Eric Bodden <eric@xxxxxxxxx>@eclipse.org on 08/10/2004 23:24:52

Please respond to aspectj-dev@xxxxxxxxxxx

Sent by:    aspectj-dev-admin@xxxxxxxxxxx


To:    aspectj-dev@xxxxxxxxxxx
cc:
Subject:    [aspectj-dev] Some questions about load-time weaving



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

In the AspectJ FAQ released with Verison 1.2, I found the following
about load-time weaving:
- ---
AspectJ 1.1 can weave binary aspects into classes in bytecode form.
Hooked up to a class loader, this can weave class bytecodes after
they are read in, before the class is defined by the VM. In the 1.1
release (or soon thereafter) we will provide a proof-of-concept class
loader, but we expect most people will already have a custom class
loader which they will adapt to invoke our weaver.
Some have asked about only weaving particular classes specified at
run-time. Aspects should work across an entire namespace, and
problems will likely result from weaving some classes but not others.
Also, it's confusing to specify crosscutting both in the aspect and
in the list of runtime classes; the crosscutting specification should
be in the aspect itself, where it can be processed by tools.
- ---

Well this seems a bit outdated now, since version 1.2 is out and
maybe some things have changed - maybe not, I don't know. So is there
any real experience already with the provided load-time weaving
implementation of 1.2?

In particular I would like to know:

Are there any decent estimations so far of the performance impacts
inwolved at class loadtime?

If the approach also applicable for people who already use a custom
classloader to do whatever in their aspected application?

Can problems arise when code that was woven at compile-time is woven
again at load-time?

What would happen if somebody wove in an aspect at compile-time and
then tried to weave that very same aspect in again at load-time?

What about the reweavable feature? (How) does that affect
compile-time weaving?

...


My apologies in advance if ther's already a paper or FAQ about that.
I simply could not find one.

Cheers,
Eric

- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQWcTtMwiFCm7RlWCEQIAAACfaK+M/g9f0lHbbNBDSwo2UV5LxgEAnjCd
ZJIkFsqCJCJUxJm2FJNLFj/m
=UQTY
-----END PGP SIGNATURE-----


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





Back to the top