JPS62216050A - Measurement processing system for executing cpu time for program unit - Google Patents

Measurement processing system for executing cpu time for program unit

Info

Publication number
JPS62216050A
JPS62216050A JP61035775A JP3577586A JPS62216050A JP S62216050 A JPS62216050 A JP S62216050A JP 61035775 A JP61035775 A JP 61035775A JP 3577586 A JP3577586 A JP 3577586A JP S62216050 A JPS62216050 A JP S62216050A
Authority
JP
Japan
Prior art keywords
program
execution
statement
unit
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP61035775A
Other languages
Japanese (ja)
Inventor
Toshihiko Konno
紺野 敏彦
Jiro Mikami
三上 次郎
Masakazu Kobayashi
正和 小林
Yoshiyuki Oota
美幸 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61035775A priority Critical patent/JPS62216050A/en
Publication of JPS62216050A publication Critical patent/JPS62216050A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To obtain the accurate tuning information by starting both a measurement starting process and an executing time setting process in a pair and attaining calculation of the executing time of a central processing unit CPU in a state approximate to a real model. CONSTITUTION:The program of a tuning tool analyzing part 23 itself is prepared in a library (not shown here). A measurement start calling sentence editing part 13 and an executing time setting call sentence editing part 14 put the sentences into the positions before and after the calling sentence of each program contained in a source program 10 to call out a measurement start processing part 25 and an executing time setting processing part 26 respectively. Such a compiled protoprogram 16 is compiled again and a load module 22 undergone the connecting compilation is executed. Thus both parts 25 and 26 are started in a pair for each program. As a result, these parts 25 and 26 obtain the present timer value from a timer control part 30 and can calculate the CPU executing time for each program.

Description

【発明の詳細な説明】 〔1既要〕 高級言語で記述された原始プログラムを加工し。[Detailed description of the invention] [1 already required] Process a source program written in a high-level language.

各プログラム単位の実行CPU時間を計測するルーチン
を自動的に呼び出すようにして、プログラム単位の実行
CPU時間を測定し、その情報を編集して出力すること
により、有効なチューニング情報を得ることができるよ
うにしている。
Effective tuning information can be obtained by automatically calling a routine that measures the execution CPU time of each program unit, measuring the execution CPU time of each program unit, and editing and outputting that information. That's what I do.

〔産業上の利用分野〕[Industrial application field]

本発明は9例えばFORTRANチューニングツール等
のようなプログラムを最適化するためのデータを取得す
るプログラム実行解析ツールにおけるプログラム単位の
実行CPU時間測定処理方式に関するものである。
The present invention relates to a processing method for measuring execution CPU time in program units in a program execution analysis tool that acquires data for optimizing a program, such as a FORTRAN tuning tool.

〔従来の技術〕[Conventional technology]

例えば、科学技術計算を行うFORTRANプログラム
等では、計算量が膨大となることが多いため、プログラ
ムの実行時間が長くなることが多い。プログラムの実行
時間は、計算アルゴリズムの改良により、ある程度短縮
できる場合がある。
For example, in FORTRAN programs and the like that perform scientific and technical calculations, the amount of calculation is often enormous, so the execution time of the program is often long. Program execution time may be reduced to some extent by improving calculation algorithms.

そのため、有効なプログラム解析情報およびチューニン
グ情報を提供するものとして、いわゆるFORTRAN
チューニングツールが知られている。
Therefore, the so-called FORTRAN is used as a tool that provides effective program analysis information and tuning information.
Tuning tools are known.

従来のFORTRANチューニングツールは。Traditional FORTRAN tuning tools.

チューニング対象となるFORTRAN原始プログラム
を編集して2分岐等に関連する文の実行回数をカウント
する文を組み込み、その実行によって得られるカウント
値から1文対応の実行回数情報等を出力するようになっ
ている。しかし、従来方式では、各文の実行回数等の情
報を得ることができても、各プログラム単位が実際に走
行した実行CPU時間情報を得ることはできなかった。
Edit the FORTRAN source program to be tuned, incorporate a statement that counts the number of executions of statements related to two-branching, etc., and output information such as the number of executions for one statement from the count value obtained by the execution. ing. However, with the conventional method, even if it is possible to obtain information such as the number of times each statement has been executed, it is not possible to obtain information about the CPU time during which each program unit actually ran.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

