Enabling the program to collect profiling data
Enabling the program to collect profiling data
Enabling the program to collect profiling data
A program is enabled to collect profiling data if at least one of the modules bound into the program is enabled to collect profiling data. Enabling a program to collect profiling data can be done either by changing one or more *MODULE objects to collect profiling data and then creating or updating the program with these modules, or by changing the program after it is created to collect profiling data. Both techniques result in a program with bound modules enabled to collect profiling data.
Depending on the ILE language you are using, there may be an option on the compiler command to create the module as enabled to collect profiling data. The change module (CHGMOD) command can also be used by specifying *COL on the profiling data (PRFDTA) parameter to change any ILE module to collect profiling data, as long as the ILE language supports an optimization level of at least *FULL (30).
To enable a program to collect profiling data after creation through either the Change Program (CHGPGM) or Change Service Program (CHGSRVPGM) commands, do the following for an observable program:
- Specify *COL on the profiling data (PRFDTA) parameter. This specification
affects all modules bound in the program that:
- Were created for a release of V4R2M0 or later. If you are using a system earlier than V5R2M0, the program must be on a system at the same release level for which the program was created in order to enable profiling data collection. The same restriction applies for bound modules.
- Have an optimization level of 30 or above. In V5R2M0 and later releases, any bound modules with less than optimization level 30 will be allowed, but will not participate in application profiling.
Note: A program enabled to collect application profiling data on a system with release prior to V5R2M0 can have that data applied on a V5R2M0 or later system, but the results may not be optimal. If you intend to apply profiling data or use the resulting program on a V5R2M0 or later system, you should enable or re-enable profiling data collection for the program on a V5R2M0 or later system.
Enabling a module or program to collect profiling data requires that the object be re-created. Therefore, the time required to enable a module or program to collect profiling data is comparable to the time it takes to force recreate the object (FRCCRT parameter). Additionally, the size of the object will be larger due to the extra machine instructions generated by the optimizing translator.
Once you enable a program or module to collect profiling data, creation data observability cannot be removed until one of the following occurs:
- The collected profiling data is applied to the program.
- The program or module is changed so that it cannot collect profiling data.
Use the Display Module (DSPMOD), Display Program (DSPPGM) or Display Service Program (DSPSRVPGM) commands, specifying DETAIL(*BASIC), to determine if a module or program is enabled to collect profiling data. For programs or service programs use option 5 (display description) from the DETAIL(*MODULE) to determine which of the bound module(s) are enabled to collect profiling data. See topic How to Tell if a Program or Module is Profiled or Enabled for Collection for more details.
Note: If a program already has profiling data collected (the statistical data gathered while the program is running), this data is cleared when a program is re-enabled to collect profiling data. See Managing Programs Enabled to Collect Profiling Data for details.