PDGuide - Guide to Instrumenting Your Code
Appearance
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
Code instrumentation improves problem analysis. Instrumented components of OS/2 Warp Version 4 use First Failure Support Technology (FFST) and trace. This chapter defines the required steps for instrumentation, and things you should consider before you instrument your code. This chapter also tells you what to expect when you use the FFSTProbe API and trace utility.
Introduction to FFST Instrumentation
Benefits of Instrumenting for FFST
Overview of FFSTProbe API
FFSTProbe Parameters
FFST Flow
Steps for Instrumenting for FFST
Planning for Instrumenting Your Code
Defining Vital Product Data (VPD)
Deciding How and Where to Place Calls to FFSTProbe API
Places to Instrument
Deciding What Data You Want to Collect
Error Types to Consider
Ways to Collect Data
FFST Dump Data
Process Environment Data
System Process Status Data
Trace Data
User Storage Data
Additional Error Log User Data
FFST Dump Process Errors
Process Dumps
System Dumps
Coding the FFSTProbe Functions
Direct Calls
Using Macros to Call the FFSTProbe Function
Using Subroutines to Call the FFSTProbe Function
Creating Template Files
Why Template Files Are Important
Creating Message Files
Setting Up (Instrumenting) for Trace
What Is Trace?
Creating a Trace File Entry Using the TraceCreateEntry Function
Defining Trace Information Format
Creating Trace Entry Formatting Directives
Creating DMI MIF Files
How to Install Your Software Product
FFST-Related Functions
Examples of Code when Instrumenting for FFST and Trace
Example of an Application Program Using a Subroutine
Creating an Error Record Template Input File
Template File Tips
Message Input File Example
MIF File Example