FORTRANプログラム等をチューニングする場合、
サブルーチンその他についての各プログラム単位の走行
比率を知ることが必要となる場合が多い。従来、その走
行比率を把握するために。
When tuning FORTRAN programs etc.,
It is often necessary to know the running ratio of each program unit for subroutines and the like. Conventionally, to understand its driving ratio.

例えばオブジェクトリストから1文当りのコストを計算
し、その(1文当りのコスト値)×(実行回数)によっ
て、各文のコストを計算し、そのうえでプログラム単位
のコスト計算を行わなければならなかった。そのため2
手計算などによる労力や時間を要するだけでなく1例え
ば入出力並びが配列であったり1 DO形並びがあると
、オブジェクトリストからのコスト見積りに限界がある
という問題があった。
For example, it was necessary to calculate the cost per statement from the object list, calculate the cost of each statement by (cost value per statement) x (number of executions), and then calculate the cost for each program. . Therefore 2
Not only does it require time and effort due to manual calculations, but there is also a problem in that if the input/output arrangement is an array or a DO arrangement, for example, there is a limit to the cost estimation from the object list.

また、システムライブラリを使用する場合には。Also, when using system libraries.

ユーザ側ではその部分が見えず、コスト表示がないため
、チューニングするうえで的確な判断をするための情報
が不足するという問題があった。
Since the user cannot see this part and there is no cost display, there is a problem in that there is a lack of information to make accurate tuning decisions.

本発明は上記問題点の解決を図り、プログラムの性能向
上に役立つ正確な情報を、自動的に出力する方式を提供
することを目的としている。
The present invention aims to solve the above-mentioned problems and provides a method for automatically outputting accurate information useful for improving the performance of a program.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は本発明の基本構成例を説明するためのブロック
図である。
FIG. 1 is a block diagram for explaining an example of the basic configuration of the present invention.

第1図において、10はFORTRAN等の高級言語で
記述されたチューニング対象となる原始プログラム、1
1はチューニングツール編集部であって、原始プログラ
ムlOにチューニング情報を取得する文を組み込む処理
を実行するものである。
In FIG. 1, 10 is a source program to be tuned written in a high-level language such as FORTRAN;
Reference numeral 1 denotes a tuning tool editing section which executes a process of incorporating a statement for acquiring tuning information into the source program IO.

チューニングツール編集部11中、 ソース解析処理部
12は、原始プログラム10からソースステートメント
を1文ずつ読み出し、その文を解析して、チューニング
情報の取得に関連する文を抽出するものであり、計測開
始呼び出し文編集部13は、原始プログラム10に、各
プログラム単位の実行時間計測を開始するプログラムを
呼び出す文を組み込むもの、実行時間設定呼び出し文編
集部14は、原始プログラム10に、各プログラム単位
の実行時間計測値を累禎するプログラムを呼び出す文を
組み込むものである。
The source analysis processing unit 12 in the tuning tool editing unit 11 reads source statements one by one from the source program 10, analyzes the sentences, and extracts sentences related to acquiring tuning information. The call statement editing unit 13 incorporates into the source program 10 a statement that calls a program that starts measuring the execution time of each program unit. This includes a statement that calls a program that accumulates time measurement values.

編集情報ファイル15は、計測開始呼び出し文編集部1
3および実行時間設定呼び出し文編集部14等のソース
編集処理によって生成されるファイルで1編集されたプ
ログラムの各文に対応して。
The editing information file 15 is the measurement start call statement editing section 1
3 and a file generated by the source editing process of the execution time setting call statement editing unit 14 and the like, corresponding to each statement of the program edited.

文の種類情報および生成文であるか原文であるかなどの
情報を持つ、編集済原始プログラム16は。
The edited source program 16 has information on the type of sentence and whether it is a generated sentence or an original sentence.

原始プログラム10に対し、チューニング情報を取得す
るための文が組み込まれたソースモジュールである。
This is a source module in which statements for acquiring tuning information are incorporated into the source program 10.

17は翻訳実行部であって、翻訳実行部17中。Reference numeral 17 denotes a translation execution unit;

