Skip to content

Instantly share code, notes, and snippets.

@GitMensch
Last active June 19, 2024 12:30
Show Gist options
  • Save GitMensch/b0021e3cfd0957eeed6fbb9ce2973d7d to your computer and use it in GitHub Desktop.
Save GitMensch/b0021e3cfd0957eeed6fbb9ce2973d7d to your computer and use it in GitHub Desktop.
# see https://github.com/gitpod-io/gitpod/issues/8893
sudo apt install -y bison flex libelf-dev libnewt-dev libdw-dev libaudit-dev libiberty-dev libunwind-dev libcap-dev libzstd-dev libnuma-dev libssl-dev python3-dev python3-setuptools binutils-dev gcc-multilib liblzma-dev systemtap-sdt-dev
# you _may_ need asciidoc, too; that's quite a big one
cd /workspace
git clone --depth 1 --filter=blob:none --sparse git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git
cd linux
git sparse-checkout set dir tools scripts
git fetch --depth 1 origin v5.15
make -C tools/perf
# either do a reasonable install or
PERF_EXEC_PATH=/workspace/linux/tools/perf PATH=/workspace/linux//tools/perf:$PATH perf stat list
@GitMensch
Copy link
Author

That's obviously not gitpod what this git is about... (in any case: ensure that you have the perf version matching best to your kernel version and possibly try to do a sparse checkout as in this gist, instead of a pre-packaged version).
The errors are about ISO C90 compat because the matching warning is set to an error - add ´-Wno-error=declaration-after-statement` to CFLAGS to work around that. ... but in any case: this is a specific gist, not stackoverflow....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment