[18.04] include support for Python bindings in "perf"

Bug #1707875 reported by bugproxy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Won't Fix
Medium
Canonical Kernel Team
linux (Ubuntu)
Invalid
Medium
Canonical Kernel Team
Bionic
Won't Fix
Medium
Canonical Kernel Team
Cosmic
Invalid
Medium
Canonical Kernel Team
Disco
Invalid
Medium
Canonical Kernel Team

Bug Description

== Comment: #0 - Paul A. Clarke <email address hidden> - 2017-07-26 09:59:57 ==
---Problem Description---
Request to build python bindings support with perf.

---Steps to Reproduce---
 Ubuntu-17.04# 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.

Userspace tool common name: perf

Userspace rpm: linux-tools-common

Userspace tool obtained from project website: na

== Comment: #2 - MAMATHA INAMDAR <email address hidden> - 2017-08-01 05:02:34 ==
After installing libpython, downloaded ubuntu 17.04 linux source code and compiled perf tool then it works fine.

# ./perf script -g python
generated Python script: perf-script.py

but when I run perf tool without rebuilding after installing libpython it shows an error

# 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.
root@p8wookie:/home/Mamatha/ubuntu/ubuntu-zesty/tools/perf# perf --version
perf version 4.10.17

== Comment: #3 - MAMATHA INAMDAR <email address hidden> - 2017-08-01 05:03:44 ==
Request to build python bindings support with perf.

bugproxy (bugproxy)
tags: added: architecture-all bugnameltc-156984 severity-medium targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → kernel-package (Ubuntu)
Manoj Iyer (manjo)
Changed in kernel-package (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: kernel-package (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in ubuntu-power-systems:
importance: Undecided → Medium
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-08-02 16:33 EDT-------
Any chance we could pull in this patch as well:

https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-August/161412.html

It's recent enough that it has not made it to mainline, but it's ppc64le-specific.

Manoj Iyer (manjo)
tags: added: triage-g
tags: added: triage-a
removed: triage-g
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-08-23 10:15 EDT-------
(In reply to comment #7)
> Any chance we could pull in this patch as well:
>
> https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-August/161412.html
>
> It's recent enough that it has not made it to mainline, but it's
> ppc64le-specific.

ping. Can we pull the above patch in as well, or shall I open a new request?

The commit is now in the linux "tip" tree:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py?id=6fae8663c9940bcaa9edd8e21a9ae0f562789a3d

bugproxy (bugproxy)
tags: added: targetmilestone-inin1710
removed: targetmilestone-inin---
Manoj Iyer (manjo)
Changed in linux (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Kernel Team (canonical-kernel-team)
tags: added: triage-r
removed: triage-a
Changed in linux (Ubuntu):
status: New → In Progress
Changed in linux (Ubuntu Zesty):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu):
assignee: Canonical Kernel Team (canonical-kernel-team) → Joseph Salisbury (jsalisbury)
Revision history for this message
Breno Leitão (breno-leitao) wrote : Re: include support for Python bindings in "perf"

Hello Canonical,

Any update about this bug? Will it make 17.10?

Thank you,
Breno

Revision history for this message
Manoj Iyer (manjo) wrote :

Breno, we were at a team sprint last week, we should be back on our regular office hours this week. please allow for a few days for an update on this bug.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-10-13 10:30 EDT-------
(In reply to comment #10)
> Breno, we were at a team sprint last week, we should be back on our regular
> office hours this week. please allow for a few days for an update on this
> bug.

Hello Canonical,

Please confirm following patch is also included or not
https://lists.ozlabs.org/pipermail/linuxppc-dev/2017-August/161412.html

Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: include support for Python bindings in "perf"

Commit 6fae866 did't land in mainline until v4.14-rc1 and it was not cc'd to stable, so it is not in any Ubuntu releases.

I'm in the process of investigating if we can re-enable python for perf. I did find a askubuntu page that talks about it:

https://askubuntu.com/questions/577768/how-can-i-make-perf-script-g-python-work

tags: added: targetmilestone-inin1804 triage-g
removed: targetmilestone-inin1710 triage-r
Revision history for this message
Manoj Iyer (manjo) wrote :

Breno, based on our discussion last week could we mark the milestone for this bug as 18.04? Based on Joe's investigation we could re-enable this feature in 18.04.

bugproxy (bugproxy)
tags: added: targetmilestone-inin1710
removed: targetmilestone-inin1804
Changed in ubuntu-power-systems:
status: New → In Progress
Manoj Iyer (manjo)
summary: - include support for Python bindings in "perf"
+ [18.04] include support for Python bindings in "perf"
Revision history for this message
Breno Leitão (breno-leitao) wrote :

Tes, let's target this one for 18.04.

no longer affects: linux (Ubuntu Zesty)
Changed in linux (Ubuntu Bionic):
status: In Progress → Triaged
assignee: Joseph Salisbury (jsalisbury) → nobody
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
tags: added: bionic
Changed in ubuntu-power-systems:
status: In Progress → Triaged
Manoj Iyer (manjo)
tags: added: triage-a
removed: triage-g
tags: added: kernel-key
Manoj Iyer (manjo)
Changed in linux (Ubuntu Bionic):
status: Triaged → Fix Committed
Changed in ubuntu-power-systems:
status: Triaged → Fix Committed
tags: added: kernel-da-key
removed: kernel-key
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2018-04-23 14:01 EDT-------
any progress on this? It's not in the 18.04 image I just installed.

tags: added: kernel-key
Revision history for this message
Manoj Iyer (manjo) wrote :

The patches identified here are already in bionic. However we have not enabled py bindings for perf in bionic. This has been the case since 13.04 days, and the reason for this is py (like 2.x vs 3.x) build dependencies, and it is unlikely that this support will be added going forward. jsalisbury (kernel team) is looking into this again to make sure that is still the case.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-04-24 11:41 EDT-------
(In reply to comment #18)
> we have not
> enabled py bindings for perf in bionic. This has been the case since 13.04
> days, and the reason for this is py (like 2.x vs 3.x) build dependencies,

Can you elaborate? I don't think the perf Python bindings supports Python 3.x (although I have seen recent patches to this effect... unlikely in distro-level kernel).

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-04-24 12:39 EDT-------
(In reply to comment #19)
> (In reply to comment #18)
> > we have not
> > enabled py bindings for perf in bionic. This has been the case since 13.04
> > days, and the reason for this is py (like 2.x vs 3.x) build dependencies,
>
> Can you elaborate? I don't think the perf Python bindings supports Python
> 3.x (although I have seen recent patches to this effect... unlikely in
> distro-level kernel).

Actually, suggestions to alleviate the concerns would be even more helpful. Would changes in perf be sufficient? (I presume changes in Python are not required.) What sort of changes? Thanks!

Revision history for this message
Adam Conrad (adconrad) wrote :

Python2 will not be maintained upstream past 2020, so a lack of python3 bindings certainly feels like a non-starter. As for why the kernel team decided to drop the python build-dep in 13.04, I'm not sure, and it's a conversation worth having.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-01 09:33 EDT-------
(In reply to comment #21)
> Python2 will not be maintained upstream past 2020, so a lack of python3
> bindings certainly feels like a non-starter. As for why the kernel team
> decided to drop the python build-dep in 13.04, I'm not sure, and it's a
> conversation worth having.

Python3 bindings are upstream: commit 66dfdff03d196e51322c6a85c0d8db8bb2bdd655 "perf tools: Add Python 3 support".

Given that this missed 18.04 LTS (and 17.10), the next logical target would be 18.10, which will not be supported into 2020. Is the lack of support for Python2 bindings in 2020 an issue for 18.10?

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Triaged
Changed in linux (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-06-12 08:29 EDT-------
What are the expectations for resolving this issue? Is there a plan?

Manoj Iyer (manjo)
Changed in ubuntu-power-systems:
status: Fix Committed → Triaged
Revision history for this message
Manoj Iyer (manjo) wrote :

After discussing with the kernel team they are holding their long standing position that python bindings will not be enabled for perf (also discussed in the comments below). I am marking this as won't fix.

Changed in linux (Ubuntu Bionic):
status: Triaged → Won't Fix
Changed in linux (Ubuntu):
status: Triaged → Won't Fix
Changed in ubuntu-power-systems:
status: Triaged → Won't Fix
bugproxy (bugproxy)
tags: added: targetmilestone-inin1804
removed: targetmilestone-inin1710
Manoj Iyer (manjo)
Changed in linux (Ubuntu):
status: Won't Fix → Triaged
Changed in ubuntu-power-systems:
status: Won't Fix → Triaged
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-07-17 02:12 EDT-------
I've observed the same issue on 18.04 as well. If we are not going to fix the bug for any reversion, do we need to document the unavailability of the feature?

Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: Triaged → Won't Fix
Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

Typically, the unavailability of a feature is not documented. Such documentation would difficult to keep up-to-date.

Changed in linux (Ubuntu Cosmic):
status: Triaged → Invalid
Changed in linux (Ubuntu Disco):
status: Triaged → Invalid
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-11-23 10:29 EDT-------
IBM Bugzilla status-> closed, won't fix be Canonical.

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.