18はFORTRANコンパイラ等によるコンパイル部
、19はリンケージエディタによる結合編集部、20は
プログラムの動作環境を設定しプログラムを起動する実
行部である。21は&ii済原始プログラム16をコン
パイルしたオブジェクトモジュール、22はオブジェク
トモジュール21を実行可能形式に編集したロードモジ
ュールを表す。
Reference numeral 18 denotes a compiling section using a FORTRAN compiler or the like, 19 a combination editing section using a linkage editor, and 20 an execution section that sets the operating environment of the program and starts the program. Reference numeral 21 represents an object module obtained by compiling the &ii completed source program 16, and reference numeral 22 represents a load module obtained by editing the object module 21 into an executable format.

23はチューニングツール解析部であって、ロードモジ
ュール22の実行結果を解析し、チューニング情報を出
力する処理を実行するものである。
Reference numeral 23 denotes a tuning tool analysis unit that analyzes the execution results of the load module 22 and executes a process of outputting tuning information.

チューニングツール解析部23中、初期処理部24は、
ロードモジュール22の実行開始時に呼び出され1作業
域の初期化などを行うもの、計測開始処理部25は、計
測開始呼び出し文編集部13が組み込んだ文によって呼
び出されて1次に計測対象となるプログラム単位の実行
時間計測開始の準備を行うもの、実行時間設定処理部2
6は、実行時間設定呼び出し文編集部14が組み込んだ
文によって呼び出されて計測対象となったプログラム単
位の実行時間計測値をテーブルに設定するものである。
In the tuning tool analysis section 23, the initial processing section 24
The measurement start processing unit 25, which is called at the start of execution of the load module 22 and initializes one work area, is a program that is called by the statement incorporated by the measurement start call statement editing unit 13 and becomes the primary measurement target. Execution time setting processing unit 2, which prepares to start measuring unit execution time
6 sets in a table the execution time measurement value of the program unit that is called by the statement incorporated by the execution time setting call statement editing unit 14 and becomes the measurement target.

文単位解析処理部27は、)、W集情報ファイル15を
参照し1文単位に実行結果の解析を行うものである。プ
ログラム単位解析処理部28は、プログラム単位の解析
情報を編集し出力するものであって、特に実行CPU時
間編集出力部29は、各プログラム単位毎に、実行CP
U時間に関する情報を)[集し出力する。
The sentence-by-sentence analysis processing unit 27 refers to the W collection information file 15 and analyzes the execution results on a sentence-by-sentence basis. The program unit analysis processing unit 28 edits and outputs analysis information for each program, and in particular, the execution CPU time editing output unit 29 edits and outputs analysis information for each program unit.
Collect and output information regarding U time).

タイマ管理部30は、CPUが持つハードウェア・タイ
マにより、実時間管理を行うものである。
The timer management unit 30 performs real-time management using a hardware timer included in the CPU.

CPU情報テーブル31は、各プログラム単位毎に、実
行CPU時間の累積時間が設定される記憶領域である。
The CPU information table 31 is a storage area in which cumulative execution CPU time is set for each program unit.

解析リスト32は2文単位解析処理部27およびプログ
ラム単位解析処理部28による解析結果が印刷されたリ
ストである。
The analysis list 32 is a list in which the analysis results by the two-sentence unit analysis processing unit 27 and the program unit analysis processing unit 28 are printed.

〔作用〕[Effect]

チューニングツール解析部23自体のプログラムは、予
め図示省略したライブラリに用意される。
The program for the tuning tool analysis unit 23 itself is prepared in advance in a library (not shown).

計測開始呼び出し文編集部13および実行時間設定呼び
出し文編集部14は、原始プログラム10中における各
プログラム単位の呼び出し文の前後に、それぞれ計測開
始処理部25および実行時間設定処理部26を呼び出す
文を組み込む。
The measurement start call statement editing unit 13 and the execution time setting call statement editing unit 14 create statements that call the measurement start processing unit 25 and the execution time setting processing unit 26, respectively, before and after the call statement of each program unit in the source program 10. Incorporate.

従って、こうして編集された編集法原始プログラム16
をコンパイルし、結合編集したロードモジュール22を
実行すると、各プログラム単位毎に、計測開始処理部2
5と実行時間設定処理部26とが、対になって、起動さ
れることになる。これにより、計測開始処理部25およ
び実行時間設定処理部26は、タイマ管理部30から現
在のタイマ値を得て、各プログラム単位毎の実行CPU
時間を計算することができる。
Therefore, the editing method source program 16 edited in this way
When the load module 22 that has been compiled and combined and edited is executed, the measurement start processing section 2 is executed for each program unit.
5 and the execution time setting processing section 26 are activated as a pair. As a result, the measurement start processing section 25 and the execution time setting processing section 26 obtain the current timer value from the timer management section 30, and the execution CPU for each program unit.
Be able to calculate time.

