Community
Participate
Working Groups
Build Identifier: I20110613-1736 As a bundler of linuxtools, and the Oprofile plug-in specifically, we would like to be able to add multiple launch configs for the Oprofile plug-in, in a similar fashion to what was done in Bug 353056. In our typical scenario there may be more than one Oprofile executable in addition to /usr/bin/opcontrol. We would like to have a simple mechanism to allow users to choose a specific location for Oprofile per project. This path can be either pre-configured or edited by the user. Reproducible: Always
(In reply to comment #0) > Build Identifier: I20110613-1736 > > As a bundler of linuxtools, and the Oprofile plug-in specifically, we would > like to be able to add multiple launch configs for the Oprofile plug-in, in a > similar fashion to what was done in Bug 353056. > > In our typical scenario there may be more than one Oprofile executable in > addition to /usr/bin/opcontrol. We would like to have a simple mechanism to > allow users to choose a specific location for Oprofile per project. This path > can be either pre-configured or edited by the user. > > Reproducible: Always What you mean is to use the path from 'Linux Tools Path', right? Like we did in the bug you mentioned?
(In reply to comment #1) > (In reply to comment #0) > > Build Identifier: I20110613-1736 > > > > As a bundler of linuxtools, and the Oprofile plug-in specifically, we would > > like to be able to add multiple launch configs for the Oprofile plug-in, in a > > similar fashion to what was done in Bug 353056. > > > > In our typical scenario there may be more than one Oprofile executable in > > addition to /usr/bin/opcontrol. We would like to have a simple mechanism to > > allow users to choose a specific location for Oprofile per project. This path > > can be either pre-configured or edited by the user. > > > > Reproducible: Always > > > What you mean is to use the path from 'Linux Tools Path', right? Like we did in > the bug you mentioned? Yes, exactly.
I wrote a patch for this enhancement, which is in my github tree at https://github.com/rafaelmt/linuxtools/tree/oprofile_path It basically piggy-backs on Otavio's commits for bug 353056 - "Add support for multiple Valgrind launch configs", getting the path for the linuxtools toolchain from the project's properties. There's an extra issue in Oprofile, which is dealing with the installation script that's required to run the plugin. This is how the patch works: If user doesn't change the path for the linuxtools' toolchain in the project properties page, the plugin will search for the link/wrapper created by one of the installation scripts and run it. In other words, if the user doesn't touch the path, the plugin will behave the same way it behaves now. If the user changes the path, the plugin will try to run opcontrol executable which is inside the given linuxtools path with sudo. For this to work, the user must add the opcontrol inside the path in the sudoers file. If user fails doing this, he will be prompted to do so by a popup.
Created attachment 208014 [details] Patch to change Linux Tools path for Oprofile
Created attachment 208016 [details] Minor fixes
Resolved in commits cba9b8bec9ddc7834969f649c06d5cd675ae01d5 and cccffee4b8128975dbad6d966e286147c08cdde2