- Apache Maven 3.6.3
- OpenJDK 17.0.2 (Project compiles to Java 9)
mvn clean
mvn compile
mvn exec:java -Dexec.mainClass=oscar.Main -Dexec.args="-h"
oscar <targetfile> <mainclass> <outputdirectory>
Usage:
java [java_options] <mainclass> [oscar_options]
(to execute a class)
or: java -jar <mainclass> [oscar_options]
(to execute a jar file)
OSCAR options include:
-a --args String Inject arguments into the program
-c --config_file String Set config file location to load
-co --console-output Flag False Enable output of noising locations signals to console
-fo --file-output Flag False Enable output of noising locations signals to a file
-lfo --lazy-file-output Flag False Enable lazy output of noising locations signals to a file
-M --max_sleep_length Long 0 Set maximum sleep length
-m --min_sleep_length Long 400 Set minimum sleep length
-d --disable-noise Flag False Disable all noise
-np --noise-placements List<String> All Set the list of active noise placements.
-nc --noise-categories List<String> All Set the list of active noise categories.
-pnp --print-noise-placements Flag - Print all possible noise placements.
-v --version Flag - Print OSCAR version.
-vb --verbose Flag False Enable full logging.
-q --quiet Flag False Disable logging.
-h --help Flag False Print Help.
OSCAR Noise Injector 2022
- Sleep lengths should be integers
- Injected arguments need to be inside quotes as such: "-a -b -c"
- Compile the Account program source code
cd data/cflash/account
javac *.java
cd ../../..
- Use OSCAR to instrument the Account program's bytecode with the noising engine's logic. OSCAR will wrap the original program in its routine. The outputted program will be in the folder "output".
mvn exec:java -Dexec.mainClass=oscar.Main -Dexec.args="data/cflash/account/Main.class Main
output"
- Run the instrumented program without any noise
cd output
java Main -d
- Run the instrumented program with random noise between 0 and 100ms
java Main -m 0 -M 100
- Run the instrumented program, only noising synchronized blocks and methods, and lazily output the trace to a file.
java Main -m 0 -M 100 -nc sb -lfo
- Run the instrumented program, with specific arguments.
java Main -a "5"
This work was partially funded by the Portuguese FCT-MEC project HiPSTr (High-performance Software Transactions — PTDC/CCI-COM/32456/2017)&LISBOA-01-0145-FEDER-032456).