このようにして得られた時間情報は、実際の実行CPU
時間であるので、各プログラム単位毎の実行コストに対
応した有効なチューニング情報となる。
The time information obtained in this way is the actual execution CPU
Since it is time, it becomes effective tuning information corresponding to the execution cost of each program unit.

〔実施例〕〔Example〕

第2図は本発明の一実施例による原始プログラムの編集
例、第3図はCPU情報テーブルの例。
FIG. 2 shows an example of editing a source program according to an embodiment of the present invention, and FIG. 3 shows an example of a CPU information table.

第4図は本発明の一実施例における計測開始処理の説明
図、第5図は本発明の一実施例における実行時間設定処
理の説明図、第6図は本発明の一実施例による動作側説
明図、第7図は本発明の一実施例による解析リストの出
力例を示す。
FIG. 4 is an explanatory diagram of measurement start processing in one embodiment of the present invention, FIG. 5 is an explanatory diagram of execution time setting processing in one embodiment of the present invention, and FIG. 6 is an explanatory diagram of the operation side according to one embodiment of the present invention. The explanatory diagram, FIG. 7, shows an example of outputting an analysis list according to an embodiment of the present invention.

以下、FORTRANで記述されたプログラムを例にし
て説明する。PL/Iその他の高級言語により記述され
たプログラムについても同様である。
A program written in FORTRAN will be described below as an example. The same applies to programs written in PL/I and other high-level languages.

例えば、計測開始処理部25のプログラム名がrsTT
Jであって、実行時間設定処理部26のプログラム名が
rTHKJであるとする。
For example, the program name of the measurement start processing unit 25 is rsTT.
It is assumed that the program name of the execution time setting processing section 26 is rTHKJ.

計測開始呼び出し文編集部13は、原始プログラム10
にCALL文が現れると、その前に2次の文を生成して
組み込む。
The measurement start call statement editing unit 13 writes the source program 10
When a CALL statement appears in , a secondary statement is generated and installed before it.

rCALL  STT (変数名、プログラム単位名)
」ここで、パラメータの変数名は、sTTのベースアド
レスを与えるものである。
rCALL STT (variable name, program unit name)
” Here, the variable name of the parameter gives the base address of sTT.

また、実行時間設定呼び出し文編集部14は。Also, the execution time setting call statement editing section 14.

原始プログラム10中のCALL文の後に0次の文を生
成して組み込む。
A zero-order statement is generated and incorporated after the CALL statement in the source program 10.

rCALL  THK (変数名)」 パラメータの変数名は、THKのベースアドレスを与え
るものである。
rCALL THK (variable name)" The variable name of the parameter gives the base address of THK.

これにより、第2図に示す原始プログラム10は、第2
図図示編集済原始プログラム16のように編集される。
As a result, the source program 10 shown in FIG.
The program is edited as illustrated in the edited source program 16.

なお、この編集法原始プログラム16において、Slは
第1図図示初期処理部24を呼び出す文、S2は文単位
解析処理部27およびプログラム単位解析処理部28を
呼び出す文である。また、S31〜S35は、計測開始
処理部25を呼び出す文、841〜S45は、実行時間
設定処理部26を呼び出す文である。
In this editing method source program 16, Sl is a statement that calls the initial processing section 24 shown in FIG. 1, and S2 is a statement that calls the sentence unit analysis processing section 27 and the program unit analysis processing section 28. Furthermore, S31 to S35 are statements that call the measurement start processing section 25, and S841 to S45 are statements that call the execution time setting processing section 26.

編集情報ファイル15には1編集法原始プログラム16
の各文に対応して、それぞれチューニングツールWs集
部11が生成した生成文であるか。
Editing information file 15 includes 1 editing method source program 16
Is it a generated sentence generated by the tuning tool Ws collection unit 11 corresponding to each sentence?

最初からある原文であるかなどを示す情報が格納される
Information indicating whether the original text exists from the beginning is stored.

