Last active
June 19, 2017 10:11
-
-
Save blukat29/aed9cf8e7d260294576a5e690137d8cb to your computer and use it in GitHub Desktop.
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/sh | |
# IMPORTANT! | |
# Dont work in Linux 4.8.0 | |
# Works in Linux 4.4.0 | |
# http://halobates.de/blog/p/410 | |
sudo sh -c "echo 'kernel.kptr_restrict=0' >> /etc/sysctl.conf" | |
# https://superuser.com/questions/980632/run-perf-without-root-rights | |
sudo sh -c "echo 'kernel.perf_event_paranoid=1' >> /etc/sysctl.conf" | |
sudo sysctl -p | |
sudo apt-get install -y cmake yasm | |
mkdir -p pt | |
cd pt | |
git clone https://github.com/01org/processor-trace | |
cd processor-trace | |
mkdir build | |
cd build | |
cmake -DPTDUMP=ON -DPTTC=ON -DFEATURE_ELF=ON -DFEATURE_THREADS=ON .. | |
make | |
sudo cp bin/ptdump /usr/local/bin/ | |
# Test | |
sudo apt install linux-tools-common linux-tools-generic linux-tools-`uname -r` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment