Skip to main content

Using ^PROFILE

Using ^PROFILE

Invoke the (^PROFILE) utility from the %SYS namespace:

%SYS>do ^PROFILE

When you are prompted to start the collection of data, press Enter.

Note:

When you are prompted for a response (other than Yes or No) you can enter ? to display online help.

By default, the profile displays a numbered list of routines with the following metrics; initially, the list is sorted by the RtnLine metrics:

Column Title (Metric) Description
RtnLine

Number of routine lines of code executed. By default, it lists the value as a percentage of all lines of code executed.

Time

Elapsed time used to execute the routine. By default, the time is listed as a percentage of the total time used by all routines.

CPU

CPU time used to execute the routine. By default, the entry is listed as a percentage of the total CPU time used by all routines.

RtnLoad

Number of times the routine is loaded. By default, the entry is listed as a percentage of all routine loads.

GloRef

Number of global references by the routine. By default, the entry is listed as a percentage of global references by all routines.

GloSet

Number of global sets by the routine. By default, the entry is listed as a percentage of global sets by all routines.

The name of the routine (INT or MVI file) and the namespace where it is executing is displayed on the second line of the entry.

Follow the instructions that are displayed in the Terminal:

  • When the list of routines is displayed at the profile level, you can specify any of the following:

    Option Description
    #

    Flag the specified line(s) for detailed profile-level data collection.

    Note:

    On each displayed page, you can enter single line numbers (#), a comma-separated list (#,#,#), a range (#-#), or a combination (#-#,#,#-#,#).

    After you select the routines on any page, you can move to the next or previous page to select other routines. After you select all the routines you want to analyze, enter Q to start the detail level profile collection.

    B

    Display the previous page of the list.

    E

    Export the displayed collection of metrics.

    N

    Display the next page of the list.

    O

    Re-sort the page based on different metrics (the selected metric is displayed in the first column).

    Q

    Exit from the ^PROFILE utility.

    Note:

    If you flagged routines that you want to analyze, this option lets you choose between collecting subroutine- and line-level metrics or exiting.

    R

    Refresh the list with the most recent metrics.

    X

    Clear all flags of selected routines (including those selected on other pages) and refresh the collection of metrics.

  • When the list of routines is displayed at the detailed profiling level, you can specify any of the following:

    Option Description
    #

    The line number of the routine you want to analyze in more detail. After you press Enter, the subroutine labels in then selected routine is displayed.

    B

    Display the previous page of the list.

    N

    Display the next page of the list.

    O

    Re-sort the page based on different metrics (the selected metric is displayed in the first column).

    Q

    Exit from the ^PROFILE utility.

    R

    Refresh the list with the most recent metrics.

  • When the list of subroutine labels (and metrics for each label) are displayed, you can specify any of the following:

    Option Description
    #

    The line number of the subroutine label (in the code) you want to analyze in more detail. After you press Enter, the code for the specified label is displayed.

    B

    Display the previous page of the list.

    L

    Switch to the line level display of the subroutine.

    N

    Display the next page of the list.

    Q

    Exit the list, return to the previous level.

    R

    Refresh the list with the most recent metrics.

    Note:

    If *Unknown* is displayed in the listing, enter R.

  • When lines of code are displayed, you are prompted to specify what you want to do next. Your options are:

    Option Description
    #

    The line number in the code you want to analyze in more detail. After you press Enter, the code for the specified label is displayed.

    B

    Display the previous page of the list.

    C

    Switch code display between source code and intermediate (INT/MVI) code.

    M

    Change the page margin and length.

    N

    Display the next page of the list.

    O

    Re-sort the page based on different metrics.

    Q

    Exit the list, returning to the previous level.

    R

    Refresh the list with the most recent metrics.

    S

    Switch to the subroutine level display of the routine.

FeedbackOpens in a new tab