JP3838804B2 - Analysis device and recording medium - Google Patents

Analysis device and recording medium Download PDF

Info

Publication number
JP3838804B2
JP3838804B2 JP05209899A JP5209899A JP3838804B2 JP 3838804 B2 JP3838804 B2 JP 3838804B2 JP 05209899 A JP05209899 A JP 05209899A JP 5209899 A JP5209899 A JP 5209899A JP 3838804 B2 JP3838804 B2 JP 3838804B2
Authority
JP
Japan
Prior art keywords
call
information
unit
application program
interrupt
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.)
Expired - Fee Related
Application number
JP05209899A
Other languages
Japanese (ja)
Other versions
JP2000250780A (en
Inventor
登 浅井
直樹 興津
一男 渡辺
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 JP05209899A priority Critical patent/JP3838804B2/en
Publication of JP2000250780A publication Critical patent/JP2000250780A/en
Application granted granted Critical
Publication of JP3838804B2 publication Critical patent/JP3838804B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は解析装置および記録媒体に関し、特に、複数の呼び出し単位から構成されるアプリケーションプログラムの動作状況を解析する解析装置およびそのような解析処理をコンピュータに実行させるプログラムが記録されたコンピュータ読み取り可能な記録媒体に関する。
【0002】
【従来の技術】
近年、コンピュータ等の情報処理装置のハードウエアの進歩に伴って、ハードウエアを動作させるためのソフトウエアも複雑高度化しており、そのデバッグや最適化に必要な労力も増大の一歩を辿っている。
【0003】
このようなソフトウエア開発を援助するツールとして、ハードウエアやソフトウエアの構成単位にかかる負荷を解析する負荷解析ツールがいくつか存在しているが、これらは大別すると、(1)サンプリングに基づくツールと(2)関数やオブジェクト等の呼び出し単位の呼び出し系列に基づくツールの2種類となる。
【0004】
前者のサンプリングに基づくツールは、解析対象となるアプリケーションプログラムの実行中に、所定の周期で割り込みを発生し、割り込みが発生した時点で実行中であったアプリケーションプログラムのアドレス情報を取得する。そして、このアドレス情報から実行中の関数を割り出すことにより、各関数がどのような頻度で実行されているかを表示する。
【0005】
また、後者の呼び出し単位の呼び出し系列に基づくものは、呼び出し単位が例えば関数であるとすると、ある関数が呼び出されてから、その関数の処理を終了して呼び出しを行った他の関数に復帰するまでの時間を計測することにより、各関数の実際の実行時間を表示する。
【0006】
【発明が解決しようとする課題】
しかし、前者のサンプリングに基づくツールでは、各関数の実行回数を示す情報のみしか得られないため、例えば、所定の関数の実行回数が多い(負荷が高い)場合に、どのような局面において負荷が高くなるかを知ることができず、最適化を行うことが困難であるという問題点があった。
【0007】
また、後者の関数の呼び出し系列に基づくツールでは、関数が呼び出される度に割り込みを発生して負荷解析のための処理を実行する必要があることから、この処理が大きなオーバヘッドとなって誤差の原因となるため、正確な測定が困難であるという問題点があった。
【0008】
本発明はこのような点に鑑みてなされたものであり、必要な情報を収集してユーザに提供することにより、アプリケーションプログラムの最適化等を円滑に行うことを可能とする解析装置を提供することを目的とする。
【0009】
【課題を解決するための手段】
本発明では上記課題を解決するために、複数の呼び出し単位から構成されるアプリケーションプログラムの動作状況を解析する解析装置において、所定の周期で割り込みが発生するように制御部を設定する割り込み設定手段と、対象となる前記アプリケーションプログラムの実行を開始するアプリケーションプログラム実行手段と、前記アプリケーションプログラムを実行中に前記割り込み設定手段で設定した割り込みが発生した場合には、割り込み発生時、実行中の前記呼び出し単位が呼び出されるまでに経由した全ての前記呼び出し単位を特定する呼び出し情報を前記制御部が備えるメモリのスタックから取得し、既に記憶している前記呼び出し情報と同一のものが存在する場合には既に記憶している前記呼び出し情報を同一パターンにまとめて記憶し、存在しない場合には新たなパターンとして記憶する呼び出し情報取得手段と、前記アプリケーションプログラムの動作が終了した場合に、前記呼び出し情報取得手段が記憶した前記呼び出し情報で示された全ての前記呼び出し単位の累積的な呼び出し回数を累積カウント数として集計し、前記呼び出し情報で示された最も深いネストに該当する前記呼び出し単位の呼び出し回数を実カウント数として集計する集計手段と、前記集計手段によって得られた前記各呼び出し単位の名称、前記累積カウント数、および、前記実カウント数を関連付けて表示させる表示手段と、を備えることを特徴とする解析装置が提供される。
【0011】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。
図1は、本発明の実施の形態の構成例を示すブロック図である。この図に示すように、本発明に係る解析装置1は、割り込み設定手段1a、アプリケーションプログラム実行手段1b、記録装置1c、呼び出し情報取得手段1d、集計手段1e、表示手段1g、入力手段1f、および、制御部1hによって形成されている。また、解析装置1の外部には、CRT(Cathode Ray Tube)モニタ2が接続されている。
【0012】
割り込み設定手段1aは、解析対象となるアプリケーションプログラムを実行する際に、所定の周期で割り込みが発生するように制御部1hを設定する。
制御部1hは、例えば、CPU(Central Processing Unit)やメモリ等によって構成されており、アプリケーションプログラムを実際に実行するとともに、装置の各部を制御する。
【0013】
記録装置1cは、解析の対象となるアプリケーションプログラムやオペレーティングシステム(OS)を記録しており、アプリケーションプログラム実行手段1bからの要求に応じて所定の情報を読み出して供給する。また、必要に応じて所定のデータ等を記録する。
【0014】
アプリケーションプログラム実行手段1bは、解析の対象となるアプリケーションプログラムを記録装置1cから読み出してその実行を開始する。
呼び出し情報取得手段1dは、アプリケーションプログラムが実行されている場合において、このアプリケーションプログラムを構成する呼び出し単位(例えば、関数、オブジェクト、手続、または、サブルーチン等)が呼び出されたときに、制御部1hの内部のメモリにスタックされている呼び出し情報を取得する。
【0015】
なお、この呼び出し情報は、例えば、呼び出し単位が関数である場合には、割り込みが発生した時点において実行中であった関数に至るまでにメイン関数から経由した全ての関数のアドレス情報と、各関数が呼び出された時点の時間を示すタイムスタンプ等によって構成されている。
【0016】
集計手段1eは、呼び出し情報取得手段1dが取得した情報を、呼び出しパターン毎に集計する。
入力手段1fは、例えば、キーボード等からの情報の入力を受ける。この入力手段1fからは、解析の対象となるアプリケーションプログラムを指定するための情報や、CRTモニタ2の表示形態を変更するための情報が入力される。
【0017】
表示手段1gは、集計手段1eによって集計された呼び出し情報を、入力手段1fから入力された情報に基づいた所定の表示形式により表示装置2に表示させる。
【0018】
次に、以上の実施の形態の動作について説明する。
いま、入力手段1fから、解析の対象となるアプリケーションプログラムを特定するための情報が入力されたとすると、アプリケーションプログラム実行手段1bは、記録装置1cから該当するアプリケーションプログラムを取得する。
【0019】
このとき、割り込み設定手段1aは、所定の周期(例えば、500msec周期)で割り込みが発生するように制御部1hを設定する。その結果、アプリケーションプログラムの実行が開始されると、所定の周期で割り込みが発生することになる。
【0020】
割り込みが発生すると、呼び出し情報取得手段1dは、制御部1hの内部にあるメモリ等にスタックされている呼び出し情報を取得する。なお、呼び出し情報は、前述したように、割り込み発生時に実行中の関数が呼び出されるまでにメイン関数から経由した全ての関数のアドレス情報である。例えば、現在、関数「sub7」が実行中であり、この関数に至るまでにメイン関数から経由した関数が、「main」、「sub2」、「sub3」、および、「sub5」であるとすると、これら全ての関数に対応するアドレスが呼び出し情報として取得されることになる。なお、このとき、各関数が呼び出された時間を示すタイムスタンプも同時に取得される。
【0021】
集計手段1eは、取得された呼び出し情報を、そのパターンに応じて分類する。即ち、関数の呼び出しパターンの種類はある程度限られているので、呼び出し情報をパターン毎に分類することにより情報量を減少させる。
【0022】
例えば、現在実行中の関数(割り込みが発生した関数)が「sub5」である場合に、この関数に至るまでにメイン関数から経由した関数が、「main」、「sub2」、および、「sub3」である場合には、前述した呼び出し情報の場合と比較すると「sub5」が含まれていないことになるが、この「sub5」の処理前(または、「sub5」の処理後)に割り込みが発生したと考えられることから、前述の場合と同様のパターンであると判定されることになる。
【0023】
以上のような処理は、制御部1hがアプリケーションプログラムを実行している間中繰り返し実行される。
そして、制御部1hによるアプリケーションプログラムの実行が終了すると、割り込み設定手段1aは、割り込みの発生を停止させる。また、集計手段1eは、パターン毎に分類された呼び出し情報に含まれているアドレス情報を参照して、各関数の累積的な呼び出し回数である累積カウント数と、各関数が各呼び出し情報の最後に含まれている回数である実カウント数とを算出する。
【0024】
例えば、ある呼び出し情報に含まれている関数が「main」、「sub2」、および、「sub3」であるとし、これらの関数の累積カウント数をそれぞれ、acm、ac2、および、ac3とし、また、これらの関数の実カウント数をそれぞれrcm、rc2、および、rc3とすると、以上の呼び出し情報に対する累積カウント数と実カウント数は、acm=ac1=ac2=ac3=1となり、rcm=rc1=rc2=0となり、また、rc3=1となる。
【0025】
集計手段1eは、以上のような処理を繰り返すことにより、各関数の累積カウント数および実カウント数を算出する。
表示手段1gは、集計手段1eによって集計された各関数に対する累積カウント数と、実カウント数とを取得するとともに、その関数の関数名を記録装置1cから取得して、これらを関連づけする。
【0026】
関連づけが終了すると、表示手段1gは、各パターンをそのネストの深さに応じてインデントしつつ、CRTモニタ2に表示させる。図2は、このような処理の結果としてCRTモニタ2に表示される表示画面の一例である。
【0027】
この表示例では、「解析結果表示」と題されたウィンドウ20が表示されており、このウィンドウ20内に集計手段1eによって集計された情報が表示されることになる。
【0028】
ウィンドウ20の右上に表示されている、ボタン20a〜20cは、このウィンドウ20を縮小、拡大、または、終了する場合にそれぞれ操作される。
表示領域20dには、集計手段1eによって集計された情報が表示される。例えば、この表示例の第1行目に表示されている「<00>main[a0,b0]」の場合では、<>内の数字“00”は、この関数のネストの深さが“0”であることを示している。また、その次の「main」は、関数名を示している。更に、[]内の変数a0,b0は、それぞれ、累積カウント数と実カウント数とを示している。
【0029】
第2行目に表示されている「<01>sub1[a1,b1]」は、ネストの深さが“1”であり、関数名が「sub1」であり、更に、累積カウント数と実カウント数とがそれぞれa1,b1であことが表示されている。なお、各行の行頭は、そのネストの深さに応じてインデントされているので、アプリケーションプログラムが構造化されている場合に、各関数の対応関係を把握することが容易となる。
【0030】
また、ウィンドウ20の右端に表示されているスライダ20e、または、ボタン20f,20gを適宜操作することにより、表示領域20dに表示される内容がスクロールすることになるので、ユーザは所望の範囲を自由に選択して参照することが可能となる。
【0031】
次に、図3を参照して、以上の処理を実現するために、図1に示す実施の形態において実行される処理の一例について説明する。図3に示すフローチャートが開始されると、以下の処理が実行されることになる。
[S1]入力手段1fから、解析対象となるアプリケーションプログラム名が入力される。
[S2]入力手段1fから、割り込み周期を変更することを指示する情報が入力された場合には、割り込み周期の設定を変更する。
【0032】
なお、割り込み周期の設定が変更されない場合には、割り込み周期はデフォルト値(例えば、500ms)に自動的に設定される。
[S3]入力手段1fからアプリケーションプログラムの実行を指示する情報が入力されたか否かを判定し、入力された場合にはステップS4に進み、それ以外の場合にはステップS3に戻って同様の処理を繰り返す。
[S4]アプリケーションプログラム実行手段1bは、記録装置1cから指定されたアプリケーションプログラムを取得し、制御部1hに供給してその実行を開始させる。
[S5]割り込みが発生した場合にはステップS6に進み、それ以外の場合にはステップS7に進む。
[S6]割り込み処理を実行する。なお、この処理の詳細については図4を参照して後述する。
[S7]アプリケーションプログラムの実行が終了したか否かが判定され、終了した場合にはステップS8に進み、それ以外の場合にはステップS5に戻る。
[S8]集計手段1eは、割り込み処理によって取得された呼び出し情報を集計する集計処理を実行する。
【0033】
なお、この処理の詳細は、図5を参照して後述する。
[S9]表示手段1gは、集計手段1eによって集計された情報を、CRTモニタ2に対して供給して表示させる。
【0034】
次に、図4を参照して図3に示す「割り込み処理」の詳細について説明する。図4に示すフローチャートが開始されると、以下の処理が実行されることになる。
[S20]呼び出し情報取得手段1dは、その時点(割り込みが発生した時点)において、制御部1hがアプリケーションプログラムを実行する際に、関数の戻り先情報としてメモリにスタックしている呼び出し情報を取得する。
[S21]呼び出し情報取得手段1dは、既に取得している呼び出し情報の中から、ステップS20において取得した呼び出し情報と同一パターンを有するものを検索する。
[S22]ステップS21における検索の結果、同一パターンを有する呼び出し情報が既に存在している場合にはステップS23に進み、それ以外の場合にはステップS24に進む。
[S23]ステップS20において取得した呼び出し情報を、既に記憶している他の同一パターンとまとめて記憶する。そして、もとの処理へ復帰(リターン)する。
[S24]ステップS20において取得した呼び出し情報を、新たなパターンとして記憶する。そして、もとの処理へ復帰(リターン)する。
【0035】
次に、図5を参照して図3に示す「集計処理」の詳細について説明する。図5に示すフローチャートが開始されると、以下の処理が実行されることになる。
[S40]集計手段1eは、制御部1hからアプリケーションプログラムを構成する関数名とそのアドレスとを取得する。
[S41]ステップS40において取得した各関数毎に、累積カウント数を格納する変数axと、実カウント数を格納する変数bxとを準備する。
[S42]処理回数をカウントする変数iと変数jの値を“1”に初期設定する。
[S43]第i番目のパターンを取得する。例えば、i=1である場合には、第1番目のパターンに属する全ての関数を取得する。
[S44]ステップS43において取得した各関数に対応する変数(第i番目のパターンに含まれている変数ax,bx)を準備する。
[S45]集計手段1eは、第j番目の呼び出し情報を、呼び出し情報取得手段1dから取得する。
[S46]ステップS45において取得した呼び出し情報に含まれている関数を全て取得する。
[S47]ステップS46において取得した全ての関数に対応する変数axの値をそれぞれ1だけインクリメントする。
[S48]ステップS45において取得した呼び出し情報の最後に含まれている関数(最もネストが深い関数)を取得する。
[S49]ステップS48において取得した関数に対応する変数bxの値を1だけインクリメントする。
[S50]第i番目のパターンにおいて、未処理の呼び出し情報があるか否かが判定され、未処理の呼び出し情報がある場合にはステップS51に進み、それ以外の場合にはステップS52に進む。
[S51]変数jの値が1だけインクリメントされステップS45に戻る。
[S52]未処理のパターンがあるか否かが判定され、未処理のパターンがある場合にはステップS53に進み、それ以外の場合にはもとの処理に復帰(リターン)する。
[S53]変数iの値が1だけインクリメントされ、ステップS54に進む。
[S54]変数jの値を“1”に設定してステップS43に戻る。
【0036】
以上の処理によれば、解析の対象となるアプリケーションプログラムが実行された場合には、所定の周期で割り込みを発生して呼び出し情報を収集し、アプリケーションプログラムの実行が終了後に、呼び出し情報から各関数の累積カウント数と実カウント数とを算出してCRTモニタ2に出力することが可能となる。
【0037】
このように、本発明によれば、解析の対象となるアプリケーションプログラムを実行中に、所定の周期で割り込みを発生させるとともに、割り込み発生時には、メイン関数からその時点において実行中の関数に至るまでの関数のアドレスによって構成される呼び出し情報を取得し、パターン毎に分類して保存しておく。そして、アプリケーションプログラムの実行が終了すると、各関数の累積カウント数および実カウント数を算出し、所定の表示形式により表示するようにしたので、従来のサンプリングに基づくツールに比較して、詳細な情報を取得することが可能となる。即ち、従来のサンプリングに基づくツールの場合では、割り込み発生時に取得される情報は、その時点において実行されていた関数に関する情報(例えば、関数のアドレス)のみであり、一方、本発明の場合ではその時点において実行されている関数のみならず、メイン関数からその関数に至るまでの全ての関数に関する情報(スタック情報)が取得されるので、従来の場合に比較して詳細な情報を提供することができる。
【0038】
また、従来の関数の呼び出し系列に基づくツールでは、関数が呼び出される度に割り込みを発生して負荷解析のための処理を実行する必要があることから、この処理が大きなオーバヘッダとなり、誤差の原因となる場合があったが、本発明の場合、割り込み発生の周期を適宜設定することにより、情報の詳細度を犠牲にする代わりに誤差の発生を抑制したり、情報の詳細度を向上させる代わりに誤差の発生を犠牲にする等、ユーザの目的に応じた設定が可能となる。
【0039】
更に、関数の呼び出し情報が、パターン毎に分類されて表示されるので、ある関数の負荷が高い場合に、どのような呼び出しパターン時に負荷が高くなるのかを特定することが可能となることから、アプリケーションプログラムの最適化を円滑に行うことが可能となる。
【0040】
次に、図6を参照して、CRTモニタ2に対する表示形式を変更した場合の表示例について説明する。
例えば、入力手段1fから、CRTモニタ2に表示されるネストの深さを0〜2までに限定する旨の情報が入力されたとする。その場合、表示手段1gは、集計手段1eによって集計されて得られた情報をCRTモニタ2に出力する際に、ネストの深さが3以上に該当する関数についての情報は出力しない。その結果、図6に示す画面がCRTモニタ2に表示される。
【0041】
図6に示す表示例では、図2の場合と比較して、表示領域20dに表示されている情報のうち、ネストが3以上に該当する情報については表示されていない。例えば、図2の第4行目に表示されている関数「sub3」は、図6では表示されていない。また、その前の行の最後には、マーク「*」が付加されており、それに続く関数が省略されていることが示されている。
【0042】
このような表示画面において、例えば、第6行目の最後に表示されているマーク「*」がカーソル25によって指定されたとすると、図7に示すように、ダイアログボックス30がCRTモニタ2に追加的に表示され、省略されている情報を参照することが可能となる。この例では、「詳細表示」と題されたダイアログボックス30が表示されており、その表示領域30bには、ウィンドウ20において指定されたマーク「*」の次に表示されるべき情報が表示されている。
【0043】
このような表示形式にすることにより、アプリケーションプログラムに含まれている関数の数が多い場合には、ネストが浅い情報のみを表示させておき、必要な場合にのみ省略された情報を適宜表示させることが可能となるので、作業を効率的に行うことが可能となる。
【0044】
なお、ネストの深さによって表示する情報を制限するのではなく、例えば、関数の累積カウント数または実カウント数が所定の値を超えるもののみを表示させるようにしてもよい。そのようにすることにより、呼び出し回数が頻繁な関数のみを画面上に表示させることが可能となるので、主要な情報のみを参照することが可能となる。
【0045】
以上の表示例では、解析結果をテキスト情報として画面上に表示するようにしたが、図8に示すようにチャート形式で表示するようにしてもよい。
図8に示す表示例では、「時系列表示」と題されたウィンドウ40が表示されている。ウィンドウ40の右上には、このウィンドウ40を、縮小、拡大、終了する場合に操作されるボタン40a〜40cが表示されている。
【0046】
表示領域40dの横軸はアプリケーションプログラムの実行が開始されてからの経過時間を示し、縦軸はアプリケーションプログラムを構成する各関数が示されている。また、表示領域40d内に示されている矢印は、その関数が実行されていた期間を示している。
【0047】
表示領域40dの右側に具備されたスライダ40eおよびボタン40f,40gは、表示領域40dに表示されている内容を上下方向にスクロールする場合に操作される。また、表示領域40dの下側に具備されたスライダ40hおよびボタン40i,40jは、表示領域40dに表示されている内容を左右方向にスクロールする場合に操作される。
【0048】
ところで、図8に示すような表示を行う場合には、各関数が呼び出された時間に関する情報も必要となるが、これは、前述した、呼び出し情報取得手段1dが取得したタイムスタンプを使用することによって可能となる。
【0049】
即ち、各関数のアドレス情報には、タイムスタンプが関連付けられて記憶されていることから、取得されたアドレス情報をタイムスタンプの時間が古い順に並べ替え、アドレス情報に応じた位置に矢印を表示するようにすれば、図8に示す図を得ることができる。
【0050】
なお、図8に示す画面において、図9に示すように所定の矢印をカーソル25によって指定すると、その部分に対応する詳細な情報が記載されたダイアログボックスが表示されることになる。この例では、関数「sub1」の最初の矢印の中央部分がカーソル25によって指定された結果、「詳細情報(sub1)」と題されたダイアログボックス50が表示されており、関数「sub1」に対する呼び出しを行った他の関数の一覧が表示されている。即ち、関数「sub1」が実行される迄には、先ず、関数「subD」が呼び出され、続いて、関数「subC」、「subB」、「subA」が順次呼び出された後、関数「sub1」が呼び出されている。
【0051】
以上に説明したように、図8および図9に示す表示形態によれば、取得された呼び出し情報をチャート形式で表示するようにしたので、時系列的な動作を理解しやすい表示形式にて取得した情報を表示することができる。なお、本発明の実施の形態においては、割り込みが発生する度に呼び出し情報を取得する構成であるため、割り込みの周期が長い場合には情報が欠落することもあり得るが、プログラム中では同一のパターンによる呼び出しが繰り返される場合が多いことから、欠落した部分の情報は他の部分において補うことが可能な場合が多く、情報欠落に起因する影響は僅少である。
【0052】
以上の実施の形態では、単一のアプリケーションプログラムが実行されている場合を例に挙げて説明を行ったが、制御部1hが複数のCPUを有しており、複数のアプリケーションプログラムが並列に実行される場合に対しても本発明を適用することが可能である。なお、1つのアプリケーションプログラムが複数のプロセッサに分担されて実行される場合にも同様に本発明を適用することができる。
【0053】
制御部1hが複数のCPUを有している場合には、各CPU単位で割り込みを発生し、呼び出し情報取得手段1dが各CPUから呼び出し情報を取得することになる。取得された呼び出し情報は、集計手段1eによって各CPU毎に集計された後、表示手段1gに供給される。
【0054】
表示手段1gは、集計手段1eによって集計された複数のCPUに関する情報を、CRTモニタ2に対して並べて表示させる。その結果表示される画面を図10に示す。この表示例では、「解析結果表示」と題されたウィンドウ60が表示されている。ウィンドウ60の右上には、このウィンドウ60を縮小、拡大、または、閉じる場合に操作されるボタン60a〜60cが表示されている。表示領域60dには、第1のCPUにおいて実行されたプロセス0(この例では、アプリケーションプログラム0)に関する情報が表示されている。また、表示領域60eには、第2のCPUにおいて実行されたプロセス1に関する情報が表示されている。
【0055】
なお、この表示例では、プロセス0およびプロセス1に関する情報のみを表示しているが、ウィンドウ60の下部に表示されているスライダ60iまたはボタン60j,60kを適宜操作して画面を横方向にスクロールさせることにより、所望のプロセスに関する情報を参照することが可能となる。
【0056】
また、スライダ60fまたはボタン60g,60hを適宜操作して画面を上下方向にスクロールさせることにより、表示されている情報の所定の範囲を参照することが可能となる。
【0057】
なお、このような表示画面において、所定の項目がカーソル25によって選択された場合には、図11に示すようなダイアログボックス80が表示され、指定された項目が実行されている場合における各CPUの負荷の分布に関する情報が表示されることになる。
【0058】
この表示例では、表示領域80bには、CPUの番号が表示されており、また、表示領域80cには、平均値である70%を中心とした棒グラフによって各CPUの負荷率が示されている。更に、表示領域80dには平均値70%を基準とした偏差が表示されている。
【0059】
なお、以上の表示例では、棒グラフによって負荷の分布を示すようにしたが、図12に示すように、数値によって表示するようにしてもよい。この表示例では、カーソル25による表示項目の指定に対応して、ダイアログボックス90が表示されている。このダイアログボックス90の表示領域90bには、CPUの番号が表示されており、表示領域90cには負荷率が数値によって表示されている。更に、その右隣りの表示領域90dには、各CPUにおけるサンプル数が表示されている。
【0060】
次に、図13を参照して、各CPUから取得された呼び出し情報を、チャート形式で表示する場合の表示例について説明する。
この表示例では、「時系列表示」と題されたウィンドウ100が表示されている。ウィンドウ100の右上部には、ウィンドウを縮小、拡大、または、閉じる場合に操作されるボタン100a〜100cが表示されている。
【0061】
表示領域100dには、第1のCPUが実行するプロセス0に関する情報が表示されている。また、表示領域100eには第2のCPUが実行するプロセス1に関する情報が表示されている。
【0062】
この表示例では、第1および第2のCPUが実行するプロセスに関する情報のみが表示されているが、ボタン100fまたはボタン100gを適宜操作して画面をスクロールさせることにより、所定のプロセスに関する情報を参照することが可能となる。また、スライダ100hまたはボタン100i,100jを操作することにより、表示領域100dに表示される情報の範囲を選択することができる。同様に、スライダ100kまたはボタン100l,100mを操作することにより、表示領域100eに表示される情報の範囲を選択することができる。更に、スライダ100nまたはボタン100o,100pを操作することにより、表示領域100dおよび表示領域100eに表示される情報の範囲を選択することができる。
【0063】
なお、このような表示例において、所定の矢印が指定された場合には、図9に示すように詳細な情報が表示されるようにしてもよい。
以上に示すように、複数のCPUにおいてプロセスが並列的に実行されている場合においても、本発明を適用することが可能であり、従来のツールに比較して、オーバーヘッドを少なくすることが可能であるので、誤差の少ない解析を行うことが可能となる。
【0064】
なお、上記の処理機能は、コンピュータによって実現することができる。その場合、解析装置が有すべき機能の処理内容は、コンピュータで読み取り可能な記録媒体に記録されたプログラムに記述されており、このプログラムをコンピュータで実行することにより、上記処理がコンピュータで実現される。コンピュータで読み取り可能な記録媒体としては、磁気記録装置や半導体メモリ等がある。
【0065】
市場に流通させる場合には、CD−ROM(Compact Disk Read Only Memory) やフロッピーディスク等の可搬型記録媒体にプログラムを格納して流通させたり、ネットワークを介して接続されたコンピュータの記憶装置に格納しておき、ネットワークを通じて他のコンピュータに転送することもできる。コンピュータで実行する際には、コンピュータ内のハードディスク装置等にプログラムを格納しておき、メインメモリにロードして実行するようにすればよい。
【0066】
【発明の効果】
以上説明したように本発明では、関数の呼び出し情報が、パターン毎に分類されて表示されるので、ある関数の負荷が高い場合に、どのような呼び出しパターン時に負荷が高くなるのかを特定することが可能となることから、アプリケーションプログラムの最適化を円滑に行うことが可能となる。
【図面の簡単な説明】
【図1】本発明の実施の形態の構成例を示すブロック図である。
【図2】図1に示す実施の形態のCRTモニタに表示される解析結果表示画面の表示例である。
【図3】図1に示す実施の形態において実行される処理の一例を説明するフローチャートである。
【図4】図3に示す「割り込み処理」の詳細を説明するフローチャートである。
【図5】図3に示す「集計処理」の詳細を説明するフローチャートである。
【図6】図1に示す実施の形態のCRTモニタに表示される解析結果表示画面の他の表示例である。
【図7】図6に示す表示画面において、マーク「*」が選択された場合に表示されるダイアログボックスの表示例である。
【図8】図1に示す実施の形態のCRTモニタに表示される解析結果表示画面の更に他の表示例である。
【図9】図8に示す表示画面において、所定の矢印が指定された場合に表示されるダイアログボックスの表示例である。
【図10】解析対象が並列プログラムである場合における解析結果表示画面の表示例である。
【図11】図10に示す画面において、所定の項目が選択された場合に表示されるダイアログボックスの表示例である。
【図12】図10に示す画面において、所定の項目が選択された場合に表示されるダイアログボックスの他の表示例である。
【図13】解析対象が並列プログラムである場合における解析結果表示画面の他の表示例である。
【符号の説明】
1 解析装置
1a 割り込み設定手段
1b アプリケーションプログラム実行手段
1c 記録装置
1d 呼び出し情報取得手段
1e 集計手段
1f 入力手段
1g 表示手段
2 CRTモニタ
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an analysis apparatus and a recording medium, and in particular, an analysis apparatus that analyzes an operation state of an application program composed of a plurality of call units and a computer-readable recording program that causes a computer to execute such analysis processing. The present invention relates to a recording medium.
[0002]
[Prior art]
In recent years, with the advancement of hardware of information processing devices such as computers, software for operating hardware has become more complex and sophisticated, and the labor required for debugging and optimization has been increasing. .
[0003]
There are several load analysis tools that analyze the load on hardware and software components as a tool for supporting such software development. These can be broadly classified as follows: (1) Based on sampling There are two types: tools and (2) tools based on the calling sequence of calling units such as functions and objects.
[0004]
The former sampling-based tool generates an interrupt at a predetermined period during the execution of the application program to be analyzed, and acquires the address information of the application program being executed when the interrupt occurs. Then, by calculating the function being executed from the address information, it is displayed how often each function is executed.
[0005]
In the latter case, if the call unit is a function, for example, after the function is called, the process of that function is terminated and the function is returned to the other function that called it. By measuring the time until, the actual execution time of each function is displayed.
[0006]
[Problems to be solved by the invention]
However, in the former tool based on sampling, only information indicating the number of executions of each function can be obtained. For example, when the number of executions of a predetermined function is large (the load is high) There is a problem in that it is difficult to know whether it becomes high and it is difficult to perform optimization.
[0007]
In addition, the tool based on the latter function call sequence needs to generate an interrupt every time the function is called and execute processing for load analysis.-Since it becomes a head and causes an error, there is a problem that accurate measurement is difficult.
[0008]
The present invention has been made in view of these points, and provides an analysis apparatus that can smoothly perform optimization of application programs and the like by collecting necessary information and providing it to the user. For the purpose.
[0009]
[Means for Solving the Problems]
  In the present invention, in order to solve the above problems,In an analysis device for analyzing the operation status of an application program composed of a plurality of calling units, an interrupt setting means for setting a control unit so that an interrupt is generated at a predetermined cycle, and execution of the target application program is started And when the interrupt set by the interrupt setting means occurs during execution of the application program, all the calls that have passed through until the call unit being executed is called when the interrupt occurs Call information specifying a unit is acquired from a stack of a memory included in the control unit, and when there is the same call information as the already stored call information, the already stored call information is collected in the same pattern. If there is no new Call information acquisition means stored as a simple pattern, and when the operation of the application program ends, the cumulative number of calls for all the call units indicated by the call information stored by the call information acquisition means is accumulated. Aggregating as a count number, totaling means for totaling the number of calls of the call unit corresponding to the deepest nest shown in the call information as an actual count number, and the name of each call unit obtained by the aggregation means, Display means for displaying the cumulative count number and the actual count number in association with each other.The analysis apparatus characterized by this is provided.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a configuration example of an embodiment of the present invention. As shown in this figure, the analysis apparatus 1 according to the present invention includes an interrupt setting means 1a, an application program execution means 1b, a recording device 1c, a call information acquisition means 1d, a counting means 1e, a display means 1g, an input means 1f, and The control unit 1h is formed. Also, a CRT (Cathode Ray Tube) monitor 2 is connected to the outside of the analysis apparatus 1.
[0012]
When executing the application program to be analyzed, the interrupt setting unit 1a sets the control unit 1h so that an interrupt is generated at a predetermined cycle.
The control unit 1h is configured by, for example, a CPU (Central Processing Unit), a memory, and the like, and actually executes an application program and controls each unit of the apparatus.
[0013]
The recording device 1c records an application program and an operating system (OS) to be analyzed, and reads and supplies predetermined information in response to a request from the application program execution unit 1b. Further, predetermined data or the like is recorded as necessary.
[0014]
The application program execution unit 1b reads an application program to be analyzed from the recording device 1c and starts its execution.
When the application program is being executed, the call information acquisition unit 1d is configured to execute the call of the control unit 1h when a call unit (for example, a function, an object, a procedure, or a subroutine) constituting the application program is called. Get call information stacked in internal memory.
[0015]
For example, when the call unit is a function, this call information includes the address information of all the functions passed from the main function up to the function being executed at the time of occurrence of the interrupt, and each function. It is constituted by a time stamp or the like indicating the time at the time when is called.
[0016]
The totaling unit 1e totals the information acquired by the call information acquisition unit 1d for each call pattern.
The input unit 1f receives information input from a keyboard or the like, for example. Information for specifying an application program to be analyzed and information for changing the display form of the CRT monitor 2 are input from the input means 1f.
[0017]
The display unit 1g causes the display device 2 to display the call information aggregated by the aggregation unit 1e in a predetermined display format based on the information input from the input unit 1f.
[0018]
Next, the operation of the above embodiment will be described.
Now, assuming that information for specifying an application program to be analyzed is input from the input unit 1f, the application program executing unit 1b acquires the corresponding application program from the recording device 1c.
[0019]
At this time, the interrupt setting unit 1a sets the control unit 1h so that an interrupt is generated at a predetermined cycle (for example, a cycle of 500 msec). As a result, when the execution of the application program is started, an interrupt is generated at a predetermined cycle.
[0020]
When an interrupt occurs, the call information acquisition unit 1d acquires call information stacked in a memory or the like inside the control unit 1h. Note that, as described above, the call information is address information of all functions that have passed from the main function until the function being executed is called when an interrupt occurs. For example, if the function “sub7” is currently being executed and the functions that have passed through the main function up to this function are “main”, “sub2”, “sub3”, and “sub5”, Addresses corresponding to all these functions are acquired as call information. At this time, a time stamp indicating the time when each function is called is also acquired.
[0021]
The counting means 1e classifies the acquired call information according to the pattern. That is, since the types of function call patterns are limited to some extent, the amount of information is reduced by classifying the call information for each pattern.
[0022]
For example, when the function currently being executed (the function in which the interrupt has occurred) is “sub5”, the functions that have passed through the main function up to this function are “main”, “sub2”, and “sub3”. In this case, “sub5” is not included as compared with the case of the call information described above, but an interrupt occurred before the processing of “sub5” (or after the processing of “sub5”). Therefore, it is determined that the pattern is the same as that described above.
[0023]
The above processing is repeatedly executed while the control unit 1h executes the application program.
When the execution of the application program by the control unit 1h is completed, the interrupt setting unit 1a stops the generation of the interrupt. Further, the counting unit 1e refers to the address information included in the call information classified for each pattern, and determines the cumulative count number that is the cumulative number of calls of each function and the last of each call information. And the actual count that is the number of times included in the.
[0024]
For example, it is assumed that functions included in certain call information are “main”, “sub2”, and “sub3”, and the cumulative counts of these functions are acm, ac2, and ac3, respectively, If the real count numbers of these functions are rcm, rc2, and rc3, respectively, the accumulated count number and the real count number for the above call information are acm = ac1 = ac2 = ac3 = 1, and rcm = rc1 = rc2 = 0 and rc3 = 1.
[0025]
The counting unit 1e calculates the cumulative count number and the actual count number of each function by repeating the above processing.
The display unit 1g obtains the cumulative count number and the actual count number for each function aggregated by the aggregation unit 1e, acquires the function name of the function from the recording device 1c, and associates them.
[0026]
When the association is completed, the display unit 1g displays each pattern on the CRT monitor 2 while indenting according to the depth of the nest. FIG. 2 is an example of a display screen displayed on the CRT monitor 2 as a result of such processing.
[0027]
In this display example, a window 20 titled “Analysis result display” is displayed, and the information aggregated by the aggregation means 1e is displayed in this window 20.
[0028]
The buttons 20a to 20c displayed on the upper right of the window 20 are operated when the window 20 is reduced, enlarged, or ended.
In the display area 20d, information aggregated by the aggregation unit 1e is displayed. For example, in the case of “<00> main [a0, b0]” displayed on the first line of this display example, the number “00” in <> indicates that the nesting depth of this function is “0”. ". The next “main” indicates a function name. Furthermore, variables a0 and b0 in [] indicate the cumulative count number and the actual count number, respectively.
[0029]
“<01> sub1 [a1, b1]” displayed on the second line has a nesting depth of “1”, a function name of “sub1”, and the cumulative count and actual count. The numbers are displayed as a1 and b1, respectively. Since the head of each line is indented according to the nesting depth, it is easy to grasp the correspondence between the functions when the application program is structured.
[0030]
Further, by appropriately operating the slider 20e or the buttons 20f and 20g displayed on the right end of the window 20, the content displayed in the display area 20d is scrolled, so that the user can freely set a desired range. It is possible to select and refer to.
[0031]
Next, an example of processing executed in the embodiment shown in FIG. 1 in order to realize the above processing will be described with reference to FIG. When the flowchart shown in FIG. 3 is started, the following processing is executed.
[S1] The application program name to be analyzed is input from the input means 1f.
[S2] When information instructing to change the interrupt cycle is input from the input unit 1f, the setting of the interrupt cycle is changed.
[0032]
If the interrupt cycle setting is not changed, the interrupt cycle is automatically set to a default value (for example, 500 ms).
[S3] It is determined whether or not information for instructing execution of the application program has been input from the input unit 1f. If input, the process proceeds to step S4. Otherwise, the process returns to step S3 to perform the same processing. repeat.
[S4] The application program execution unit 1b acquires the specified application program from the recording device 1c, supplies it to the control unit 1h, and starts its execution.
[S5] If an interrupt has occurred, the process proceeds to step S6. Otherwise, the process proceeds to step S7.
[S6] An interrupt process is executed. Details of this process will be described later with reference to FIG.
[S7] It is determined whether or not the execution of the application program is finished. If finished, the process proceeds to step S8. Otherwise, the process returns to step S5.
[S8] The counting unit 1e executes a counting process for counting the call information acquired by the interrupt process.
[0033]
Details of this processing will be described later with reference to FIG.
[S9] The display unit 1g supplies the information aggregated by the aggregation unit 1e to the CRT monitor 2 for display.
[0034]
Next, the details of the “interrupt processing” shown in FIG. 3 will be described with reference to FIG. When the flowchart shown in FIG. 4 is started, the following processing is executed.
[S20] The call information acquisition unit 1d acquires the call information stacked in the memory as the return destination information of the function when the control unit 1h executes the application program at that time (when the interrupt occurs). .
[S21] The call information acquisition unit 1d searches the call information already acquired for information having the same pattern as the call information acquired in step S20.
[S22] As a result of the search in step S21, if call information having the same pattern already exists, the process proceeds to step S23. Otherwise, the process proceeds to step S24.
[S23] The call information acquired in step S20 is stored together with other already stored same patterns. Then, the process returns to the original process.
[S24] The call information acquired in step S20 is stored as a new pattern. Then, the process returns to the original process.
[0035]
Next, details of the “aggregation process” shown in FIG. 3 will be described with reference to FIG. When the flowchart shown in FIG. 5 is started, the following processing is executed.
[S40] The tabulating unit 1e obtains the function name and its address constituting the application program from the control unit 1h.
[S41] For each function acquired in step S40, a variable ax for storing the cumulative count number and a variable bx for storing the actual count number are prepared.
[S42] Initially set the values of variables i and j for counting the number of processings to "1".
[S43] The i-th pattern is acquired. For example, when i = 1, all functions belonging to the first pattern are acquired.
[S44] Variables (variables ax and bx included in the i-th pattern) corresponding to each function acquired in step S43 are prepared.
[S45] The counting unit 1e acquires the j-th call information from the call information acquisition unit 1d.
[S46] All the functions included in the call information acquired in step S45 are acquired.
[S47] The values of the variables ax corresponding to all the functions acquired in step S46 are incremented by 1.
[S48] The function (the deepest nested function) included at the end of the call information acquired in step S45 is acquired.
[S49] The value of the variable bx corresponding to the function acquired in step S48 is incremented by one.
[S50] In the i-th pattern, it is determined whether or not there is unprocessed call information. If there is unprocessed call information, the process proceeds to step S51; otherwise, the process proceeds to step S52.
[S51] The value of the variable j is incremented by 1, and the process returns to step S45.
[S52] It is determined whether or not there is an unprocessed pattern. If there is an unprocessed pattern, the process proceeds to step S53. Otherwise, the process returns (returns) to the original process.
[S53] The value of the variable i is incremented by 1, and the process proceeds to step S54.
[S54] The value of variable j is set to "1", and the process returns to step S43.
[0036]
According to the above processing, when the application program to be analyzed is executed, the call information is collected by generating an interrupt at a predetermined cycle, and after the execution of the application program is finished, each function is obtained from the call information. Can be calculated and output to the CRT monitor 2.
[0037]
As described above, according to the present invention, while executing an application program to be analyzed, an interrupt is generated at a predetermined cycle, and when an interrupt occurs, the main function is followed by a function being executed at that time. Call information composed of function addresses is acquired, classified and stored for each pattern. When the execution of the application program is completed, the cumulative count number and the actual count number of each function are calculated and displayed in a predetermined display format, so that detailed information is available compared to conventional sampling-based tools. Can be obtained. That is, in the case of a conventional sampling-based tool, the information acquired when an interrupt occurs is only information related to the function being executed at that time (for example, the address of the function). Since not only the function being executed at the time but also information (stack information) about all functions from the main function to that function is acquired, it is possible to provide detailed information compared to the conventional case it can.
[0038]
In addition, in the conventional tool based on the function call sequence, it is necessary to generate an interrupt each time the function is called and execute processing for load analysis. However, in the case of the present invention, by appropriately setting the interrupt generation period, instead of sacrificing the detail level of information, the occurrence of errors can be suppressed or the detail level of information can be improved. It is possible to make settings according to the user's purpose, such as sacrificing the occurrence of errors.
[0039]
Furthermore, since the function call information is classified and displayed for each pattern, when the load of a certain function is high, it is possible to specify what kind of call pattern the load will be high. The application program can be optimized smoothly.
[0040]
Next, a display example when the display format for the CRT monitor 2 is changed will be described with reference to FIG.
For example, it is assumed that information indicating that the nest depth displayed on the CRT monitor 2 is limited to 0 to 2 is input from the input unit 1f. In this case, the display unit 1g does not output information about a function having a nesting depth of 3 or more when the information obtained by the totaling unit 1e is output to the CRT monitor 2. As a result, the screen shown in FIG. 6 is displayed on the CRT monitor 2.
[0041]
In the display example shown in FIG. 6, compared to the case of FIG. 2, information corresponding to three or more nestings is not displayed in the information displayed in the display area 20d. For example, the function “sub3” displayed in the fourth line of FIG. 2 is not displayed in FIG. Further, at the end of the previous line, a mark “*” is added, indicating that the subsequent function is omitted.
[0042]
In such a display screen, for example, if the mark “*” displayed at the end of the sixth line is designated by the cursor 25, a dialog box 30 is additionally displayed on the CRT monitor 2 as shown in FIG. It is possible to refer to information that is displayed and omitted. In this example, a dialog box 30 entitled “Detailed display” is displayed, and information to be displayed next to the mark “*” specified in the window 20 is displayed in the display area 30b. Yes.
[0043]
By adopting such a display format, when the number of functions included in the application program is large, only information with shallow nesting is displayed, and information that is omitted only when necessary is displayed as appropriate. Therefore, the work can be performed efficiently.
[0044]
It should be noted that the information to be displayed is not limited by the depth of nesting, and for example, only the functions whose cumulative count number or actual count number exceeds a predetermined value may be displayed. By doing so, it is possible to display on the screen only functions that are frequently called, so that only main information can be referred to.
[0045]
In the above display example, the analysis result is displayed on the screen as text information, but may be displayed in a chart format as shown in FIG.
In the display example shown in FIG. 8, a window 40 entitled “Time Series Display” is displayed. On the upper right of the window 40, buttons 40a to 40c that are operated when the window 40 is reduced, enlarged, or terminated are displayed.
[0046]
The horizontal axis of the display area 40d indicates the elapsed time since the execution of the application program is started, and the vertical axis indicates each function constituting the application program. Moreover, the arrow shown in the display area 40d shows the period during which the function was executed.
[0047]
The slider 40e and the buttons 40f and 40g provided on the right side of the display area 40d are operated when the content displayed in the display area 40d is scrolled up and down. The slider 40h and the buttons 40i and 40j provided below the display area 40d are operated when the content displayed in the display area 40d is scrolled in the left-right direction.
[0048]
By the way, when the display as shown in FIG. 8 is performed, information on the time when each function is called is also required. This is because the time stamp acquired by the call information acquisition unit 1d described above is used. Is possible.
[0049]
That is, since the time stamp is associated with and stored in the address information of each function, the acquired address information is rearranged in chronological order, and an arrow is displayed at a position corresponding to the address information. By doing so, the diagram shown in FIG. 8 can be obtained.
[0050]
On the screen shown in FIG. 8, when a predetermined arrow is designated by the cursor 25 as shown in FIG. 9, a dialog box in which detailed information corresponding to that part is described is displayed. In this example, as a result of the center portion of the first arrow of the function “sub1” being designated by the cursor 25, a dialog box 50 entitled “Detailed information (sub1)” is displayed, and a call to the function “sub1” is performed. A list of other functions that performed is displayed. That is, before the function “sub1” is executed, the function “subD” is first called, and then the functions “subC”, “subB”, and “subA” are sequentially called, and then the function “sub1”. Is called.
[0051]
As described above, according to the display forms shown in FIGS. 8 and 9, since the acquired call information is displayed in a chart format, it is acquired in a display format that makes it easy to understand time-series operations. Information can be displayed. In the embodiment of the present invention, since the call information is acquired every time an interrupt occurs, information may be lost when the interrupt cycle is long, but the same information is used in the program. Since calling by pattern is often repeated, the information of the missing part can often be supplemented by other parts, and the influence caused by the missing information is small.
[0052]
In the above embodiment, the case where a single application program is executed has been described as an example. However, the control unit 1h has a plurality of CPUs, and a plurality of application programs are executed in parallel. It is possible to apply the present invention to the case where it is done. Note that the present invention can also be applied to a case where one application program is shared by a plurality of processors and executed.
[0053]
When the control unit 1h has a plurality of CPUs, an interrupt is generated for each CPU, and the call information acquisition unit 1d acquires the call information from each CPU. The acquired call information is aggregated for each CPU by the aggregation means 1e and then supplied to the display means 1g.
[0054]
The display means 1g displays the information on the plurality of CPUs aggregated by the aggregation means 1e side by side on the CRT monitor 2. The screen displayed as a result is shown in FIG. In this display example, a window 60 titled “Analysis result display” is displayed. On the upper right of the window 60, buttons 60a to 60c that are operated when the window 60 is reduced, enlarged, or closed are displayed. In the display area 60d, information regarding the process 0 (in this example, the application program 0) executed by the first CPU is displayed. In the display area 60e, information related to the process 1 executed in the second CPU is displayed.
[0055]
In this display example, only the information related to the process 0 and the process 1 is displayed. However, the slider 60i or the buttons 60j and 60k displayed at the lower part of the window 60 are appropriately operated to scroll the screen in the horizontal direction. This makes it possible to refer to information regarding a desired process.
[0056]
In addition, by appropriately operating the slider 60f or the buttons 60g and 60h and scrolling the screen in the vertical direction, it is possible to refer to a predetermined range of displayed information.
[0057]
When a predetermined item is selected by the cursor 25 on such a display screen, a dialog box 80 as shown in FIG. 11 is displayed, and each CPU in the case where the designated item is being executed is displayed. Information about the load distribution will be displayed.
[0058]
In this display example, the CPU number is displayed in the display area 80b, and the load factor of each CPU is indicated in the display area 80c by a bar graph centering on the average value of 70%. . Further, a deviation based on an average value of 70% is displayed in the display area 80d.
[0059]
In the above display example, the load distribution is shown by a bar graph. However, as shown in FIG. 12, it may be displayed by a numerical value. In this display example, a dialog box 90 is displayed corresponding to the designation of the display item by the cursor 25. The display area 90b of the dialog box 90 displays the CPU number, and the display area 90c displays the load factor as a numerical value. Furthermore, the number of samples in each CPU is displayed in the display area 90d adjacent to the right.
[0060]
Next, with reference to FIG. 13, a display example in a case where call information acquired from each CPU is displayed in a chart format will be described.
In this display example, a window 100 entitled “Time Series Display” is displayed. In the upper right portion of the window 100, buttons 100a to 100c that are operated when the window is reduced, enlarged, or closed are displayed.
[0061]
In the display area 100d, information related to the process 0 executed by the first CPU is displayed. In addition, information regarding the process 1 executed by the second CPU is displayed in the display area 100e.
[0062]
In this display example, only information related to the processes executed by the first and second CPUs is displayed. However, by appropriately operating the button 100f or the button 100g to scroll the screen, information related to a predetermined process is referred to. It becomes possible to do. Further, by operating the slider 100h or the buttons 100i and 100j, the range of information displayed in the display area 100d can be selected. Similarly, the range of information displayed in the display area 100e can be selected by operating the slider 100k or the buttons 100l and 100m. Furthermore, by operating the slider 100n or the buttons 100o and 100p, it is possible to select a range of information displayed in the display area 100d and the display area 100e.
[0063]
In such a display example, when a predetermined arrow is designated, detailed information may be displayed as shown in FIG.
As described above, even when processes are executed in parallel in a plurality of CPUs, the present invention can be applied, and overhead can be reduced as compared with conventional tools. Therefore, it is possible to perform an analysis with a small error.
[0064]
The above processing functions can be realized by a computer. In this case, the processing contents of the functions that the analysis device should have are described in a program recorded on a computer-readable recording medium, and the above processing is realized by the computer by executing this program on the computer. The Examples of the computer-readable recording medium include a magnetic recording device and a semiconductor memory.
[0065]
When distributing to the market, store the program on a portable recording medium such as a CD-ROM (Compact Disk Read Only Memory) or floppy disk, or store it in a computer storage device connected via a network. In addition, it can be transferred to another computer through the network. When executed by a computer, the program may be stored in a hard disk device or the like in the computer, loaded into the main memory, and executed.
[0066]
【The invention's effect】
  As described above, in the present invention,Since the function call information is classified and displayed for each pattern, it is possible to specify the call pattern when the load of a certain function is high. Can be smoothly performed.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of the present invention.
FIG. 2 is a display example of an analysis result display screen displayed on the CRT monitor of the embodiment shown in FIG. 1;
FIG. 3 is a flowchart for explaining an example of processing executed in the embodiment shown in FIG. 1;
4 is a flowchart illustrating details of “interrupt processing” shown in FIG. 3;
FIG. 5 is a flowchart for explaining the details of “aggregation processing” shown in FIG. 3;
FIG. 6 is another display example of the analysis result display screen displayed on the CRT monitor of the embodiment shown in FIG. 1;
7 is a display example of a dialog box displayed when a mark “*” is selected on the display screen shown in FIG.
FIG. 8 is still another display example of the analysis result display screen displayed on the CRT monitor of the embodiment shown in FIG. 1;
FIG. 9 is a display example of a dialog box displayed when a predetermined arrow is designated on the display screen shown in FIG. 8;
FIG. 10 is a display example of an analysis result display screen when the analysis target is a parallel program.
11 is a display example of a dialog box displayed when a predetermined item is selected on the screen shown in FIG.
12 is another display example of the dialog box displayed when a predetermined item is selected on the screen shown in FIG.
FIG. 13 is another display example of the analysis result display screen when the analysis target is a parallel program.
[Explanation of symbols]
1 Analysis device
1a Interrupt setting means
1b Application program execution means
1c Recording device
1d call information acquisition means
1e Aggregation means
1f Input means
1g Display means
2 CRT monitor

Claims (6)

複数の呼び出し単位から構成されるアプリケーションプログラムの動作状況を解析する解析装置において、
所定の周期で割り込みが発生するように制御部を設定する割り込み設定手段と、
対象となる前記アプリケーションプログラムの実行を開始するアプリケーションプログラム実行手段と、
前記アプリケーションプログラムを実行中に前記割り込み設定手段で設定した割り込みが発生した場合には、割り込み発生時、実行中の前記呼び出し単位が呼び出されるまでに経由した全ての前記呼び出し単位を特定する呼び出し情報を前記制御部が備えるメモリのスタックから取得し、既に記憶している前記呼び出し情報と同一のものが存在する場合には既に記憶している前記呼び出し情報を同一パターンにまとめて記憶し、存在しない場合には新たなパターンとして記憶する呼び出し情報取得手段と、
前記アプリケーションプログラムの動作が終了した場合に、前記呼び出し情報取得手段が記憶した前記呼び出し情報で示された全ての前記呼び出し単位の累積的な呼び出し回数を累積カウント数として集計し、前記呼び出し情報で示された最も深いネストに該当する前記呼び出し単位の呼び出し回数を実カウント数として集計する集計手段と、
前記集計手段によって得られた前記各呼び出し単位の名称、前記累積カウント数、および、前記実カウント数を関連付けて表示させる表示手段と、
を備えることを特徴とする解析装置。
In an analysis device that analyzes the operation status of an application program composed of multiple call units,
Interrupt setting means for setting the control unit to generate an interrupt at a predetermined cycle;
And application program execution means to start execution of the application program in question,
When an interrupt set by the interrupt setting means occurs during the execution of the application program, call information that identifies all the call units that have passed through until the call unit being executed is called when the interrupt occurs. When the same information as the call information already stored is obtained from the memory stack provided in the control unit, the call information already stored is collectively stored in the same pattern, and does not exist Call information acquisition means for storing as a new pattern ,
When the operation of the application program is completed , the cumulative number of calls for all the call units indicated by the call information stored by the call information acquisition unit is totaled as a cumulative count number, and is indicated by the call information. A counting means for counting the number of calls of the call unit corresponding to the deepest nested as a real count;
Display means for associating and displaying the name of each call unit obtained by the counting means, the cumulative count number, and the actual count number;
Analyzer characterized in that it comprises a.
前記表示手段は、前記各呼び出し単位の前記ネストの深さに応じてインデントを行い、前記各呼び出し単位の名称、前記累積カウント数、および、前記実カウント数を関連付けて表示させることを特徴とする請求項1記載の解析装置。  The display means performs indentation according to the nesting depth of each call unit, and displays the name of each call unit, the cumulative count number, and the actual count number in association with each other. The analysis device according to claim 1. 前記表示手段は、所定の前記ネストよりも浅い前記呼び出し単位に関する情報のみを表示させることを特徴とする請求項2記載の解析装置。  The analysis apparatus according to claim 2, wherein the display unit displays only information related to the calling unit shallower than the predetermined nest. 前記表示手段は、前記累積カウント数または前記実カウント数が所定の値よりも大きい前記呼び出し単位に関する情報のみを表示させることを特徴とする請求項2記載の解析装置。  3. The analysis apparatus according to claim 2, wherein the display unit displays only information related to the calling unit in which the accumulated count number or the actual count number is greater than a predetermined value. 所定の情報が入力される入力手段を更に有し、
前記入力手段から、表示が省略された部分を指定する入力があった場合には、前記表示手段は、指定された部分に対応する情報を表示させることを特徴とする請求項3または請求項4記載の解析装置。
It further has an input means for inputting predetermined information,
5. The display unit displays information corresponding to the designated part when there is an input from the input part to designate a part for which the display is omitted. The analysis device described.
複数の呼び出し単位から構成されるアプリケーションプログラムの動作状況を解析するプログラムを記録したコンピュータ読み取り可能な記録媒体において、
コンピュータを、
所定の周期で割り込みが発生するように制御部を設定する割り込み設定手段、
対象となる前記アプリケーションプログラムを実行中に前記割り込み設定手段で設定した割り込みが発生した場合には、割り込み発生時、実行中の前記呼び出し単位が呼び出されるまでに経由した全ての前記呼び出し単位を特定する呼び出し情報を前記制御部が備えるメモリのスタックから取得し、既に記憶している前記呼び出し情報と同一のものが存在する場合には既に記憶している前記呼び出し情報を同一パターンにまとめて記憶し、存在しない場合には新たなパターンとして記憶する呼び出し情報取得手段、
前記アプリケーションプログラムの動作が終了した場合に、前記呼び出し情報取得手段が記憶した前記呼び出し情報で示された全ての前記呼び出し単位の累積的な呼び出し回数を累積カウント数として集計し、前記呼び出し情報で示された最も深いネストに該当する前記呼び出し単位の呼び出し回数を実カウント数として集計する集計手段、
前記集計手段によって得られた前記各呼び出し単位の名称、前記累積カウント数、および、前記実カウント数を関連付けて表示させる表示手段、
として機能させるプログラムを記録したコンピュータ読み取り可能な記録媒体。
In a computer-readable recording medium in which a program for analyzing an operation state of an application program composed of a plurality of calling units is recorded,
Computer
Interrupt setting means for setting the control unit to generate an interrupt at a predetermined cycle;
When an interrupt set by the interrupt setting means occurs during execution of the target application program , when the interrupt occurs, all the call units that have passed through until the call unit being executed is called are specified. Call information is acquired from a stack of memory provided in the control unit, and if the same information as the call information that has already been stored, the call information that has already been stored is collectively stored in the same pattern, Call information acquisition means for storing as a new pattern if it does not exist,
When the operation of the application program is completed, the cumulative number of calls for all the call units indicated by the call information stored by the call information acquisition unit is totaled as a cumulative count number, and is indicated by the call information. A counting means for counting the number of calls of the call unit corresponding to the deepest nested as a real count number;
Display means for displaying the name of each call unit obtained by the counting means, the cumulative count number, and the actual count number in association with each other;
Computer readable recording medium recording a program to function as a.
JP05209899A 1999-03-01 1999-03-01 Analysis device and recording medium Expired - Fee Related JP3838804B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05209899A JP3838804B2 (en) 1999-03-01 1999-03-01 Analysis device and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05209899A JP3838804B2 (en) 1999-03-01 1999-03-01 Analysis device and recording medium

Publications (2)

Publication Number Publication Date
JP2000250780A JP2000250780A (en) 2000-09-14
JP3838804B2 true JP3838804B2 (en) 2006-10-25

Family

ID=12905379

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05209899A Expired - Fee Related JP3838804B2 (en) 1999-03-01 1999-03-01 Analysis device and recording medium

Country Status (1)

Country Link
JP (1) JP3838804B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6691295B2 (en) 2016-07-01 2020-04-28 富士通株式会社 Information processing apparatus, program execution state display method, and program execution state display program
US10127139B2 (en) * 2016-10-11 2018-11-13 Green Hills Software, Inc. Systems and methods for summarization and visualization of trace data
US10585660B2 (en) * 2018-06-11 2020-03-10 Fujitsu Limited Reducing buffer overflow

Also Published As

Publication number Publication date
JP2000250780A (en) 2000-09-14

Similar Documents

Publication Publication Date Title
US7222269B2 (en) Performance evaluation device, performance evaluation information managing device, performance evaluation method, performance evaluation information managing method, performance evaluation system
US7734775B2 (en) Method of semi-automatic data collection, data analysis, and model generation for the performance analysis of enterprise applications
US7596546B2 (en) Method and apparatus for organizing, visualizing and using measured or modeled system statistics
US6332212B1 (en) Capturing and displaying computer program execution timing
US5701471A (en) System and method for testing multiple database management systems
US5961596A (en) Method of monitoring a computer system, featuring performance data distribution to plural monitoring processes
Liu et al. Design-level performance prediction of component-based applications
US20170193398A1 (en) System and method for auto-query generation
US20040148152A1 (en) System performance prediction mechanism and method based on software component performance measurements
WO2020166299A1 (en) Material characteristics prediction device and material characteristics prediction method
US20080209402A1 (en) Non-invasive time-based profiling tool
Battle et al. Position statement: The case for a visualization performance benchmark
JP6691295B2 (en) Information processing apparatus, program execution state display method, and program execution state display program
JP5312742B2 (en) Audit and track data and code changes in spreadsheets and other documents
JP3838804B2 (en) Analysis device and recording medium
US7739083B2 (en) Program and/or method for calculating tuning parameters for numerical computation library
JPH0612552B2 (en) Electronic document retrieval device
JP2008225683A (en) Screen operation system and program
JP5790411B2 (en) Techniques for efficient partial crawling of interactive client-server applications in a parallel distributed environment
JP2000267890A (en) Method and device for executing simulation program
JP3683216B2 (en) Performance evaluation apparatus, information processing method, and program
JPH0695931A (en) Device for supporting evaluation of system execution performance
JP3682153B2 (en) Dynamic correlation evaluation system
JP2007265289A (en) Checklist management device, management method and program therefor
JP2004272582A (en) Performance prediction program and design support system for computer system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040309

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040507

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20040517

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20040618

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060623

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060801

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090811

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100811

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110811

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120811

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120811

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130811

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees