@@ -18,6 +18,7 @@ Then make sure to have `matplotlib`, `scipy` and `numpy` setup correctly:
18
18
apt-get install python3-pip
19
19
pip3 install matplotlib scipy numpy
20
20
```
21
+ You may need ` python3-gtk ` or similar package for displaying benchmark results.
21
22
22
23
To get good reproducibility it is important to make sure that the system runs in
23
24
` performance ` mode. This is achieved by running:
@@ -38,6 +39,26 @@ cmake -B/tmp/build -Sllvm -DLLVM_ENABLE_PROJECTS=libc -DCMAKE_BUILD_TYPE=Release
38
39
make -C /tmp/build -j display-libc-memcpy-benchmark-small
39
40
```
40
41
42
+ The display target will attempt to open a window on the machine where you're
43
+ running the benchmark. If this may not work for you then you may want ` render `
44
+ or ` run ` instead as detailed below.
45
+
46
+ ## Benchmarking targets
47
+
48
+ The benchmarking process occurs in two steps:
49
+
50
+ 1 . Benchmark the functions and produce a ` json ` file
51
+ 2 . Display (or renders) the ` json ` file
52
+
53
+ Targets are of the form ` <action>-libc-<function>-benchmark-<configuration> `
54
+
55
+ - ` action ` is one of :
56
+ - ` run ` , runs the benchmark and writes the ` json ` file
57
+ - ` display ` , displays the graph on screen
58
+ - ` render ` , renders the graph on disk as a ` png ` file
59
+ - ` function ` is one of : ` memcpy ` , ` memcmp ` , ` memset `
60
+ - ` configuration ` is one of : ` small ` , ` big `
61
+
41
62
## Benchmarking regimes
42
63
43
64
Using a profiler to observe size distributions for calls into libc functions, it
@@ -62,22 +83,6 @@ Benchmarking configurations come in two flavors:
62
83
_ <sup >1</sup > - The size refers to the size of the buffers to compare and not
63
84
the number of bytes until the first difference._
64
85
65
- ## Benchmarking targets
66
-
67
- The benchmarking process occurs in two steps:
68
-
69
- 1 . Benchmark the functions and produce a ` json ` file
70
- 2 . Display (or renders) the ` json ` file
71
-
72
- Targets are of the form ` <action>-libc-<function>-benchmark-<configuration> `
73
-
74
- - ` action ` is one of :
75
- - ` run ` , runs the benchmark and writes the ` json ` file
76
- - ` display ` , displays the graph on screen
77
- - ` render ` , renders the graph on disk as a ` png ` file
78
- - ` function ` is one of : ` memcpy ` , ` memcmp ` , ` memset `
79
- - ` configuration ` is one of : ` small ` , ` big `
80
-
81
86
## Superposing curves
82
87
83
88
It is possible to ** merge** several ` json ` files into a single graph. This is
0 commit comments