(Suggestions for Locality Optimizations)
A Dockerized version of GCC-SLO for easy installation and usage.
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.
Docker and Docker Compose should be installed in your system:
- Docker: https://docs.docker.com/get-docker/
- Docker Compose: https://docs.docker.com/compose/install/
Then just pull the pre-built Docker image from GitHub Container Registry to install GCC-SLO:
docker pull ghcr.io/memassist/slo:latest
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 [email protected]: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.
For more information on SLO and how it works refer to:
- SLO's website
- Principles of analysis performed by SLO
- The documentation [ pdf ] [ html ] (aka The SLO Handbook)
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 [email protected]: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 ..
This project is licensed under the GPL-2.0 License - see the LICENSE file for details.