第1図図示CPUIfIIIテーブル31は2例えば第
3図に示すように構成される。
The CPU IfIII table 31 shown in FIG. 1 is configured as shown in FIG. 3, for example.

CPU情報テーブル31の各エントリには、プログラム
単位名と、その実行CPU時間の累積時間と、実行開始
時におけるタイマ値と、呼び出し元のIDとが設定され
る領域が設けられる。この呼び出し元IDは、CPU情
報テーブル31のエントリ番号に対応し、メインプログ
ラムのものについては「0」とされる。CPU情報テー
ブル31の現在処理対象となっているエントリは、内部
のテーブルポインタ40からポイントされる。
Each entry in the CPU information table 31 is provided with an area in which a program unit name, the cumulative CPU time for its execution, a timer value at the start of execution, and a caller ID are set. This caller ID corresponds to the entry number of the CPU information table 31, and is set to "0" for the main program. The entry currently being processed in the CPU information table 31 is pointed to by an internal table pointer 40 .

計測開始処理部25は9例えば第4図に示すように処理
する。以下の説明における処理番号■〜■は、第4図に
示す番号■〜■に対応する。
The measurement start processing unit 25 performs processing as shown in FIG. 4, for example. Processing numbers ■ to ■ in the following description correspond to numbers ■ to ■ shown in FIG.

■ 累積時間の計算が必要な場合には、CPU実時間を
示す現在のタイマ値を得て、呼び出し元の累積時間を計
算し、CPU情報テーブル31にセットする。
(2) If it is necessary to calculate the cumulative time, obtain the current timer value indicating the CPU real time, calculate the cumulative time of the caller, and set it in the CPU information table 31.

■ CPU情報テーブル31を、指定されたプログラム
単位名でもって検索する。
(2) Search the CPU information table 31 using the specified program unit name.

■ 指定されたプログラム単位名があった場合。■ If the specified program unit name exists.

そのエントリにテーブルポインタを合わせ、処理■へ制
御を移す。
Move the table pointer to that entry and transfer control to process ■.

■ 指定されたプログラム単位名がない場合、CPU情
報テーブル31の最終エントリに、そのプログラム単位
名を登録する。累積時間をOに初期設定する。
■ If the specified program unit name does not exist, the program unit name is registered in the final entry of the CPU information table 31. Initialize the cumulative time to O.

■ 現タイマ値を開始タイマ値として、CPU情報テー
ブル31にセ・ノドする。
■ Add the current timer value to the CPU information table 31 as the start timer value.

■ 呼び出し元のIDをCPU情報テーブル31にセッ
トし、制御を戻す。
■ Set the ID of the caller in the CPU information table 31 and return control.

実行時間設定処理部26は2例えば第5図に示すように
処理する。以下の説明における処理番号■〜@は、第5
図に示す番号■〜[相]に対応する。
The execution time setting processing unit 26 performs two processes, for example, as shown in FIG. The processing numbers ■~@ in the following explanation are the 5th
Corresponds to numbers ■ to [phase] shown in the figure.

■ タイマ管理部30から、現在のタイマ値を得る。■ Obtain the current timer value from the timer management section 30.

■ この現タイマ値から、CPU情報テーブル31の開
始タイマ値を減算する。
(2) Subtract the start timer value of the CPU information table 31 from this current timer value.

@1 減算結果をCPU情報テーブル31の累積時間り
こ加算しセットする。
@1 The result of subtraction is added to the cumulative time of the CPU information table 31 and set.

■ 呼び出し元のIDを得て、テーブルポインタを呼び
出し元のエントリに戻す。
■ Obtain the caller's ID and return the table pointer to the caller's entry.

@ 現在のタイマ値を、呼び出し元の開始タイマ値とし
て、セントする。その後、実行時間設定処理部26から
制御を戻す。
@Sets the current timer value as the caller's starting timer value. Thereafter, control is returned from the execution time setting processing section 26.

次に、第2図に示す編集法原始プログラム16について
の動作例を、第6図に従って説明する。
Next, an example of the operation of the editing method source program 16 shown in FIG. 2 will be explained with reference to FIG.

特に、第6図(A)は、各プログラム間の制御の移行を
示しており、第6図(B)は、第6図(A)に対応して
、CPU情報テーブル31の内容の変化を示している。
In particular, FIG. 6(A) shows the transition of control between programs, and FIG. 6(B) shows changes in the contents of the CPU information table 31 corresponding to FIG. 6(A). It shows.

