Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Something Related to AOP...

Dear Aspect-folks,

I've been asked to implement an instrumentation package for
a system written in a varient of C++.

At one level, this really is AOP.

At a different level it's totally not.

But it's related.

ANYWAY... I need to do something that will allow the developers
to write performance monitoring code to be inserted at arbitrary
locations. Perhaps I can do it all at source code level. Perhaps
not.

The interface must be blindly simple, taking AOP out of the 
picture. (Or should I say, the programmers must not be allowed
to see the complexity of AOP pointcut defs., advice, etc.) 
And because it's for monitoring,
it has to be FAST. There cannot be ANY overhead from AOP. (If
the programmer wants to increment an integer, it has to happen
in a single CPU cycle -- no function calls, trampolines are
questionable.)


I've got a good idea of how to proceed. But I thought I'd ask
your opinions. After all, you've spent a lot more time thinking
about these issues than I have.



My thoughts:

Use Eclipse as an editor. It will make a duplicate of the source
directory tree. The programmer will have a couple of options
such as "Insert Advice Around Method Body" and "Insert Advice
Around Assignment". This will insert a code block with
a couple of editable sections. (The actual source won't be editable.)

They write whatever code they want.

Then they get a dialog box to select the set of methods this
advice should be inserted into. We insert it everywhere requested.

Then we just run the compiler.

Hence, zero overhead, no limitations on programming, no
big learning curve, no doubt about what's going on.
(IE, all the complicated things about AOP.)

I've been talking to the guys doing AspectC++. It seems
like it might be possible for me make my interface produce
AspectC++ code, which would then produce the actual C++.


It wouldn't be surprise if someone has already done something
like this, but I haven't found anything.


Any thoughts? Any advice?

Sincerely,

-Bil Lewis







Back to the top