Efficient Trace Calls
Original Publication Date: 2004-Sep-01
Included in the Prior Art Database: 2004-Sep-01
AbstractProvide efficient trace calls in a high transaction processing environment
Efficient Trace Calls
Disclosed is a program that provides efficient trace calls in a high transaction processing environment. Due to performance concerns, there is a need to gather a minimum amount of information at function trace time. In a high transaction processing environment, problems sometimes occur in a production environment that cannot be re-created in a test environment. The only debug information available is that which is collected, real time, as part of the on-line trace facility. The problem is, how does one collect the most information without adding a lot of overhead to the system and affecting the performance of high transaction processing? In addition, when the system enters critical peak transaction periods, how does one turn off the trace?
This program gathers a minimum amount of information when tracing is active at the system level. It is important to have tracing active as the default for the test environment and for most production environments except during times of peak production. This allows for the gathering of necessary information in a memory file for later analysis of problems that occur in the various environments.
When the trace function is active, it is critical that the overhead is kept to a minimum. This is accomplished by capturing, in a memory file, only the pointers to the detailed debug information instead of capturing the detailed debug information itself. Only when a problem occurs and the trace information needs to be dumped is the detailed debug information gathered to provide complete trace information. By waiting until this time to gather the additional information, machine cycles are conserved in production environments. The overall steps are as follows.
During compile and link time, the program gathers a subset of parameter information and attaches the information to the ELF file. The gcc compiler generates an object file which contains .text and .debug sections. Because of performance an size constraints, it is not desirable to load the entire .debug section to the on-line operating system memory. Instead, the program calls an off-line program to extract parameter information from the .debug section for each function within the object file. The off-line program searches through the symbol table, finds the function name, and finds the corresponding parameter information for the function. The program returns the following information for each parameter.
An enum type describing the type of parameter; for example,
A char[ ] array containing the parameter type name; for example, "short int", and A char[...