なお、CPU情報テーブル31において、O印で囲まれ
た数値は、更新された数値を示している。
Note that in the CPU information table 31, the numerical values surrounded by O marks indicate updated numerical values.

MAINプログラムの0点におけるSTTの呼び出しに
より、CPU情報テーブル31には、プログラム単位名
MA I Nについての開始タイマ値「5」、呼び出し
元IDrOJがセントされる。
By calling the STT at point 0 of the MAIN program, the CPU information table 31 is populated with the start timer value "5" and the calling source IDrOJ for the program unit name MAIN.

次にサブルーチンSUBが呼び出される前に。Next, before subroutine SUB is called.

0点において、STTが呼び出されると、MAINの累
積時間が計算され、CPU情報テーブル31には、第6
図(B)に図示するように、SUBのエントリが設けら
れる。0点においても、同様にPRGのエントリが設け
られる。
When STT is called at point 0, the cumulative time of MAIN is calculated, and the CPU information table 31 contains the sixth
As shown in Figure (B), an entry for SUB is provided. At point 0, a PRG entry is similarly provided.

PRGからSUBへ制御が戻り、0点においてT HK
が呼び出されると、PRGについての実行累積時間が計
算され、SUBについての実行時間計測が再開される。
Control returns from PRG to SUB, and at point 0 THK
When is called, the cumulative execution time for PRG is calculated, and execution time measurement for SUB is restarted.

以下、同様に0点まで、計測が行われ、最終的な結果は
、第6図(B)に示すように9例えばMAINのプログ
ラムの実行CPU時間はr5J、SUBはr5J、PR
Gは「4J、FUNは「3」となる。
Thereafter, measurement is performed in the same way up to the 0 point, and the final results are as shown in FIG.
G becomes "4J" and FUN becomes "3".

これらの実行CPU時間は、各プログラム単位の実行コ
ストに相当する。第1図図木実行CPU時間編集出力部
29は、この情報をもとに1例えば第7図に示すような
プログラム単位の走行比率が表された解析リスト32を
編集し出力する。
These execution CPU times correspond to the execution cost of each program unit. Based on this information, the tree execution CPU time editing output unit 29 in FIG. 1 edits and outputs an analysis list 32 representing the running ratio of each program as shown in FIG. 7, for example.

なお9通常のサブルーチンではなく、計算値を返却する
関数副プログラムのようなものについて計測対象とする
場合には、そのプログラム単位の入口と出口とに、それ
ぞれ上記STTおよびTHKを呼び出す文を組み込んで
もよい。また、従来用いられている文単位の実行回数の
測定と1本発明に係るプログラム単位の実行CPU時間
測定とを組合わせて、一度に処理できるようにしてもよ
い。
Note 9: If you want to measure something like a function subprogram that returns a calculated value instead of a normal subroutine, you can include statements that call the above STT and THK at the entrance and exit of that program unit, respectively. good. Furthermore, the conventional measurement of the number of executions in units of statements and the measurement of the execution CPU time in units of programs according to the present invention may be combined so that processing can be performed at one time.

〔発明の効果〕〔Effect of the invention〕

