AJP/DiSLProject2022
tripparsugo a4568c06b5 this doesn't really make things faster, but I tried 2023-02-01 16:39:28 +01:00
..
build Added DiSL project 2023-01-02 10:46:59 +01:00
lib Added DiSL project 2023-01-02 10:46:59 +01:00
src-profiler this doesn't really make things faster, but I tried 2023-02-01 16:39:28 +01:00
.gitignore ex11: done through CSV 2023-01-28 17:57:59 +01:00
README.md Added DiSL project 2023-01-02 10:46:59 +01:00
build.xml Added DiSL project 2023-01-02 10:46:59 +01:00
exclusion.lst Added DiSL project 2023-01-02 10:46:59 +01:00
run-instr.sh dislproj: done ex1 2023-01-02 11:09:36 +01:00
run.sh Added DiSL project 2023-01-02 10:46:59 +01:00
runInstrumented.sh Added DiSL project 2023-01-02 10:46:59 +01:00
source.sh Too tired to write descriptive message 2023-01-04 17:29:27 +01:00
startDiSLServer.sh Added DiSL project 2023-01-02 10:46:59 +01:00

README.md

This bundle contains the template of the various exercises that compose the DiSL project. Please refer to the text of the DiSL project for more information on the the purpose of each exercise.

Bundle structure

Each exercise is composed of two parts: 1) profiler and 2) observed application.

  • Profiler code is located in the src-profiler folder. In each exercise, there is always a single DiSL class (i.e., the class containing DiSL snippets) which is called Instrumentation. You can add as many profiler classes as you like to the src-profiler folder. However, all DiSL snippets must be added to the existing Instrumentation class.
  • Observed applications compiled are located as jar archive in the build folder. In each exercise, the main class of the observed application is always called Main. The source code of the observed application is not provided.
  • Both the profiler and the observed applications are contained in a package called ex<i> (where is a progressive integer number). For example, both the profiler and the observed applications that refer to the first exercise are contained in package ex1.

How to build

Building requires the ant program. You have to compile and build the sources each time you want to use a different profiler.

To run the build process, execute ant -Ddislclass=<DiSL class> in the root of the folder, where is the fully qualified name of the DiSL class corresponding to the profiler you want to run.

For example, if you want to use the profiler that refers to the first exercise, run: ant -Ddislclass=ex1.Instrumentation.

The build process will generate the JARs build/profiler.jar, containing the profiler.

How to run the observed application (uninstrumented)

The observed application (without any profiler) can be normally run via: bash ./run.sh <main class> where

is the fully qualified name of the main class you want to run.

For example, to run the main class of the first exercise, run: bash ./run.sh ex1.Main

How to run the observed application (instrumented)

To run the observed application instrumented with a profiler:

  • First, start the DiSL Server by executing bash ./startDiSLServer.sh.
  • Then, start the observed application (with the profiler attached) by executing bash ./runInstrumented.sh <main class> where is the fully qualified name of the main class you want to run.

Note: the profiler that will be applied to the observed application is always the one corresponding to the DiSL class specified at build time!

Cleanup

You can run ant clean to discard generated profiler JAR. Please do not erease the following file/folder:

  • folder: build
  • file: build/app.jar otherwise you need to download them again from iCorsi.

Summary

To run e.g. the instrumented observed application of the first exercise, execute, in order:

  • ant clean
  • ant -Ddislclass=ex1.Instrumentation
  • bash ./startDiSLServer.sh
  • bash ./runInstrumented.sh ex1.Main