perf doesn't work on -pae-kernels [patch proposal]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Low
|
Andy Whitcroft | ||
Lucid |
Fix Released
|
Low
|
Unassigned | ||
Maverick |
Fix Released
|
Low
|
Andy Whitcroft |
Bug Description
SRU Justification
Justification: by default the perf command will not work correctly on any flavour which contains a - in its name
Impact: unable to use the perf command to debug applications when using generic-paeetc
Fix Description: change flavour removal to work with all flavours through use of the known shape version number
Risks: low, this only changes the perf wrapper which has been tested with all known flavours
TEST CASE: attempt to use perf on a generic-pae install note it fails, install patch, note it now works as expected
===
Binary package hint: linux-tools-common
linux-tools-common contains a small redirection-script (/usr/bin/perf), for dispatching to the perf-version corresponding to the running kernel.
This script uses basically ${`uname -r`%-*} to figure the running kernel version, where %-* strips the last dash-delimited component of the kernel name. This breaks for -generic-pae.
Examples of uname "-r":
2.6.32-19-generic # Works today
2.6.32-
A proposed solution could be to instead use "%%-[a-z-]*", which would remove ALL trailing letters, and dashes, up to the last digit in the string (the package-
However, since I don't know kernel-release names for other architectures, it needs to be verified first.
Suggested new perf, change only on line 3
----------------
#!/bin/bash
version=`uname -r`
version=
exec "perf_$version" "$@"
description: | updated |
Changed in linux (Ubuntu Lucid): | |
importance: | Undecided → Low |
status: | New → Fix Committed |
Changed in linux (Ubuntu Maverick): | |
milestone: | none → maverick-alpha-2 |
Changed in linux (Ubuntu Maverick): | |
status: | Fix Committed → Fix Released |
Would you mind attaching your fix in patch form? Thanks in advance.