Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] New AspectJ profiling suite in tests

A major focus of AspectJ going forwards is to bring down compilation times and memory usage. We have no shortage of ideas to achieve this (some significant advances appear to be possible), but until now no standard way of benchmarking and profiling the behaviour of the compiler / weaver.

I've just commited a profiling suite in tests/profiling.

The suite allows you to profile compiles using:

* straight source compilation with ajc
* binary weaving
* load-time weaving
* AJDT-like compilation (as close as we can get to the way AJDT uses the compiler)

It will produce gc analysis or full hprof analysis for runs in these different environments.

The profiling can be configured using different suites of aspects (currently just 'simple-suite" is defined) to exercise different matching and weaving profiles.

It can also be easily configured to change the target application used for profiling. By default it profiles compilation and weaving of the spring framework 1.2.6 source tree. (Chosen because it is of a typical industrial project size, and references many jars). Just download the spring-framework-1.2.6 full distribution and point the profiler at the install location (see build.properties for customization options - create your own project.properties and define your custom settings there).

You can choose to profile a different target application by changing the target.application.definitions.file, target.application.name , weave.injar and ltw.aop.xml properties. Look at the spring-1.2.6.xml to see the 3 simple definitions you need to provide when setting up to profile a given target app.

By combining the ability to define different suites of aspects, and different target applications, you can profile almost anything you need to!

The results are written into the "results/target-application-name" folder. You can analyze the gc files with JTune (for example) and the hprof files with HAT or JMeter (I had to remove the "THREAD" section with an editor to get JMeter to work). Look at the examples in build.properties for the hprof.args property to see how to configure the information you need out of hprof. If anyone knows of any other good tools we can use to analyze gc and hprof files, I'd like to hear about them.

I've put base line profiles of AspectJ 1.5.0 compiling and weaving spring framework 1.2.6 into the "reference data" sub folder.

Now we can start making AspectJ leaner and meaner!!

-- Adrian
adrian.colyer@xxxxxxxxx

Back to the top