perf is not built with python script support

Bug #1891269 reported by Trent Lloyd
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The "perf" tool supports python scripting to process events, this support is currently not enabled.

$ sudo perf script -g python
Python scripting not supported. Install libpython and rebuild perf to enable it.
For example:
  # apt-get install python-dev (ubuntu)
  # yum install python-devel (Fedora)
  etc.

The expected behaviour is that the script creates a template python file for you to modify to process the events.

From what I can see enabling this requires a few items
- We need to Build-Depend on python3-dev
- We would ship the perf-script-python binary
- There are various python modules (under tools/perf/scripts/python) needed for these to work
- There are also a number of upstream scripts (e.g. 'net_dropmonitor') we could ship, normally you can see those by running 'perf script -l' but we get "open(/usr/libexec/perf-core/scripts) failed. Check "PERF_EXEC_PATH" env to set scripts dir.". Expected output can be seen by running "PERF_EXEC_PATH=LINUX_SOURCE_PATH/tools/perf ./perf script -l"

While not important to me personally, it also doesn't have support for perl that could be fixed in a similar way, in case we want to fix that at the same time. It doesn't have as many pre-existing scripts though and seems less likely to be as useful compared to the Python version.

$ sudo perf script -g perl
Perl scripting not supported. Install libperl and rebuild perf to enable it.
For example:
  # apt-get install libperl-dev (ubuntu)
  # yum install 'perl(ExtUtils::Embed)' (Fedora)
  etc.

Tags: seg
Trent Lloyd (lathiat)
tags: added: seg
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1891269

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Trent Lloyd (lathiat) wrote :

Logs are not required for this issue

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.