Created
August 9, 2019 18:30
-
-
Save psanford/ed89c98fb2036d452404d3dfae80bed8 to your computer and use it in GitHub Desktop.
build bpftrace on ubuntu 18.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
# from https://www.joyfulbikeshedding.com/blog/2019-01-31-full-system-dynamic-tracing-on-linux-using-ebpf-and-bpftrace.html | |
apt-get install -y clang-7 libclang-7-dev llvm-7 llvm-7-dev | |
apt-get install -y bison cmake flex g++ git libelf-dev zlib1g-dev libfl-dev | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD | |
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list | |
apt-get update | |
apt-get install -y bcc-tools libbcc-examples linux-headers-$(uname -r) | |
git clone https://github.com/iovisor/bpftrace | |
cd bpftrace | |
mkdir build && cd build | |
cmake -DCMAKE_BUILD_TYPE=DEBUG .. | |
make -j4 | |
sudo make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment