Skip to content

[ubuntu-dev] install perf #188

@jankeromnes

Description

@jankeromnes

Installing Linux's perf tool could be useful to benchmark various software.

I was able to install it in a container by doing this:

sudo apt-get update -q
sudo apt-get install -qy linux-tools-generic
cd /usr/lib/linux-tools
cd `ls -1 | head -n1`
sudo rm -f /usr/bin/perf
sudo ln -s `pwd`/perf /usr/bin/perf

Note: By default, apt installs a dumb bash script in /usr/bin/perf which totally fails to find the perf binary that was installed at the same time. This is why I replace it with a direct symbolic link (also, I pick the first available folder in /usr/lib/linux-tools, which is a bit hacky).

Alternatively, we may want to build and install a more recent perf from source (it's fairly easy, and we have to hack Ubuntu's installation anyway).

Also maybe it would be cleaner to add the installed linux-tools folder to the path instead of creating a symlink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions