1. The reuse distance histogram window

1.1. The File Menu

FileExport in SVG format

outputs the histogram in SVG (Scalable Vector Graphics) format. The file that the histogram is written to is selected through a file selector dialog that pops up.

FileExport in EPS format

outputs the histogram in an EPS (Encapsulated Postscript) format. The file that the histogram is written to is selected through a file selector dialog that pops up.

FileExport in PNG format

outputs the histogram in an PNG (Encapsulated Postscript) format. The file that the histogram is written to is selected through a file selector dialog that pops up. The file selector allows to set the resolution and width and height of the exported PNG drawing of the histogram.

FileOutput Analysis data to CSV files

outputs the reuse distance data to a comma separated value (CSV) to a number of CSV-files in a newly created directory. The directory to store the CSV-files in is selected through a file selector dialog that pops up. An example of such a CSV file for the example1.slo.zip file is shown in Table 3.1, “Example of exported CSV file: example1.slo.zip.noncumul.absolute.csv”. It contains the histogram in table form. Eight of these CSV file are written, one for each possible combination of with or without "absolute", "noncumul" and "summary". "absolute" corresponds to a CSV file with absolute values for the number of reuses at a certain distance for a certain refactoring. "relative", or non-"absolute", corresponds to a CSV-file where the relative number of reuses at a certain distance are encoded. This corresponds to the histogram after clicking View "Show Relative Histogram". For each distance, the numbers add up to 1. "noncumul" contains the regular histograms, while the "cumul"-versions contain the reverse-cumulative histograms, corresponding to clicking View "Reverse Cumulative Histogram". In the "summary" CSV-files, respectively all tiling-like, fusion-like, and function-fusion-like optimizations are combined.

FileCompare with other ...

Allows to compare the reuse distance histogram with the histogram in another .slo.zip file. After clicking this menu option, a file selector pops up to select another .slo.zip file. After selecting, the histograms from both .slo.zip files are shown in a single chart. This comes in handy, e.g., to see in what way the reuse distance histogram has changed after a refactoring. An example is shown in Figure 3.1, “Screenshot of comparison between two reuse distance histograms”

Figure 3.1. Screenshot of comparison between two reuse distance histograms

A screenshot of the comparison of two reuse distance histograms: before optimization (blue) and after optimization (red). The histogram shows that all cache-missing reuses at distance 217 have been turned into cache hitting reuses at distances smaller than 210.

Table 3.1. Example of exported CSV file: example1.slo.zip.noncumul.absolute.csv

reuse_distanceex_TILE_L24ex_FUSE_L14_L20ex_TILE_L14ex_FUSE_B12_B12ex_FUSE_B18_B18
0.00.00.00.00.00.0
1.00.00.00.0999990.0500000.0
2.00.00.0999980.00.00.0
3.00.00.00.00.00.0
4.00.00.00.00.00.0
5.00.00.00.00.00.0
6.00.00.00.00.00.0
7.00.00.00.00.00.0
8.00.00.00.00.00.0
9.00.00.00.00.00.0
10.00.00.00.00.00.0
11.00.00.00.00.00.0
12.00.00.00.00.00.0
13.00.00.00.00.00.0
14.00.00.00.00.00.0
15.00.00.00.00.00.0
16.00.00.00.00.00.0
17.0899991.0999990.00.00.00.0
18.09.00.00.00.00.0
19.00.00.00.00.00.0
20.00.00.00.00.00.0
21.00.00.00.00.00.0
22.00.00.00.00.00.0
23.00.00.00.00.00.0
24.00.00.00.00.00.0
25.00.00.00.00.00.0
26.00.00.00.00.00.0
27.00.00.00.00.00.0
28.00.00.00.00.00.0
29.00.00.00.00.00.0
30.00.00.00.00.00.0
31.00.00.00.00.00.0
32.00.00.00.00.00.0

1.2. The View Menu

ViewHighlight 10 most important optimizations

Highlights the 10 most important optimizations in the source code, as if the user had individually clicked on the 10 most important optimizations in the histogram. The most important optimizations are determined by computing a weight for each optimization. The larger the weight, the more important the optimization is considered to be. The formula to compute this weight is:

Equation 3.. 


ViewClear highlighted optimizations

Deletes all indications in the source code of the optimizations that have been highlighted so far.

ViewSet chart ranges

Pops up the following dialog that lets you set the lower and upper bounds of the X and Y axes in the histogram.

ViewReverse cumulative histogram

When this option is selected, the reverse cumulative histogram is shown, instead of a regular histogram. In a reverse cumulative histogram, all reuses that occur at larger distances are represented in each bar, instead of only the reuses with the same distance. In this view, all misses for a specific cache size can more easily be determined. E.g. consider the figures below show both the normal(left) and the reverse cumulative histograms(right) of a certain program run. The size of the L1 cache is indicated by a vertical black line. To find out which reuses miss the cache in the left, normal, histogram, you need to look at all bars to the right of the L1 cache size. In contrast, to find out the cache missing reuses fromthe reverse cumulative histogram (right), you just need to look to the reuses that are displayed where the L1 cache size is drawn. (TODO: look for a screenshot where the advantage of using a reverse cumulative histogram is more obvious)

ViewConfigure cache sizes

This option is used to set the cache sizes that are drawn in the background of the histogram view. An example of two different modes of cache size indication is shown in Figure 3.2, “Screenshot of two possible indications of cache sizes in the reuse distance histogram: by interval and by borders”. After clicking, a dialog pops up to set the cache sizes, an example of which is also found in Figure 3.2, “Screenshot of two possible indications of cache sizes in the reuse distance histogram: by interval and by borders”. From top to bottom, the dialog contains following controls:

Font size of cache labels

controls the size in pixels of the "L1", "L2" etc. labels of the cache size in the histogram

Nr. of cache levels

controls the number of cache levels indicated

Highlight cache size interval/border

controls whether cache sizes are visualized by a colored background (interval, see first screenshot above), or by vertical lines at the cache size boundaries (borders, see second screenshot above).

Size of Level x

For each of the number of cache levels selected above, a slider is used to determine the size of the cache level. The size is expressed as the log2 of the reuse distance. On the right, the 'Choose color' button allows to select the color to be used for the background, when cache sizes are visualized by a colored background (see interval mode above).

ViewWrite cache sizes to file

pops up a file selector to save the cache size info to a file. Make sure to end the name of the files with '.cachesizes'

ViewRead cache sizes from file

pops up a file selector to load an earlier saved the cache size info.

Figure 3.2. Screenshot of two possible indications of cache sizes in the reuse distance histogram: by interval and by borders

Screenshot of two possible indications of cache sizes in the reuse distance histogram: by interval and by borders