RT-Bench
An Extensible Benchmark Framework for Real-Time Applications
Loading...
Searching...
No Matches
Building with the framework

This page will guide the user in building benchmarks with RT-Bench.

Dependencies

In the current implementation the framework has some dependencies the user has to be aware of:

  • A shell that can run scripts in Bash >= 5.
  • git >= 2.37.
  • git LFS >= 2.13: Optional. For the Image Filters module.
  • Glibc: Provides primitives used by the memory watcher and the argument parser.
  • POSIX.4 real-time signals: used to execute the benchmark periodically and to gather stats.
  • Linux scheduler syscalls: Used to change the scheduling policy.
  • Linux Perf: Used to read performance counters (currently only on CORTEX A53)
  • JSON-C >= 0.15: Optional. Used to read and parse input JSON configuration files.
  • imagemagick >= 7.1.0-45 Optional. For the Image Filters module.

Currently RT-Bench targets the following platforms:

  • x86/x86_64
  • ARM64

For Nix users a flake and a direnv environment are available to make sure that all the dependencies are satisfied.

Dependence installation

The json-c dependence can be installed with the following command:

  • Ubuntu/Debian:
    sudo apt install libjson-c5 libjson-c-dev
  • Fedora / OpenSuse:
    sudo dnf install json-c json-c-devel
  • Arch Linux:
    sudo pacman -S json-c

Compiling RT-Bench

Compiling a RT-Bench compliant benchmark (see benchmark structure) with the framework is relatively easy as with GCC only few optional and mandatory flags are required or adviced.

It is suggested to follow each benchmark set compilation instructions for best results.

The simplest compilation line necessary is as follows:

gcc -O2 -Wall -g -Ipath/to/rt-bench/generator -lrt -lm -ljson-c -pthread -Wl,--wrap=malloc -Wl,--wrap=mmap target.c path/to/rt-bench/generator/*.c -o target

where:

  • -O2 -Wall -g are optional but recommended flags.
  • -Ipath/to/rt-bench/generator is the path to the generator/ folder located within your local rt-bench repository (mandatory).
  • -lrt -lm -ljson-c -pthread -Wl,--wrap=malloc -Wl,--wrap=mmap must appear for the correct working of the RT-Bench core mechanics.
  • path/to/rt-bench/generator/*.c is the path to all the components located in the rt-bench_generator/ folder within your local rt-bench repository.
  • target is the name of the benchmark under consideration.

Optional RT-Bench specific options

In addition, RT-Bench supports dedicated flags that enable access to further features. These features are not part of the default set of features as they depend on the benchmark nature itself or on the platform on which the benchmarks will be deployed.

Extended Reporting (Benchmark Specific Measurement Reporting)

Some benchmark classes (e.g., synthetic workloads) measure specific impact on the platform. RT-Bench offers the possibility to extend the existing .csv report interface to include the desired benchmark-specific measurement. Providing the benchmarks follows the rules mentioned in benchmark structure, extended reporting can be enabled by adding the -DEXTENDED_REPORT flag in the compilation command line.

JSON configuration files support

To keep the mandatory dependencies to a minimum, the support for parsing JSON configuration files (-g option) is disabled. To enable parsing of JSON files, the JSON-C library must be at least at version 0.15 and the -DJSON_SUPPORT flag must be added to the compilation command line.

This feature can be enabled on-the-fly while issuing a make commad by defining the JSON=1 variable.

Performance counters and monitoring thread

This set of feature being specific to the core and platform on which the benchmark will be deployed, two parameters must be added in other to enable them: the ISA and the core model. The table below lists of the flags to add and provide examples of compliant/tested platforms and CPU models.

Additionally, there are equivalent Make variables that will enable the corresponding parameters when issuing a make command.

ISA CORE Make Variable Platform/CPU Model
-DAARCH64 -DCORTEX_A53 CORE=CORTEX_A53 Xilinx ZCU102
-DX86_64 -DCORE_I7 CORE=CORE_I7 Intel Core i7-8550U
Author
Mattia Nicolella, Denis Hoornaert