以上説明したように2本発明によれば、各プログラム単
位に関する実モデルに近い状態の実行CPU時間がわか
り、正確なチューニング情報が得られる。従って、その
分布状態から、最も最適化に効果があるプログラム単位
などを、容易に選択できるようになる。また、システム
ライブラリの部分についても、その実行コストを測定で
きるようになる。
As explained above, according to the present invention, the execution CPU time for each program unit in a state close to the actual model can be determined, and accurate tuning information can be obtained. Therefore, it becomes possible to easily select the program unit that is most effective for optimization based on the distribution state. It will also be possible to measure the execution cost of system libraries.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の基本構成例ブロック図、第2図は本発
明の一実施例による原始プログラムの編集例、第3図は
CPU情報テーブルの例、第4図は本発明の一実施例に
おける計測開始処理の説明図、第5図は本発明の一実施
例における実行時間設定処理の説明図、第6図は本発明
の一実施例による動作側説明図、第7図は本発明の一実
施例による解析リストの出力例を示す。 図中、10は原始プログラム、11はチューニングツー
ル編集部、12はソース解析処理部、13は計測開始呼
び出し文編集部、14は実行時間設定呼び出し文編集部
、15は編集情報ファイル。 16は編集法原始プログラム、17は翻訳実行部。 18はコンパイル部、19は結合編集部、20は実行部
、21はオブジェクトモジュール、22はロードモジュ
ール、23はチューニングツール解析部、24は初期処
理部、25は計測開始処理部。 26は実行時間設定処理部、27は文単位解析処理部、
28はプログラム単位解析処理部、29は実行CPU時
間編集出力部、30はタイマ管理部。 31はCPU情報テーブル、32は解析リストを表す。 特許出願人   冨士通株式会社 代理人弁理士  森1)寛(外1名) 扉艙りアDり9645114列 力 3 肥 乃 7 囚 7MΔIN”QTT’
Fig. 1 is a block diagram of a basic configuration example of the present invention, Fig. 2 is an example of editing a source program according to an embodiment of the present invention, Fig. 3 is an example of a CPU information table, and Fig. 4 is an example of an embodiment of the present invention. 5 is an explanatory diagram of the execution time setting process in an embodiment of the present invention. FIG. 6 is an explanatory diagram of the operation side according to an embodiment of the present invention. An example of outputting an analysis list according to an embodiment is shown. In the figure, 10 is a source program, 11 is a tuning tool editing section, 12 is a source analysis processing section, 13 is a measurement start call statement editing section, 14 is an execution time setting call statement editing section, and 15 is an editing information file. 16 is an editing method source program, and 17 is a translation execution unit. 18 is a compiling section, 19 is a combination editing section, 20 is an execution section, 21 is an object module, 22 is a load module, 23 is a tuning tool analysis section, 24 is an initial processing section, and 25 is a measurement start processing section. 26 is an execution time setting processing section, 27 is a statement unit analysis processing section,
28 is a program unit analysis processing section, 29 is an execution CPU time editing output section, and 30 is a timer management section. 31 represents a CPU information table, and 32 represents an analysis list. Patent Applicant Fujitsu Co., Ltd. Representative Patent Attorney Mori 1) Hiroshi (1 other person) Door barge Dri 9645114 force 3 Hino 7 prisoner 7MΔIN"QTT'

Claims (1)

【特許請求の範囲】 計算機により処理される高級言語で記述された原始プロ
グラム(10)にチューニング情報を取得する文を組み
込むチューニングツール編集部(11)と、編集済原始
プログラム(16)に関するロードモジュール実行時に
呼び出されて上記チューニング情報を取得する文の実行
結果に基づく解析情報を出力するチューニングツール解
析部(23)とからなるプログラム実行解析ツールにお
けるプログラム単位の実行CPU時間測定処理方式であ
って、 上記チューニングツール編集部(11)は、原始プログ
ラム(10)中における各プログラム単位を呼び出す文
の前に、当該各プログラム単位の実行時間計測を開始す
る処理部を呼び出す第1の文を組み込む手段(13)と
、 原始プログラム(10)中における各プログラム単位を
呼び出す文の後に、当該各プログラム単位の実行時間計
測値を累積する処理部を呼び出す第2の文を組み込む手
段(14)とを備え、 上記チューニングツール解析部(23)は、チューニン
グ対象となる各プログラム単位毎に各プログラム単位の
実行CPU時間の累積値が格納されるCPU情報テーブ
ル(31)と、 上記チューニングツール編集部(11)が組み込んだ第
1の文によって起動され、次に計測対象となる呼び出し
先プログラムの実行時間計測開始に関する情報を上記C
PU情報テーブル(31)に設定する計測開始処理手段
(25)と、 上記チューニングツール編集部(11)が組み込んだ第
2の文によって起動され、計測対象となった呼び出し先
プログラムの実行時間計測値の累積値を上記CPU情報
テーブル(31)に設定する実行時間設定処理手段(2
6)と、 上記CPU情報テーブル(31)に設定された実行時間
情報に基づいて、各プログラム単位毎に実行CPU時間
に関する情報を編集し出力する手段(29)とを備えた
ことを特徴とするプログラム単位の実行CPU時間測定
処理方式。
[Claims] A tuning tool editing unit (11) that incorporates a statement for acquiring tuning information into a source program (10) written in a high-level language that is processed by a computer, and a load module related to the edited source program (16). A processing method for measuring execution CPU time in program units in a program execution analysis tool comprising a tuning tool analysis section (23) that outputs analysis information based on the execution result of a statement that is called during execution to obtain the tuning information, the method comprising: The tuning tool editing section (11) includes a means (11) for incorporating, before a statement that calls each program unit in the source program (10), a first statement that calls a processing section that starts measuring the execution time of each program unit. 13), and means (14) for incorporating, after a statement that calls each program unit in the source program (10), a second statement that calls a processing unit that accumulates the execution time measurement value of each program unit, The tuning tool analysis section (23) has a CPU information table (31) in which the cumulative value of the execution CPU time of each program unit is stored for each program unit to be tuned, and the tuning tool editing section (11). Information regarding the start of measurement of the execution time of the called program that is started by the first embedded statement and will be the next measurement target is sent to C above.
The measurement start processing means (25) set in the PU information table (31) and the execution time measurement value of the called program that is the measurement target and is started by the second statement incorporated by the tuning tool editorial department (11). execution time setting processing means (2) for setting the cumulative value of
6), and means (29) for editing and outputting information regarding the execution CPU time for each program unit based on the execution time information set in the CPU information table (31). Execution CPU time measurement processing method for each program.
JP61035775A 1986-02-20 1986-02-20 Measurement processing system for executing cpu time for program unit Pending JPS62216050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61035775A JPS62216050A (en) 1986-02-20 1986-02-20 Measurement processing system for executing cpu time for program unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61035775A JPS62216050A (en) 1986-02-20 1986-02-20 Measurement processing system for executing cpu time for program unit

