Coz: Causal Profiling
Go to file
2015-07-02 13:54:31 -04:00
benchmarks Updated datasets and benchmark/test run commands 2015-05-28 14:54:43 -04:00
include Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
inspect ld flags no longer required 2015-04-09 11:26:59 -04:00
libcoz Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
pycoz Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
tests Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
.gitignore Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
common.mk Updated datasets and benchmark/test run commands 2015-05-28 14:54:43 -04:00
coz Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
deps.mk Consistent dependency searching 2015-04-10 11:25:34 -04:00
LICENSE.txt license 2014-10-29 12:40:34 -04:00
Makefile Cleaned up and reorganized build 2015-04-08 17:31:18 -04:00
README.md Update README.md 2015-06-22 22:22:06 -04:00

Coz: Causal Profiling

Causal profiling is a novel technique to measure optimization potential. This measurement matches developers' assumptions about profilers: that optimizing highly-ranked code will have the greatest impact on performance. Causal profiling measures optimization potential for serial, parallel, and asynchronous programs without instrumentation of special handling for library calls and concurrency primitives. Instead, a causal profiler uses performance experiments to predict the effect of optimizations. This allows the profiler to establish causality: "optimizing function X will have effect Y," exactly the measurement developers had assumed they were getting all along.

More details are available in our Tech Report (pdf).

Requirements

Coz, our prototype causal profiler, runs with unmodified Linux executables. Coz requires:

On debian or ubuntu, you can install all build dependencies with the following lines:

sudo apt-get install clang linux-tools

Building

To build Coz, just clone this repository and run make. The build system will check out other build dependencies and install them locally in the deps directory.

Using Coz

Before running your program with Coz, you will need to identify one or more progress points. These are points in your program that you would like to happen more frequently. For example, in the pbzip2 program under benchmarks/pbzip2 we have inserted a progress point after the code that compresses a block of data.

To add a progress point, add the COZ_PROGRESS macro to the line you would like to execute more frequently. This macro is defined in include/coz.h. You can also mark transaction boundaries using the COZ_BEGIN and COZ_END macros. Coz will measure the average latency between these points, which allows you to evaluate potential optimizations by their impact on latency rather than throughput.

To run a program with Coz, just type coz run --- <your program and arguments> on the command line. You can specify profiling options befor the ---. Run coz run -h for a description of the available options. Profiling output is placed in the file profile.coz by default.

Processing Results

There is a new experiment javascript plotting interface available in jsplot/index.htm. Just open this file in your browser and load the profiler output to plot. Legacy python plotting is still enabled for now, but requires the ggplot python package. Details for legacy plotting are included below:

To plot the results from a causal profile, run coz plot. This will generate an image from the profile.coz file in the current directory. This functionality requires the Python ggplot package. You can install this package with the command pip install ggplot.

If you do not have ggplot installed, you can generate a CSV from the causal profile results using the coz process command. The output file profile.csv can be used with most spreadsheet programs.

License

All source code is licensed under the GPLv2 unless otherwise indicated. Copyright (C) 2015 University of Massachusetts Amherst