6.3. Selective Instrumentation

C, C++ and Fortran programs have several selective instrumentation options in Eclipse. The selective instrumentation sub-menu of the right click menu provided by C/C++ and Fortran projects, source files and routines in the C/C++ and program outline views allows inclusion, exclusion and loop level instrumentation to be specified for each of these objects. You may also clear instrumentation specified for each of these levels from the selective instrumentation menu.

The source editor's context menu allows the insertion of interval and atomic user defined events. To specify an atomic user defined event, place the cursor on the line where you want the event to trigger, right click, go to the Selective Instrumentation sub-menu and select Insert TAU Atomic User Defined Event. Put the name you wish to associate with the event in the first context window that appears. Put either a numeric constant or the name of a valid numeric variable in the second window.

Figure 6.3. Optional User Defined Events

Optional User Defined Events

To specify an interval based user defined event, select the source code you wish to be included in the interval, right click, go to the Selective Instrumentation sub-menu and select Insert TAU Interval (start/stop) User Defined Event. You may select use of a Static Timer, Dynamic Timer, Static Phase or Dynamic Phase event. Note that to get phase data you must select a Tau makefile configured with the -PROFILEPHASE option. Once you have selected the event type you will be prompted to enter a name for the event.

Figure 6.4. Adding User Defined Events

Adding User Defined Events

All selective instrumentation options are placed in the tau.selective file in your project's main directory. This file is automatically employed when the Tau launch configuration has "internal" selective instrumentation selected. You may safely edit this file manually so long as it remains a valid Tau selective instrumentation file.