Skip to content

Commit

Permalink
build perf with support for bpf
Browse files Browse the repository at this point in the history
  • Loading branch information
harp-intel committed Dec 9, 2024
1 parent 8d60a47 commit 8bdf10b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ PERF_LINUX_VERSION := 6.1.52
perf:
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-$(PERF_LINUX_VERSION).tar.xz
tar -xf linux-$(PERF_LINUX_VERSION).tar.xz && mv linux-$(PERF_LINUX_VERSION)/ linux_perf/
cd linux_perf/tools/perf && make LDFLAGS="-static --static"
cd linux_perf/tools/perf && make LDFLAGS="-static --static" BUILD_BPF_SKEL=1 NO_JVMTI=1

spectre-meltdown-checker:
ifeq ("$(wildcard spectre-meltdown-checker)","")
Expand Down
16 changes: 12 additions & 4 deletions tools/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@
# build output oss_source* will be in workdir
# build image (from project root directory):
# $ docker build -f tools/build.Dockerfile --tag perfspect-tools:$TAG ./tools
FROM ubuntu:18.04 AS builder
FROM ubuntu:22.04 AS builder
ENV http_proxy=${http_proxy}
ENV https_proxy=${https_proxy}
ENV LANG=en_US.UTF-8
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y apt-utils locales wget curl git netcat-openbsd software-properties-common jq zip unzip
RUN locale-gen en_US.UTF-8 && echo "LANG=en_US.UTF-8" > /etc/default/locale
RUN add-apt-repository ppa:git-core/ppa -y
RUN apt-get update && apt-get install -y git build-essential autotools-dev automake \
gawk zlib1g-dev libtool libaio-dev libaio1 pandoc pkgconf libcap-dev docbook-utils \
libreadline-dev default-jre default-jdk cmake flex bison libssl-dev
RUN apt-get update && apt-get install -y \
automake autotools-dev binutils-dev bison build-essential clang cmake debuginfod \
default-jdk default-jre docbook-utils flex gawk git libaio-dev libaio1 \
libbabeltrace-dev libbpf-dev libc6 libcap-dev libdw-dev libdwarf-dev libelf-dev \
libiberty-dev liblzma-dev libnuma-dev libperl-dev libpfm4-dev libreadline-dev \
libslang2-dev libssl-dev libtool libtraceevent-dev libunwind-dev libzstd-dev \
libzstd1 llvm-13 pandoc pkgconf python-setuptools python2-dev python3 python3-dev \
python3-pip systemtap-sdt-dev zlib1g-dev

RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
ENV PATH="${PATH}:/usr/lib/llvm-18/bin"

ENV JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64

Expand Down

0 comments on commit 8bdf10b

Please sign in to comment.