-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.other
More file actions
124 lines (99 loc) · 3.89 KB
/
Dockerfile.other
File metadata and controls
124 lines (99 loc) · 3.89 KB
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
FROM debian:bullseye
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && apt-get -y install tzdata
# base
RUN apt-get update \
&& apt-get install -y build-essential \
gcc \
g++ \
gdb \
make \
ninja-build \
cmake \
autoconf \
automake \
libtool \
locales-all \
dos2unix \
rsync \
tar \
python3 \
python3-dev \
python3-pip \
&& apt-get clean
RUN apt-get update \
&& apt-get install -y git vim \
&& apt-get clean
RUN apt-get update \
&& apt-get install -y tar wget \
&& apt-get clean
# clang15
RUN mkdir -p /app/llvm15
RUN git clone https://github.com/llvm/llvm-project /app/llvm15
WORKDIR /app/llvm15
RUN git checkout e758b77161a7
RUN mkdir -p /app/llvm15/build
WORKDIR /app/llvm15/build
RUN cmake -DLLVM_TARGET_ARCH="X86" -DLLVM_TARGETS_TO_BUILD="ARM;X86;AArch64" \
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS="clang;openmp" -DLLVM_ENABLE_RTTI=ON -G "Unix Makefiles" ../llvm
RUN make -j$(nproc)
RUN cmake -DCMAKE_INSTALL_PREFIX=/app/llvm15/build -P cmake_install.cmake
RUN cmake -DCMAKE_INSTALL_PREFIX=/app/llvm15/build -P /app/llvm15/build/projects/openmp/cmake_install.cmake
# wllvm
RUN pip3 install wllvm
# parsec dependencies
RUN apt-get update \
&& apt-get install -y libx11-dev libxext-dev libxt-dev libxmu-headers x11proto-input-dev libxi-dev pkg-config gettext libxmu-dev\
&& apt-get clean
# use bash
SHELL ["/bin/bash", "-ec"]
# install monitor dependency
RUN apt-get update && apt-get install -y time ruby-full curl && apt-get clean
# copy semalloc
RUN mkdir /app/semalloc
COPY . /app/semalloc
# build semalloc frontend
RUN mkdir -p /app/semalloc/frontend/build
WORKDIR /app/semalloc/frontend/build
RUN LLVM_DIR=/app/llvm15/build/lib/cmake/llvm cmake ..
RUN make -j6
# build semalloc backend
RUN mkdir -p /app/semalloc/backend/build
WORKDIR /app/semalloc/backend/build
RUN LLVM_DIR=/app/llvm15/build/lib/cmake/llvm cmake -DGLIBC_OVERRIDE=ON ..
RUN make -j6
# mimalloc
WORKDIR /app
RUN git clone https://github.com/daanx/mimalloc-bench
# install mimalloc dependency
WORKDIR /app/mimalloc-bench
RUN apt-get update \
&& apt-get install -y fonts-urw-base35 lib32gcc-s1 lib32stdc++6 libavahi-client3 \
libavahi-common-data libavahi-common3 libc6-i386 libcups2 \
libdbus-1-3 libffi-dev libgc1 libgs9 libgs9-common libsnappy-dev \
libidn11 libijs-0.35 libjbig2dec0 liblcms2-2 libncurses-dev libgflags-dev \
libobjc-10-dev libobjc4 libopenjp2-7 libpaper1 libpfm4 libsnappy1v5 \
libz3-4 libz3-dev poppler-data python3-pygments python3-yaml bsdmainutils \
&& apt-get clean
# overwrite cmake
RUN cp /app/semalloc/benchmark/assets/CMakeLists.txt.mimalloc /app/mimalloc-bench/bench/CMakeLists.txt
RUN cp /app/semalloc/benchmark/assets/sh8bench.patch /app/mimalloc-bench/bench/shbench/sh8bench.patch
RUN cp /app/semalloc/benchmark/assets/build-bench-env.sh /app/mimalloc-bench/build-bench-env.sh
RUN cp /app/semalloc/benchmark/assets/bench.sh /app/mimalloc-bench/bench.sh
# mimalloc compile and convert
RUN mkdir -p /app/semalloc/test/input
RUN /app/semalloc/benchmark/assets/mimalloc_build.rb
# clone memory allocators
RUN mkdir -p /app/markus
RUN mkdir -p /app/ffmalloc
RUN mkdir -p /app/markus && git clone http://github.com/SamAinsworth/MarkUs-sp2020.git /app/markus
RUN mkdir -p /app/ffmalloc && git clone http://github.com/bwickman97/ffmalloc.git /app/ffmalloc
# build them
WORKDIR /app/markus/bdwgc-markus
RUN ./autogen.sh
RUN ./configure --prefix=/app/markus --enable-redirect-malloc --enable-threads=posix --disable-gc-assertions --enable-thread-local-alloc --enable-parallel-mark --disable-munmap --enable-cplusplus --enable-large-config --disable-gc-debug
RUN make install
WORKDIR /app/ffmalloc
RUN make
# parsec output
RUN mkdir -p /app/semalloc/output/