Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Tree [193453] master /
History



File Date Author Commit
lib 2014-02-11 Jaroslav Kotrc Jaroslav Kotrc [1d9ec5] Tried to instrument more methods with DiSL. Not...
src 2014-02-25 Jaroslav Kotrc Jaroslav Kotrc [96d46e] Added some ant targets and script for easy buil...
.classpath 2014-01-28 Jaroslav Kotrc Jaroslav Kotrc [ba1ab8] Added DiSL instrumentation demo. Works for own ...
.gitignore 2014-01-28 Jaroslav Kotrc Jaroslav Kotrc [ba1ab8] Added DiSL instrumentation demo. Works for own ...
.project 2014-01-28 Jaroslav Kotrc Jaroslav Kotrc [ba1ab8] Added DiSL instrumentation demo. Works for own ...
README.md 2014-03-18 Jaroslav Kotrc Jaroslav Kotrc [193453] Added README comment how to start examples. Add...
build.properties 2014-01-28 Jaroslav Kotrc Jaroslav Kotrc [ba1ab8] Added DiSL instrumentation demo. Works for own ...
build.xml 2014-03-18 Jaroslav Kotrc Jaroslav Kotrc [193453] Added README comment how to start examples. Add...
run.sh 2014-02-25 Jaroslav Kotrc Jaroslav Kotrc [96d46e] Added some ant targets and script for easy buil...
runApp.sh 2014-01-28 Jaroslav Kotrc Jaroslav Kotrc [ba1ab8] Added DiSL instrumentation demo. Works for own ...
runClient.sh 2014-03-18 Jaroslav Kotrc Jaroslav Kotrc [193453] Added README comment how to start examples. Add...
runServer.sh 2014-02-11 Jaroslav Kotrc Jaroslav Kotrc [1d9ec5] Tried to instrument more methods with DiSL. Not...
runStarter.sh 2014-02-25 Jaroslav Kotrc Jaroslav Kotrc [96d46e] Added some ant targets and script for easy buil...

Read Me

Example instrumentation

Project contains measurement core and instrumentation demos for Javassist, AspectJ and DiSL.

The instrumented application is simple sorting application in lib/sortapp.jar. All examples tries
to instrument different methods in the application and also java system classes.

Javassist and AspectJ examples can be compiled and runned by ant using buildifle.xml.
DiSL is compile the same way but for running there is run.sh script in the main directory.

Running Javassist

To run javassist instrumentation use ant target
run-javassist
It instruments classes statically and writes them to the folder generated. Then the application
is started by ant target
run-sort-javassist
It will use the generated classes and loads them before bootstrap classes when JVM is starting.
This works also for java system classes.

Running AspectJ

Ant target
run-compile-aspectj
is used to compile application with aspectj compiler to add measuring code. Then target
run-sort-aspectj
is used to run instrumented application.

Load time weaving is used by target
run-compile-sort-aspectj
It runs the original application and instruments it during classloading.

To instrument also java system classes it is needed to use target
run-compile-aspectj-system
It creates new rt.jar which is used by target
run-sort-aspectj-system
This runs the application and loads generated JAR before bootstrap classes when JVM is starting.

Running DiSL

Compiling the application is done by target
jars-disl
To run the application start script
run.sh
It starts DiSL server for instrumentation and client where tha application runs.

To run the application by reflection use script
runStarter.sh
(Not working yet)

To compile instrumenting code into two separated JAR files use target
jars-disl-separated
(Not working yet)
It compiles measuring code to one JAR and the instrumentation code to another JAR file.
The application start is the same way as in the first example by script
run.sh