Features/EclipseProfilingTools

= Feature Name = Eclipse Profiling Tools

Summary
We aim to bring the Linux Tools OProfile and Valgrind integration for the Eclipse IDE to Fedora.

Owner

 * Name: Elliott Baron /  Kent Sebastian


 * Email: /

Current status

 * Targeted release: Fedora 11
 * Last updated: 2009-02-19
 * Percentage of completion: 100%

Detailed Description
The work being done upstream at eclipse.org is being driving by Fedora / Red Hat people. We are attempting to bring the power of various native profiling tools into the Eclipse IDE and integrate with the rest of the development environment. Our target audience is people developing with and for Linux distributions. The first group we are targetting is native application developers programming in C and C++.

Benefit to Fedora
This functionality will enhance our development environment, enabling developers who are familiar with integrated development environments to more easily move to Linux. Fedora remains at the forefront of Linux distributions containing Eclipse technology and this will enable us to continue to lead in this area.

Scope
Upstream development, testing, releases, packaging for Fedora. This feature is isolated and has nothing that depends upon it.

How To Test
We have unit tests and release tests upstream. We will package upstream releases directly and verify that test results match. Once we have releases and packages, we will put instructions here describing how package users can verify the test results against their installed packages. We will also post a simple set of steps one can follow to verify that the functionality is present and working.

Unit Testing

 * 1) Install eclipse-valgrind package and dependencies
 * 2) * There is an obvious dependency on Valgrind which is only available on x86/x86_64 and ppc/ppc64
 * 3) Install eclipse-subclipse if it is not already installed
 * 4) Download this Project Set File
 * 5) In org.eclipse.linuxtools.valgrind.memcheck.tests and org.eclipse.linuxtools.massif.tests, right click on AllTests.java and select Run As -> JUnit Plug-in Test
 * 6) All tests should pass

Manual Testing

 * 1) Using a new or existing C/C++ project, right click it in the Project Explorer view and select Profile As -> Profile With Valgrind
 * 2) * You can use [[Media:valgrind-test-projects.zip|these]] simple test projects. Import them via File->Import->General->Existing Projects into Workspace->Select archive file
 * 3) The Valgrind View should appear after execution finishes, if there are any memory management errors, they will appear inside of it.
 * 4) For further testing, right click the project again in the Project Explorer view and select Profile As -> Profile Configurations
 * 5) Choose the Valgrind run configuration just created and select the "Valgrind Options" tab
 * 6) Select the "Tool to run" drop-down, memcheck and massif should be listed, select massif and click "Profile"
 * 7) The Valgrind View should appear after execution finishes, tabular heap allocation data should be shown in it. Also a line chart of this data should appear as the active editor.

Unit Testing

 * 1) Install eclipse-oprofile package and dependencies
 * 2) * There is an obvious dependency on OProfile
 * 3) Install eclipse-subclipse if it is not already installed
 * 4) Download this Project Set File
 * 5) In org.eclipse.linuxtools.oprofile.core.tests, right click on AllCoreTests.java and select Run As -> JUnit Plug-in Test
 * 6) All tests should pass

Manual Testing

 * 1) Using a new or existing C/C++ project, right click it in the Project Explorer view and select Profile As -> Profile With OProfile
 * 2) * You can use [[Media:Eclipse-oprofile_testproj.zip|this]] project to test the default setup. Import it via File->Import->General->Existing Projects into Workspace->Select archive file
 * 3) The OProfile View should appear after execution finishes, with contents similar to this screenshot (with only 1 event, most likely GLOBAL_POWER_EVENTS or CPU_CLK_UNHALTED)
 * 4) For further testing, right click the project again in the Project Explorer view and select Profile As -> Profile Configurations
 * 5) Choose the OProfile run configuration for the project previously profiled, or create a new one by double-clicking on "Profile With OProfile" and filling in the required fields
 * 6) Click on the "Events" tab, and select a different configuration of events, click profile
 * 7) Verify that the selected events are displayed
 * 8) * note that not all programs will elicit samples for all events, it is possible that no samples will be shown for the selected events
 * 9) Double-click on a 'sample' (bottom-most node) for a binary with available source; verify that it opens the file in an editor and sets the cursor at the appropriate line

Valgrind
Screenshots of Valgrind plugins in action: Video screencasts of the plugin in action: here and here

OProfile
Screenshot: Video screencast of the plugin in action: here

Dependencies
We will need to review EMF, create packages for BIRT (and potentially some of its dependencies should we decide to package more than just the charting framework we need for Valgrind), and create packages for the 3 Linux Tools projects this feature encompasses: the profiling framework (not end-user visible but necessary for the other two), OProfile functionality, and Valgrind functionality. Due to timeline differences between Fedora 11 and Eclipse 3.5 (May and June respectively), we will most likely continue with Eclipse 3.4.x in Fedora 11 and thus won't depend upon other features.

Contingency Plan
Continue without such functionality in the distro.

Documentation
www.eclipse.org/linuxtools

Release Notes

 * FESCo requested that this be fixed ASAP on 2009-02-27

Comments and Discussion

 * See Talk:Features/EclipseProfilingTools