Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Linux Tools Project/Profiling/User Guide

< Linux Tools Project
Revision as of 14:39, 6 September 2012 by Unnamed Poltroon (Talk) (New page: = Introduction = The Linux Tools project provides a number of tools to profile a C/C++ application. For example, the Valgrind plug-in provides the ability to profile an application's mem...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

The Linux Tools project provides a number of tools to profile a C/C++ application. For example, the Valgrind plug-in provides the ability to profile an application's memory usage while the Perf plug-in allows an end-user to get the amount of time taken in various functions. Each tool contributes a profiling launch configuration that can be used to directly select an individual tool. There, an end-user can set optional parameters, the executable being run, arguments passed to the executable, etc... For details on how to do this, see the appropriate user-guide for the profiling plug-in of interest.

To simplify usage for end-users who are not so familiar with the individual tools, a set of launch short-cuts have been provided that are based on the categories of profiling tasks desired. At present there are the following categories:

  1. Snapshot - this measure the amount of time taken in functions and methods
  2. Memory - this profiles heap/stack/cache usage for an application
  3. Coverage - this measures how much of the code gets exercised in a run

To that end, there may be multiple plug-ins that fall into an individual category. For example, Linux Tools provides the OProfile plug-in, the GProf plug-in, and the Perf plug-in. All of these provide timing profiling support. A plug-in may support multiple tools or options that fall into the same category. The Linux Tools Valgrind plug-in supports the Valgrind Memcheck, Massif, Cachegrind, and Helgrind tools. Each is different, but would ultimately fall into the Memory category.

Thus, a default mechanism is used to determine which profiling tool is ultimately used for a profiling launch short-cut. The short-cut includes which tool is used plus a set of default settings.

At installation, each Linux Tools profiling tool contributes to at least one of the profiling categories a profiling launch short-cut. The short-cuts are prioritized and this allows Eclipse to determine which short-cut should be set up as a default choice. The setting is customizable via the 'Preferences' view. This view can be accessed via the 'Window -> Preferences' menu item.

In the 'Preferences' dialog, under the 'Profiling' category is a list of the supported categories currently contributed by Linux Tools plug-ins. Each category creates a Preference page that has a set of radio buttons for each of the contributed profiling short-cuts. The first time opening this page will have the default selected. If there is more than one choice, the end-user may select whatever profiling short-cut is desired.

For example, the default for Memory profiling is using the Valgrind Memcheck tool which validates heap function calls (e.g. finds memory leaks and invalid usage of freed memory). An end-user may rather default memory profiling to use the Valgrind Massif tool which simply tracks heap usage for the lifetime of the application.

Back to the top