| Summary: | Implementation of method that obtains unit mask type does so incorrectly, but could more easily be implemented with "ophelp -X" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Corey Ashford <cjashfor> | ||||
| Component: | LinuxTools | Assignee: | Roland Grunberg <rgrunber> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | kksebasti, wainersm | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Corey Ashford
This functionality made it into oprofile upstream as commit f3c4ab9d2a9bc3aa2236ee3763ad1a39ba190686 (I was aware of the issues surrounding unit mask types and wanted ophelp to provide this functionality). This is newin 0.9.7 but I think it's worth having as opposed to relying on the reading various files manually. Thanks for the bug report. (In reply to comment #1) > This functionality made it into oprofile upstream as commit > f3c4ab9d2a9bc3aa2236ee3763ad1a39ba190686 (I was aware of the issues surrounding > unit mask types and wanted ophelp to provide this functionality). This is newin > 0.9.7 but I think it's worth having as opposed to relying on the reading > various files manually. Thanks for the bug report. I talked with one of the OProfile maintainers today (Maynard Johnson - mpjohn@us.ibm.com), and as a result I think that it might be a good idea to switch to using the output of "ophelp -X" exclusively. On older systems (e.g. SLES 10), ophelp -X will simply generate an error, because the -X option is not supported at all. However, we should be able to detect this from inside of the plug-in and issue an error that the user needs to upgrade his oprofile to a newer version. The maintainer says that the oprofile kernel ABI hasn't changed in a very long time, so you should be able to download the latest oprofile source from sourceforge and build it, producing new ophelp and opcontrol executables, which by default will install in /usr/local/bin. Of course, this means that the location of the op* tools has to be configurable! If plug-in runs ophelp -X and notes that the schemaversion is not 1.1 or higher, it can tell the user that they need a newer version of oprofile installed. If the schemaversion is 1.1 or higher, you can expect that the category attribute will be present in the ophelp -X output. I have a proposed patch I'm testing out but I'm not sure sure about dropping the functionality that looks inside /usr/share/oprofile. I'd rather have that around for those using an older version of oprofile installed on the standard path. Created attachment 208691 [details]
Patch
This looks like a good solution to me. Thanks! Committed as 4b28814587e8faf1943acbb18e17a78508034d15. Resolving as fixed. |