z/TPF - Group home

Trace log resource counts for the JSON option (PJ46981)

  

Trace log resource counts are now available when you code the trace log facility with the JSON option.  TPF Toolkit Fix Pack 16 displays resource counts in the Trace Analysis Report editor.

Enhancements to trace log collected data - resource counts for JSON

The trace log facility is used for ECB trace logging, including both macro and function trace, for a specific ECB.  To use the trace log facility, code one of the following APIs in your application: TLOGC macro, tpf_tracelog_on function, and tpf_tracelog_ext function.  By using these APIs, you can choose where the results are written to and how to format the results. The tape option writes the pre-formatted ECB trace data to a real-time tape that is mounted on the z/TPF system. The file, processor, and JSON options write to a file on the z/TPF file system.

When the file, tape, or processor option is used for trace log data formatting, the postprocessed report contains a list of resources that are used.  These resource counts are presented at the end of the report.  With APAR PJ46981, these resource counts are now available when the JSON option is used for trace log data formatting. 

Trace log resource counts available in TPF Toolkit

The Trace Analysis Report editor shows macro and function activities. The Resource counts tab provides an overview of resources that are used during the trace.  With APAR PJ46981 applied and TPF Toolkit 4.6 Fix Pack 16 installed, trace log resource counts that are generated by the trace log facility are displayed in the Resource counts tab in the Trace Analysis Report editor.

From the Trace Log Collection view, you can create a new trace log collection.  When you view the analysis report for that trace log collection, the Trace Analysis Report editor is opened. The Resource counts tab in the Trace Analysis Report editor displays the resources that are used. The Used counts column shows the resources that are used during the trace log session. The Starting counts column shows the resources that are used before the trace log session is started, and the Ending counts column shows the resources that are used when the trace log session is ended.

Here is an example.

Christine is an application developer. She wants to examine the ECB heap buffers that are obtained by her program.  She creates a trace log, and then views the analysis report. The Resource counts tab shows her the total count of ECB heap buffers that were used across the trace log session.  The Resource counts tab indicates that this ECB obtained 17 ECB heap buffers. 


The Allocations tab breaks down this number further. 

Trace Analysis Report Allocations



The Allocations tab shows how the ECB heap was allocated by showing the memory allocation types that were called.  In this example, there were 6 MALOC, 10 CALOC, and 1 RALOC macro calls.  From this data, Christine can better understand how her program uses storage.

For more information about PJ46981, see the APEDITTo learn more about the Trace Analysis Report resource counts, see the Trace Log Collection View in IBM Documentation.