Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Statement Frequency Counting

IP.com Disclosure Number: IPCOM000080105D
Original Publication Date: 1973-Oct-01
Included in the Prior Art Database: 2005-Feb-26
Document File: 2 page(s) / 18K

Publishing Venue

IBM

Related People

McCallion, IM: AUTHOR

Abstract

This is a program development aid to point to the most frequency executed statements in a program, and thus the statements on which to concentrate efforts for performance improvement.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 60% of the total text.

Page 1 of 2

Statement Frequency Counting

This is a program development aid to point to the most frequency executed statements in a program, and thus the statements on which to concentrate efforts for performance improvement.

A set of subroutines are called from the program code under development. These calls are generated by the language compiler when the compile time option "COUNT" is specified. The subroutines cause a report to be printed at the end of the program, giving the number of times each statement in the program was executed in that particular run of the program.

Three types of subroutine call are made by the compiled code: 1. Branch-out : This call signifies that the current statement has caused control to be passed to a statement in the program other than the next statement, e.g., CALL statement or GO TO statement. 2. Branch-in : This call signifies that the current statement has received control from a statement in the program. 3. Return back : This call signifies that the current statement has received control back from a subroutine which it has called earlier. The subroutines perform the following operations: 1) For each statement in the program, three totals are kept, one for each type of call. 2) At the end of the program, the number of times each statement was executed is calculated using the formula (*) given below, and printed out.

The formula for the number of times each statement is executed is derived as follows: Let Ci = number of times statement i e...