Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Linux Tools Project/Profiling/Unification

{{#eclipseproject:technology.linux-distros}}

Linux Tools
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

The actions for running the profiling tools we have now (Oprofile, Perf, Valgrind, Systemtap, GProf, etc.) are presenting themselves in the Profile As menu by name. This can be really confusing as some of them (Valgrind, Systemtap) are capable of more than one type of profiling making it hard to guess what type of profiling would one do if e.g "Profile with Valgrind" is chosen.

In order to simplify that we are looking to extend the profiling framework we have with simplified UI for running profiling per the type of profiling and not per tool. The types of profiling identified for now are:

  • memory - Valgrind, Systemtap?
  • function - Systemtap(Callgraph), Valgrind(Callgrind)
  • timing - Oprofile, Perf, Systemtap?, GProf
  • codecoverage - GCov

Implementation

Option 1

We could create separate launch shortcuts for each type of profiling option (eg. Profile Memory, Profile function, etc.) . Each launch shortcut when launched through (Profile As -> Profile .. ) would check for the existence of a "provider" of that functionality. When we say "provider" it's likely that we'd be looking for a launch configuration that will have some attribute indicating it supports the appropriate type of profiling. For example, "Profile Memory" might return the launch configuration for Valgrind Massif. This configuration would then be launched which would in turn, launch the appropriate delegate as before. As a result we'll need to add an additional attribute to all plugin specific launch configurations that tells us what type of profiling they provide.

On a more detailed level, org.eclipse.linuxtools.profiling.launch.ProfilingLaunchShortcut:findLaunchConfiguration(..) is what returns an ILaunchConfiguration for all our profiling tools. This method just looks for any launch configuration whose type has a specific ID. For example, when the PerfLaunchShortcut is called, findLaunchConfiguration will return a launch configuration whose type has the ID : "org.eclipse.linuxtools.perf.launch.profile". This ID is defined in the Perf plugin's extention points, under LaunchConfigTypes. This is how our plugins provide their own launch configurations.

In the case of our proposed profiling menus, we could make a method similar to findLaunchConfiguration, but it would return a launch configuration whose type has an attribute that indicates it supports a particular type of profiling.

Back to the top