Skip to content

🐳 A Dockerized version of GCC-SLO (Suggestions for Locality Optimizations)

License

Notifications You must be signed in to change notification settings

memassist/slo-docker

Repository files navigation

Dockerized GCC-SLO 🐳

(Suggestions for Locality Optimizations)

A Dockerized version of GCC-SLO for easy installation and usage.


build GitHub

GCC-SLO is a data locality profiler and SLO is a visualizer of the data analyzed by GCC-SLO. SLO suggests refactorings that can improve the data locality of an input program. The documentation of SLO can be found in slo.sourceforge.net.

Installation

Docker and Docker Compose should be installed in your system:

Then just pull the pre-built Docker image from GitHub Container Registry to install GCC-SLO:

docker pull ghcr.io/memassist/slo:latest

Getting started

The directory examples/example1/ contains an example input C program taken from the SLO Handbook to help you get started. example1 and its Makefile can be used as a template for your own projects. The structure of the Makefile is explained here: http://slo.sourceforge.net/dochtml/ch04s03.html. Follow the instructions below to start analyzing the example program using GCC-SLO.

  • Make sure you downloaded or cloned this repository and are inside the slo-docker directory.
git clone git@github.com:memassist/slo-docker.git
cd slo-docker
  • Start the slo Docker container:
docker-compose up -d
  • Start a bash shell in the container:
docker exec -it slo bash
  • From this shell, navigate to the example1 project directory:
cd ~/examples/example1
  • Use make to instrument the project, build it and perform dynamic analysis:
make clean
make

The file example1.slo.zip is generated after make finishes. Open this file with the SLO visualizer to view the results and the suggested refactorings.

References

For more information on SLO and how it works refer to:

Build the Docker image from source

Use the following steps to build the image from source instead of pulling the pre-built image.

  • Download or clone this repository, go into the slo-docker directory and build the image:
git clone git@github.com:memassist/slo-docker.git
cd slo-docker/slo
docker build -t ghcr.io/memassist/slo:latest --build-arg UID=1000 --build-arg GID=1000 .
cd ..

License

This project is licensed under the GPL-2.0 License - see the LICENSE file for details.