Skip to content

Latest commit

 

History

History

README.md

BDE Allocator Benchmarking Tools

This is a group of programs attempting to reproduce the results found in N4468, "On Quantifying Allocation Strategies".

These programs depend upon:

  • Clang version 3.6 or later, or gcc version 5.1 or later
  • For clang, libc++ version 3.6, or later
  • BDE Tools, which contains a custom build system based on waf

A suitably-configured system can be built quickly using Docker; see the 'Docker' section below for instructions.

To configure,

  $ vi Makefile    # configure per instructions

To build,

  $ make benchmark_##

To run benchmarks,

  $ ./benchmark_##

Docker

Two Dockerfiles have been provided which can be used to construct images with all necessary tools and configuration for building these programs. One file builds a Debian 'testing' (Stretch) based image, and the other builds an Ubuntu 15.04 (Vivid) based image. All commands should be run from within the benchmarks/allocators dirrectory of the repo.

Note: There are some known bugs for Docker on Windows that will prevent the below commands from working out of the box. See the final section for further explanation

Debian Stretch

To use the Debian Stretch Dockerfile, follow these steps:

# Build an image called 'debian-stretch-clang'
docker build -f ./docker/debian-stretch-clang --rm -t debian-stretch-clang ./docker

# Build the BDE library and benchmarks using the image
docker run --rm -v $(git rev-parse --show-toplevel):/src -w /src/benchmarks/allocators debian-stretch-clang make benchmark_##

# Run the benchmarks
docker run --rm -v $(git rev-parse --show-toplevel):/src -w /src/benchmarks/allocators debian-stretch-clang ./benchmark_##

Ubuntu Vivid

To use the Ubuntu Vivid Dockerfile, follow these steps:

# Build an image called 'ubuntu-vivid-clang'
docker build -f ./docker/ubuntu-vivid-clang --rm -t ubuntu-vivid-clang ./docker

# Build the BDE library and benchmarks using the image
docker run --rm -v $(git rev-parse --show-toplevel):/src -w /src/benchmarks/allocators ubuntu-vivid-clang make benchmark_##

# Run the benchmarks
docker run --rm -v $(git rev-parse --show-toplevel):/src -w /src/benchmarks/allocators ubuntu-vivid-clang ./benchmark_##

Windows Example

Run the following command:

git rev-parse --show-toplevel

The output should look something like this:

C:/Users/gblea/Allocator-Benchmarks

You will need to change the slashes and drive letter to match the syntax expected by the docker terminal:

/c/Users/gblea/Allocator-Benchmarks

Replace $(git rev-parse --show-toplevel) with the modified path in the proveded docker commands, to get something like this:

docker run --rm -v /c/Users/gblea/Allocator-Benchmarks:/src -w /src/benchmarks/allocators debian-stretch-clang make benchmark_1

Finally, add a second forward slash to all root-level forward slashes in the command:

docker run --rm -v //c/Users/gblea/Allocator-Benchmarks://src -w //src/benchmarks/allocators debian-stretch-clang make benchmark_1