opcontrol: command not found

Wanted to share how to use oprofile nowadays. Every tutorial on the Internet I found uses opcontrol, but, well…

$ sudo opcontrol --reset
sudo: opcontrol: command not found

Searching for package with the filename tells that opcontrol exists neither in Archlinux nor in Ubuntu. Perhaps the command just was renamed? Let’s search for an option of opcontrol in manuals:

$ man -k start-daemon
start-daemon: nothing appropriate.

I don’t know what happened, but the way it works now is through operf. E.g. sudo operf mycommand — or rather, since we don’t want to run the profiled app with elevated rights, just run the app, and connect operf to its pid, like sudo operf --pid=8888.

For some reason operf stay running even when the app exited, just press ^C to stop operf, it would create a profiling data, then you can use opreport as usual, like in tutorials.

Advertisements

Leave a Reply (Markdown is supported)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s