IBM Books

Operation and Use, Volume 2, Part 2 Profiling


Appendix B. Customizing Tool Resources

You can customize certain features of an X-Window. For example, you can customize its colors, fonts, orientation, and so on. This section lists each of the resource variables you can set for Xprofiler.

You may customize resources by assigning a value to a resource name in a standard X-Windows format. Several resource files are searched according to the following X-Windows convention:

/usr/lib/X11/$LANG/app-defaults/file_name
 
/usr/lib/X11/app-defaults/file_name
 
$XAPPLRESDIR/file_name
 
$HOME/.Xdefaults

Where file_name is Xprofiler. Options in the .Xdefaults file take precedence over entries in the preceding files. This allows you to have certain specifications apply to all users in the app-defaults file as well as user specific preferences set for each user in their $HOME/.Xdefaults file.

You customize a resource by setting a value to a resource variable associated with that feature. You store these resource settings in a file called .Xdefaults in your home directory. You can create this file on a server, and so customize a resource for all users. Individual users may also want to customize resources. The resource settings are essentially your own personal preferences as to how the X-Windows should look.

For example, consider the following resource variables for a hypothetical X-Windows tool:

TOOL*MainWindow.foreground:
 
TOOL*MainWindow.background:

In this example, say the resource variable TOOL*MainWindow.foreground controls the color of text on the tool's main window. The resource variable TOOL*MainWindow.background controls the background color of this same window. If you wanted the tool's main window to have red lettering on a white background, you would insert the following lines into the .Xdefaults file.

TOOL*MainWindow.foreground:    red
 
TOOL*MainWindow.background:    white

Customizable resources and instructions for their use for Xprofiler are defined in /usr/lib/X11/app-defaults/Xprofiler, as well as /usr/lpp/ppe.xprofiler/defaults/Xprofiler.ad. In this file is a set of X resources for defining graphical user interfaces based on the following criteria:


Xprofiler Resource Variables

You can use the resource variables listed below to control the appearance and behavior of Xprofiler. Note that the values supplied here are the defaults, but you may change them to suit your own preferences.

Controlling Fonts

To specify the font for the labels that appear with function boxes, call arcs, and cluster boxes:
Use this resource variable: Specify this default, or a value of your own choice:
*narc*font -ibm-block-medium-r-normal-*-0-0-*-*-*-*-ibm-*

To specify the font used in textual reports:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*fontList rom10

Controlling the Appearance of the Xprofiler Main Window

To specify the size of the main window:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*mainW.height 700
Xprofiler*mainW.width 900

To specify the foreground and background colors of the main window:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*foreground black
Xprofiler*background light gray

To specify the number of function boxes that are displayed when you first open the Xprofiler main window:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*InitialDisplayGraph 5000

You can use the -disp_max command line option to override this value.

To specify the colors of the function boxes and call arcs of the function call tree:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*defaultNodeColor forest green
Xprofiler*defaultArcColor royal blue

To specify the color in which a specified function box or call arc is highlighted:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*HighlightNode red
Xprofiler*HighlightArc red

To specify the color in which de-emphasized function boxes appear:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*SuppressNode gray

Function boxes are de-emphasized with the -e, -E, -f, and -F options.

Controlling Variables Related to the File Menu

To specify the size of the Load Files Dialog box:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*loadFile.height 785
Xprofiler*loadFile.width 725

The Load Files Dialog box is invoked via Load Files option of the File menu.

To specify whether a confirmation dialog box should appear whenever a file will be overwritten:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*OverwriteOK False

The value True would be equivalent to selecting the Set Options option from the File menu, and then selecting the Forced File Overwriting option from the Runtime Options Dialog box.

To specify the alternative search paths for locating source or library files:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*fileSearchPath search path

The value you specify for search path is equivalent to the search path you would designate from the Alt File Search Path Dialog box. To get to this dialog box, you would choose the Set File Search Paths option from the File menu.

To specify the file search sequence (whether the default or alternative path is searched first):
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*fileSearchDefault True

The value True is equivalent to selecting the Set File Search Paths from the File menu, and then the Check default path(s) first option from the Alt File Search Path Dialog box.

Controlling Variables Related to the Screen Dump Option

To specify whether a screen dump will be sent to a printer or placed in a file:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*PrintToFile True

The value True is equivalent to selecting the File button in the Output To field of the Screen Dump Options Dialog box. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify whether the PostScript screen dump will created in grey shades or color:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*ColorPscript False

The value False is equivalent to selecting the GreyShades button in the PostScript Output area of the Screen Dump Options Dialog box. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify the number of grey shades that the PostScript screen dump will include (if you selected GreyShades in the PostScript Output field):
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*GreyShades 16

The value 16 is equivalent to selecting the 16 button in the Number of Grey Shades field of the Screen Dump Options Dialog box. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify the number of seconds that Xprofiler waits before capturing a screen image:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*GrabDelay 1

The value 1 is the default for the Delay Before Grab option of the Screen Dump Options Dialog box, but you may specify a longer interval by entering a value here. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify the maximum number of seconds that may be specified with the slider of the Delay Before Grab option:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*grabDelayScale.maximum 30

The value 30 is the default for the Delay Before Grab option of the Screen Dump Options Dialog box. This means that users cannot set the slider scale to a value greater than 30. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify whether the screen dump is created in Landscape or Portrait format:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*Landscape True

The value True is the default for the Enable Landscape option of the Screen Dump Options Dialog box. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify whether or not you would like information about how the image was created to be added to the PostScript screen dump:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*Annotate False

The value False is the default for the Annotate Output option of the Screen Dump Options Dialog box. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify the directory that will store the screen dump file (if you selected File in the Output To field):
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*PrintDirectory directory

The value you specify for directory is equivalent to the directory you would designate in the Default Directory field of the Screen Dump Dialog box. You access the Screen Dump Options Dialog box by selecting the Screen Dump>Set Option options from the File menu.

To specify the printer destination of the screen dump (if you selected Printer in the Output To field):
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*PrintCommand qprt -B ga -c -Pps

The value qprt -B ga -c -Pps is the default print command, but you may supply a different one here.

Controlling Variables Related to the View Menu

To specify the size of the Overview window:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*overviewMain.height 300
Xprofiler*overviewMain.width 300

To specify the color of the highlight area of the Overview window:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*overviewGraph*defaultHighlightColor sky blue

To specify whether the function call tree is updated as the highlight area is moved (Immediate) or only when it is stopped and the mouse button released (Delayed):
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*TrackImmed True

The value True is equivalent to selecting the Immediate Update option from the Utility menu of the Overview window. You access the Overview window by selecting the Overview option from the View menu.

To specify whether the function boxes in the function call tree appear in 2-D or 3-D format:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*Shape2D True

The value True is equivalent to selecting the 2-D Image option from the View menu.

To specify whether the function call tree appears in Top-to-Bottom or Left-to-Right format:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*LayoutTopDown True

The value True is equivalent to selecting the Layout: Top>Bottom option from the View menu.

Controlling Variables Related to the Filter Menu

To specify whether the function boxes of the function call tree are clustered or unclustered when the Xprofiler main window is first opened:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*ClusterNode True

The value True is equivalent to selecting the Cluster Functions by Library option from the Filter menu.

To specify whether the call arcs of the function call tree are collapsed or expanded when the Xprofiler main window is first opened:
Use this resource variable: Specify this default, or a value of your own choice:
Xprofiler*ClusterArc True

The value True is equivalent to selecting the Collapse Library Arcs option from the Filter menu.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]