Publications (1)

Publication Number Publication Date
JPS62216050A true JPS62216050A (en) 1987-09-22

Family

ID=12451258

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61035775A Pending JPS62216050A (en) 1986-02-20 1986-02-20 Measurement processing system for executing cpu time for program unit

Country Status (1)

Country Link
JP (1) JPS62216050A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0415172A2 (en) * 1989-08-26 1991-03-06 Agfa-Gevaert AG Counter-current final treatment apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS585850A (en) * 1981-07-03 1983-01-13 Fujitsu Ltd Program translating device
JPS58225456A (en) * 1982-06-25 1983-12-27 Casio Comput Co Ltd Measuring system of execution time
JPS603763A (en) * 1983-06-22 1985-01-10 Hitachi Ltd Processor of electronic computer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS585850A (en) * 1981-07-03 1983-01-13 Fujitsu Ltd Program translating device
JPS58225456A (en) * 1982-06-25 1983-12-27 Casio Comput Co Ltd Measuring system of execution time
JPS603763A (en) * 1983-06-22 1985-01-10 Hitachi Ltd Processor of electronic computer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0415172A2 (en) * 1989-08-26 1991-03-06 Agfa-Gevaert AG Counter-current final treatment apparatus

Similar Documents

Publication Publication Date Title
US6292940B1 (en) Program complete system and its compile method for efficiently compiling a source program including an indirect call for a procedure
US7016807B2 (en) Device and method for monitoring a program execution
US5303147A (en) Computer aided planning method and system
US20150020051A1 (en) Method and apparatus for automated conversion of software applications
JPS62216050A (en) Measurement processing system for executing cpu time for program unit
JPH0766342B2 (en) Program test equipment
JP4055197B2 (en) Device for analyzing procedures included in the program
JP2004287869A (en) Program execution monitoring device and method
JPS6383861A (en) Automatic processing system for numerical formula
JPH05204705A (en) Processing method for detecting undefined parameter
JPH0193826A (en) System for counting dynamic step of high grade language
JPH0695890A (en) Name replacement system in compiler
EP0694835A1 (en) Integrated software command specification and documentation system
JPH05250221A (en) Simulator execution system
JPH11224185A (en) Device and method for analyzing variable influence
JPH04209029A (en) Parallel process program translation processor
JP2000181691A (en) Program structure analysis system
JP2623554B2 (en) Dynamic Vector Diagnosis Method for Vector Computer
JPH08263272A (en) Library registration method and device for common routine
KR100277479B1 (en) How to compile a separate fill
JP2001273174A (en) Instrument and method for measuring number of program steps and software performance evaluation method
JPH0766343B2 (en) Program test equipment
JPH044434A (en) Program tracing method
JP2006003987A (en) Debug method and debugger
JPH05120025A (en) Inline development method for source program