-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
153 lines (127 loc) · 7.94 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
PYTHON ?= python2.7
PWD != pwd
UNAME != uname
WINDOW_SIZE ?= 200
STEADY_STATE_EXPECTED ?= 500
OUTLIER_THRESHOLD ?= 8
PLOTS_NO_CPTS = plots_w${WINDOW_SIZE}.pdf
PLOTS_WITH_CPTS = plots_w${WINDOW_SIZE}_changepoints.pdf
ifeq (${UNAME}, Linux)
JAVA_HOME = ${PWD}/work/openjdk/build/linux-x86_64-normal-server-release/images/j2sdk-image
JAVAC = ${PWD}/work/openjdk/build/linux-x86_64-normal-server-release/jdk/bin/javac
JAVA_INC = ${JAVA_HOME}/include/linux
GCC_LIB_DIR = ${PWD}/work/gcc-inst/lib64
endif
ifeq (${UNAME}, OpenBSD)
JAVA_HOME = ${PWD}/work/openjdk/build/bsd-x86_64-normal-server-release/images/j2sdk-image
JAVAC = ${PWD}/work/openjdk/build/bsd-x86_64-normal-server-release/jdk/bin/javac
JAVA_INC = ${JAVA_HOME}/include/openbsd
GCC_LIB_DIR = ${PWD}/work/gcc-inst/lib
endif
LIBKRUN_DIR=${PWD}/krun/libkrun
CC=${PWD}/work/gcc-inst/bin/zgcc
R_LD_LIBRARY_PATH=${PWD}/work/R-inst/lib/R/lib
all: build-benchmarks build-startup
@echo ""
@echo "============================================================"
@echo "Now run 'make bench-no-reboots' or 'make bench-with-reboots'"
@echo "If you want reboots, make sure you set up the init system!"
@echo "============================================================"
.PHONY: build-vms build-benchmarks build-krun build-startup bench clean
.PHONY: plot-warmup-results plot-warmup-outliers-by-threshold
.PHONY: plot-dacapo-results plot-octane-results
.PHONY: clean-benchmarks clean-krun clean-plots
build-vms:
./build.sh
build-benchmarks: build-krun
cd benchmarks && \
env LD_LIBRARY_PATH=${GCC_LIB_DIR} \
CC=${CC} JAVAC=${JAVAC} ${MAKE}
build-krun: build-vms
cd krun && env LD_LIBRARY_PATH=${GCC_LIB_DIR} CC=${CC} \
JAVA_CPPFLAGS='"-I${JAVA_HOME}/include -I${JAVA_INC}"' \
JAVA_LDFLAGS=-L${JAVA_HOME}/lib \
JAVAC=${JAVAC} ENABLE_JAVA=1 ${MAKE}
build-startup: build-krun
cd startup_runners && \
env LD_LIBRARY_PATH=${GCC_LIB_DIR} CC=${CC} \
JAVA_CPPFLAGS='"-I${JAVA_HOME}/include \
-I${JAVA_HOME}/include/linux"' \
JAVA_LDFLAGS=-L${JAVA_HOME}/lib \
JAVAC=${JAVAC} ENABLE_JAVA=1 ${MAKE}
bench-no-reboots:
${PYTHON} krun/krun.py warmup.krun
bench-with-reboots:
${PYTHON} krun/krun.py --hardware-reboots warmup.krun
bench-startup-no-reboots:
${PYTHON} krun/krun.py startup.krun
bench-startup-with-reboots:
${PYTHON} krun/krun.py --hardware-reboots startup.krun
bench-dacapo:
PYTHONPATH=krun/ JAVA_HOME=${JAVA_HOME} LD_LIBRARY_PATH=${GCC_LIB_DIR} ${PYTHON} extbench/rundacapo.py
bench-octane:
PYTHONPATH=krun/ LD_LIBRARY_PATH=${GCC_LIB_DIR}:${LIBKRUN_DIR} ${PYTHON} extbench/runoctane.py
plot-warmup-results:
warmup_stats/bin/mark_outliers_in_json -w ${WINDOW_SIZE} -t ${OUTLIER_THRESHOLD} warmup_results.json.bz2
warmup_stats/bin/mark_changepoints_in_json -s ${STEADY_STATE_EXPECTED} warmup_results_outliers_w${WINDOW_SIZE}.json.bz2
warmup_stats/bin/plot_krun_results --with-outliers -o warmup_${PLOTS_NO_CPTS} warmup_results_outliers_w${WINDOW_SIZE}.json.bz2
warmup_stats/bin/plot_krun_results --with-outliers --with-changepoints -o warmup_${PLOTS_WITH_CPTS} warmup_results_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
plot-warmup-outliers-by-threshold:
bin/calculate_outliers_by_threshold warmup_results.json.bz2
mv outliers_per_threshold.json.bz2 warmup_outliers_per_threshold.json.bz2
bin/plot_outliers_per_threshold warmup_outliers_per_threshold.json.bz2
# The following plotting targets assume that build_stats.sh has been used to
# install the necessary R and Python environment under 'work/'.
# Note: Graal is skipped on OpenBSD
plot-dacapo-results:
warmup_stats/bin/csv_to_krun_json -u "`uname -a`" -v HotSpot -l Java dacapo.hotspot.results
warmup_stats/bin/mark_outliers_in_json -w ${WINDOW_SIZE} -t ${OUTLIER_THRESHOLD} dacapo.hotspot.json.bz2
LD_LIBRARY_PATH=${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH} warmup_stats/bin/mark_changepoints_in_json -s ${STEADY_STATE_EXPECTED} dacapo.hotspot_outliers_w${WINDOW_SIZE}.json.bz2
warmup_stats/bin/plot_krun_results --wallclock-only --with-outliers -o dacapo.hotspot_${PLOTS_NO_CPTS} dacapo.hotspot_outliers_w${WINDOW_SIZE}.json.bz2
warmup_stats/bin/plot_krun_results --wallclock-only --with-outliers --with-changepoints -o dacapo.hotspot_${PLOTS_WITH_CPTS} dacapo.hotspot_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
if [ -e dacapo.graal.results ]; then \
warmup_stats/bin/csv_to_krun_json -u "`uname -a`" -v Graal -l Java dacapo.graal.results && \
warmup_stats/bin/mark_outliers_in_json -w ${WINDOW_SIZE} -t ${OUTLIER_THRESHOLD} dacapo.graal.json.bz2 && \
LD_LIBRARY_PATH=${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH} warmup_stats/bin/mark_changepoints_in_json -s ${STEADY_STATE_EXPECTED} dacapo.graal_outliers_w${WINDOW_SIZE}.json.bz2 && \
warmup_stats/bin/plot_krun_results --wallclock-only --with-outliers -o dacapo.graal_${PLOTS_NO_CPTS} dacapo.graal_outliers_w${WINDOW_SIZE}.json.bz2 && \
warmup_stats/bin/plot_krun_results --wallclock-only --with-outliers --with-changepoints -o dacapo.graal_${PLOTS_WITH_CPTS} dacapo.graal_outliers_w${WINDOW_SIZE}_changepoints.json.bz2; \
fi
# Note: Spidermonkey is skipped on OpenBSD
plot-octane-results:
warmup_stats/bin/csv_to_krun_json -u "`uname -a`" -v V8 -l JavaScript octane.v8.results
warmup_stats/bin/mark_outliers_in_json -w ${WINDOW_SIZE} -t ${OUTLIER_THRESHOLD} octane.v8.json.bz2
LD_LIBRARY_PATH=${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH} warmup_stats/bin/mark_changepoints_in_json -s ${STEADY_STATE_EXPECTED} octane.v8_outliers_w${WINDOW_SIZE}.json.bz2
warmup_stats/bin/plot_krun_results --with-outliers -o octane.v8_${PLOTS_NO_CPTS} octane.v8_outliers_w${WINDOW_SIZE}.json.bz2
warmup_stats/bin/plot_krun_results --with-outliers --with-changepoints -o octane.v8_${PLOTS_WITH_CPTS} octane.v8_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
if [ -e octane.spidermonkey.results ]; then \
warmup_stats/bin/csv_to_krun_json -u "`uname -a`" -v SpiderMonkey -l JavaScript octane.spidermonkey.results && \
warmup_stats/bin/mark_outliers_in_json -w ${WINDOW_SIZE} -t ${OUTLIER_THRESHOLD} octane.spidermonkey.json.bz2 && \
LD_LIBRARY_PATH=${R_LD_LIBRARY_PATH}:${LD_LIBRARY_PATH} warmup_stats/bin/mark_changepoints_in_json -s ${STEADY_STATE_EXPECTED} octane.spidermonkey_outliers_w${WINDOW_SIZE}.json.bz2 && \
warmup_stats/bin/plot_krun_results --wallclock-only --with-outliers -o octane.spidermonkey_${PLOTS_NO_CPTS} octane.spidermonkey_outliers_w${WINDOW_SIZE}.json.bz2 && \
warmup_stats/bin/plot_krun_results --wallclock-only --with-outliers --with-changepoints -o octane.spidermonkey_${PLOTS_WITH_CPTS} octane.spidermonkey_outliers_w${WINDOW_SIZE}_changepoints.json.bz2; \
fi
tables-warmup:
bin/table_classification_summaries_main -o warmup.table warmup_results.json.bz2
tables-dacapo-results:
warmup_stats/bin/table_classification_summaries_others -s 2 -o dacapo.table dacapo.graal_outliers_w${WINDOW_SIZE}_changepoints.json.bz2 dacapo.hotspot_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
tables-octane-results:
warmup_stats/bin/table_classification_summaries_others -s 2 -o octane.table octane.spidermonkey_outliers_w${WINDOW_SIZE}.json.bz2 octane.v8_outliers_w${WINDOW_SIZE}.json.bz2
clean: clean-benchmarks clean-krun clean-plots
rm -rf work
clean-benchmarks:
cd benchmarks && ${MAKE} clean
rm -rf extbench/octane/dacapo*.jar extbench/octane
clean-krun:
cd krun && ${MAKE} clean
clean-plots:
rm -f warmup_*.pdf
rm -f warmup_outliers_per_threshold.json.bz2
rm -f warmup_results_outliers_w${WINDOW_SIZE}.json.bz2 warmup_results_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
rm -f octane.v8_*.pdf octane.spidermonkey_*.pdf
rm -f octane.v8_outliers_w${WINDOW_SIZE}.json.bz2 octane.v8_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
rm -f octane.spidermonkey_outliers_w${WINDOW_SIZE}.json.bz2 octane.spidermonkey_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
rm -f dacapo_*.pdf
rm -f dacapo.graal_outliers_w${WINDOW_SIZE}.json.bz2 dacapo.graal_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
rm -f dacapo.hotspot_outliers_w${WINDOW_SIZE}.json.bz2 dacapo.hotspot_outliers_w${WINDOW_SIZE}_changepoints.json.bz2
clean-tables:
rm -f bencher*.table dacapo.table octane.table