Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ubuntu-dev] install perf #188

Open
jankeromnes opened this issue Apr 24, 2018 · 4 comments
Open

[ubuntu-dev] install perf #188

jankeromnes opened this issue Apr 24, 2018 · 4 comments

Comments

@jankeromnes
Copy link
Member

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.

@jankeromnes
Copy link
Member Author

Cc @whimboo

@jankeromnes
Copy link
Member Author

jankeromnes commented Apr 25, 2018

Building from source should be much better (no need for Ubuntu's broken script and kernel-specific packages, latest stable perf should work great with any kernel).

I'd also like to know if perf is actually useful for projects like Firefox, in which case we'd definitely want to install it.

@whimboo
Copy link

whimboo commented Apr 26, 2018

Might be worth asking in the mozilla.dev.platform mailing list.

@ishitatsuyuki
Copy link
Collaborator

On OVH1, you have to switch to the stock (non-OVH) kernel so we can install a correct version of perf tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants