operf not enabled on P9

Bug #1705517 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Fix Released
High
Canonical Foundations Team
oprofile (Ubuntu)
Fix Released
Undecided
Ubuntu on IBM Power Systems Bug Triage

Bug Description

---Problem Description---
The tool Operf (distro) not enebled on P9. gives error "Unable to obtain cpu_type"

---uname output---
Linux perfbos12 4.10.0-25-generic #29~16.04.1-Ubuntu SMP Tue Jun 20 15:49:09 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux

Machine Type = product: 9006-22C serial: 1302NDA width: 64 bits, P9

---Steps to Reproduce---
 guest@perfbos12:~$ sudo operf
Unable to obtain cpu_type
Verify that a pre-1.0 version of OProfile is not in use.
If the /dev/oprofile/cpu_type file exists, locate the pre-1.0 OProfile
installation, and use its 'opcontrol' command, passing the --deinit option.
Unable to ascertain cpu type. Exiting.
guest@perfbos12:~$

Userspace tool common name: operf

With the downloaded latest opprofile source code the cpu_type issue is not seen

guest@perfbos12:~/oprofile/pe_profiling$ sudo ./operf --version
./operf: oprofile 1.2.0git compiled on Jul 12 2017 04:05:47
guest@perfbos12:~/oprofile/pe_profiling$

However i could not able to run operf and collect profiling data

guest@perfbos12:~/oprofile/pe_profiling$ sudo ./operf -e PM_RUN_CYC:3000000 -g -s
sh: 1: /usr/local/bin//ophelp: not found
Error retrieving info for event PM_RUN_CYC:3000000
Note: When doing callgraph profiling, the sample count must be
15 times the minimum count value for the event.
guest@perfbos12:~/oprofile/pe_profiling$

This command works on P8 but fails on P9

Following two commits are fixed by Will Schmidt,

f5a8f00559e030fd874ab4e046814d638343b054
ce5842f112d155a7148a44a7863cf4355c1385e0

I'm attaching the debdiff containing both patches that add support for Power9. Note that it still missing the LP ID.

I tested the oprofile package from my PPA in a Power9 machine (ltc-wspoon3 machine with Ubuntu 16.04.2) and it worked fine to profile and report samples.

Revision history for this message
bugproxy (bugproxy) wrote : oprofile.debdiff

Default Comment by Bridge

tags: added: architecture-ppc64 bugnameltc-156547 severity-high targetmilestone-inin16043
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → oprofile (Ubuntu)
Revision history for this message
bugproxy (bugproxy) wrote : oprofile_power9.debdiff

------- Comment on attachment From <email address hidden> 2017-07-20 13:42 EDT-------

I'm sending a debdiff that adds support for Power9 in Oprofile. It was tested by me and William Schmidt and seems to be working fine.

If anyone else want to test the package too, it is available in my PPA at: https://launchpad.net/~rgdoliveira/+archive/ubuntu/oprofile

Revision history for this message
bugproxy (bugproxy) wrote : oprofile.debdiff

Default Comment by Bridge

Revision history for this message
Frank Heimes (fheimes) wrote :

oprofile is a universe package

Changed in ubuntu-power-systems:
importance: Undecided → High
Revision history for this message
Frank Heimes (fheimes) wrote :

This package / The package <xyz> is part of the universe section of the Ubuntu archive. Universe packages are maintained by the community, and the maintainers do not necessarily work for Canonical, therefore these packages are not always supported directly by Canonical.
The existing process to update packages in the Universe archive with patches, is as follows:
Upstream: Upstream your fix to the appropriate upstream project.
Debian: once your patch is ack’ed and accepted upstream, you need to request a merge of this patch to the package in Debian stable. https://www.debian.org/Bugs/Reporting use this link to report your issue and submit a fix.
Ubuntu: Once it is merged into Debian stable, request a merge of this package with Ubuntu. https://wiki.ubuntu.com/Debian/Bugs will provide you an overview on how to handle bugs that are reported to Debian and subsequently to Ubuntu.
- The merge request lands by default in Ubuntu's current development release (today ‘Artful’).
- If required an SRU may follow to get the changes into already released Ubuntu versions (like ‘Xenial’ or ‘Zesty’).
Work with the respective upstream maintainers (Debian and Ubuntu) is required during this process. For critical issues we can advise you as you go through this process and help push the patches through by chasing the appropriate project contributors.
[To find out if a package is a universe package use: apt policy <package-name>.]

If looking for package maintainers (or in the changelog for the last recent developers) you may go here: http://packages.ubuntu.com/

tags: added: triage-g
Revision history for this message
bugproxy (bugproxy) wrote :

Default Comment by Bridge

Revision history for this message
Breno Leitão (breno-leitao) wrote :

Hi Frank,

Regarding your points, here are some answers:

1) These patches were already accepted upstream

2) Debian does not have oprofile anymore. Roberto is working to try to push it there, but it may take a while.

That said, should we ask the Ubuntu community to help with this request?

Manoj Iyer (manjo)
Changed in ubuntu-power-systems:
assignee: nobody → Canonical Foundations Team (canonical-foundations)
Revision history for this message
bugproxy (bugproxy) wrote :

Default Comment by Bridge

Revision history for this message
bugproxy (bugproxy) wrote : oprofile_power9.debdiff

------- Comment on attachment From <email address hidden> 2017-07-20 13:42 EDT-------

I'm sending a debdiff that adds support for Power9 in Oprofile. It was tested by me and William Schmidt and seems to be working fine.

If anyone else want to test the package too, it is available in my PPA at: https://launchpad.net/~rgdoliveira/+archive/ubuntu/oprofile

bugproxy (bugproxy)
tags: added: severity-critical
removed: severity-high
Manoj Iyer (manjo)
tags: added: triage-a
removed: triage-g
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package oprofile - 1.2.0-0ubuntu1

---------------
oprofile (1.2.0-0ubuntu1) artful; urgency=medium

  * New upstream release.
    - Adds POWER9 support. LP: #1705517.
    - Recognizes POWER8NV and POWER8NVL variants. LP: #1667474.
  * Remove obsolete patches.
  * Don't suggest the removed oprofile-gui package. LP: #1627159.

 -- Matthias Klose <email address hidden> Mon, 21 Aug 2017 16:39:35 +0200

Changed in oprofile (Ubuntu):
status: New → Fix Released
Changed in ubuntu-power-systems:
status: New → Fix Released
tags: added: triage-g
removed: triage-a
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-08-22 17:04 EDT-------
(In reply to comment #34)
> This bug was fixed in the package oprofile - 1.2.0-0ubuntu1
>
> ---------------
> oprofile (1.2.0-0ubuntu1) artful; urgency=medium
>
Great, thanks! Could this package update also be applied for the 16.04.3 Zesty hwe release as well?

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-09-18 12:13 EDT-------
(In reply to comment #35)
> (In reply to comment #34)
> > This bug was fixed in the package oprofile - 1.2.0-0ubuntu1
> >
> > ---------------
> > oprofile (1.2.0-0ubuntu1) artful; urgency=medium
> >
> Great, thanks! Could this package update also be applied for the 16.04.3
> Zesty hwe release as well?

Actually 17.10 is fine, thanks!

Frank Heimes (fheimes)
tags: added: universe
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.