The CDx benchamerk is configurable to suport different runtime environments. In particular, we wanted to be able to compare the efficacy of scoped memory vs. traditional garbage collection vs. real-time garbage collection. Another dimension of customization is whether to have computational noise or not. The following table summarize the main configuration options that are supported:
CDjgns | Plain Java with garbage collection |
CDrsns | RTSJ with scoped memory |
CDrgns | RTSJ with real-time garbage collection |
CDss0s | SCJ with scoped memory (upcoming) |
The value of n can be either 0 to indicate the absence computational noise, j for the SPEC JVM 98 javac benchmark or s for the ATS simulator. The value of s defines the ATS implementation: a is the ATS simulator, b is the version that reads the simulation from a binary file, and e is for the case where the simulation is encoded in a Java class.
There are two different ways how to run CDx: you can either run the tasks from the ant file, or run the preconfigured sripts provided in the distribution, or run the CDx directly from a command line using your own set of parameters. We will describe all these procedures in more details.
The following run tasks are provided in the build.xml file:
run_wrt_quad_oscillator2
|
| |
run_rts_noi |
| |
run_rts_mega10 |
| |
run_rts_col
|
| |
run_from_precompiled_default | Runs CDx with the TEST workload and default (plain) Java. The simulated frames are self-contained in the program code. Intended for verification tools or embedded devices with limited resources and I/O capabilities. | |
run_from_dump_default | Runs CDx with the TEST workload and default (plain) Java. The simulated frames are read from the dump file (input.bin). | |
run_default_test | Runs CDx with the TEST workload and default (plain) Java. The simulator runs concurrently with the detector. | |
precompile
| Convert a binary dump of air traffic into a Java source, which can be then used to build a CDx version with self-contained simulated frames. | |
dump_test | Creates a binary representation of the TEST workload (creates frames.bin). | |
dump_noi | Creates a binary representation of the NOI workload (creates frames.bin). | |
dump_col | Creates a binary representation of the COL workload (creates frames.bin). |
Execute he build.xml :
Where personality_file is the file specifying the VM that you want to use.
The same set of preconfigured launch configurations from build.xml is provided also in the .sh scripts, to each task there is a .sh file containing the script to run the particular CDx configuration.
Example:
    dist/lib/common_realtime.jar:dist/lib/utils.jar:dist/lib/java_memory.jar:dist/lib/rtsj_threads.jar:\
    dist/lib/detector.jar:dist/lib/binary_dump_reader.jar:dist/lib/main.jar \
    -Xms300m -Xmx300m -XX:+PrintGC -XX:+RTGCPrintStatistics -Xloggc:rtsgc.out \
    -XX:RTGCCriticalReservedBytes=50m -XX:RTGCCriticalPriority=15 \
    heap/Main input/hard.bin \
    MAX_FRAMES 10000 DETECTOR_PERIOD 10 SIMULATOR_PRIORITY 1 \
    DETECTOR_PRIORITY 20 BUFFER_FRAMES 10000 \
    PRESIMULATE \
    DETECTOR_STARTUP_OFFSET_MILLIS 1000 \
Where:
/home/sunrts/bin/java | is the home java executable of the RTVM that we want to benchmark |
heap/Main | is the main class that is executed |
input/hard.bin | is the input file |
MAX_FRAMES and others | are the launch parameters for the CDx |
The CDx launch parameters are:
MAX_FRAMES | Maximum number frames in total |
DETECTOR_PERIOD | sets the period in which the frames will be processed by detector [ms] |
SIMULATOR_PRIORITY | sets the priority of the simulator thread |
DETECTOR_PRIORITY | sets the priority of the detector thread |
BUFFER_FRAMES | sets the size of the buffer storing frames between simulator and detector |
PRESIMULATE | Simulator will not be used, instead a .bin dump input will be used to proceed the frames |
DETECTOR_STARTUP_OFFSET_MILLIS | The period at the beginning of the benchmark when the results are not considered to eliminat effects of the cold start |
USE_SPEC_NOISE | sets to use SPEC JVM 98 noise generator |
SPEC_NOISE_ARGS | parameters for the SPEC noise generator |
DETECTOR_NOISE | sets the generator which run within the CD thread to run |
DETECTOR_NOISE_ALLOCATE_POINTERS | the size of the noise generator array |
DETECTOR_NOISE_VARIABLE_ALLOCATION_SIZE | size of the objects allocated by the noise generator |
FRAMES_BINARY_DUMP | use the frames dumped into a .bin file |
DUMP_SENT_FRAMES | the generated frames will be stored also in the .bin file |
PERSISTENT_DETECTOR_SCOPE_SIZE | scope size of the persistent scope |
TRANSIENT_DETECTOR_SCOPE_SIZE | scope size of the detector scope |
SIMULATOR_TIME_SCALE | speed of the simulator relative to reality |
SIMULATOR_FPS | number of frames to simulate per second of virtual time (we typically want SIMULATOR_FPS * DETECTOR_PERIOD = 1000 |