Collect Profiling Data
Collect Profiling Data
Collect Profiling Data
Program profiling must be started on the machine that a program enabled to collect profiling data is to be run on in order for that program to update profiling data counts. This enables large, long-running applications to be started and allowed to reach a steady state before gathering profiling data. This gives you control over when data collection occurs.
Use the Start Program Profiling (STRPGMPRF) command to start program profiling on a machine. To end program profiling on a machine, use the End Program Profiling (ENDPGMPRF) command. Both commands are shipped with the public authority of *EXCLUDE. Program profiling is ended implicitly when a machine is IPLed.
Once program profiling is started, any program or service program that is run that is also enabled to collect profiling data will update its profiling data counts. This will happen regardless of whether or not the program was activated before the STRPGMPRF command was issued.
If the program you are collecting profiling data on can be called by multiple jobs on the machine, the profiling data counts will be updated by all of these jobs. If this is not desirable, a duplicate copy of the program should be made in a separate library and that copy should be used instead.
Note:
- When program profiling is started on a machine, profiling data counts are incremented while a program that is enabled to collect profiling data is running. Therefore it is possible that “stale” profiling data counts are being added to if this program was previously run without subsequently clearing these counts. You can force the profiling data counts to be cleared in several ways. See Managing Programs Enabled to Collect Profiling Data for details.
- Profiling data counts are not written to DASD each time they are incremented because doing so would cause too great a degradation to the program’s runtime. Profiling data counts are only written to DASD when the program is naturally paged out. To ensure profiling data counts are written to DASD, use the Clear Pool (CLRPOOL) command to clear the storage pool in which the program is running.