JPH02116935A - Program analyzing system - Google Patents
Program analyzing systemInfo
- Publication number
- JPH02116935A JPH02116935A JP63269519A JP26951988A JPH02116935A JP H02116935 A JPH02116935 A JP H02116935A JP 63269519 A JP63269519 A JP 63269519A JP 26951988 A JP26951988 A JP 26951988A JP H02116935 A JPH02116935 A JP H02116935A
- Authority
- JP
- Japan
- Prior art keywords
- function
- subsystem
- program
- name
- monitor
- 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
Links
- 230000006870 function Effects 0.000 claims abstract description 56
- 238000012544 monitoring process Methods 0.000 claims abstract description 5
- 238000006073 displacement reaction Methods 0.000 abstract description 9
- 238000000034 method Methods 0.000 abstract description 9
- 238000010586 diagram Methods 0.000 description 10
- 238000004458 analytical method Methods 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
【発明の詳細な説明】
(産業上の利用分野)
本発明は、オペレーティングシステム等の性能改善を目
的として行なわれるプログラム解析方式(従来の技術)
コンピュータのハードウェアを操作するための基本ソフ
トウェアとして、オペレーティングシステム(O8)が
使用される。オペレーティングシステムは、一般に、ア
センブリ言語以外に、CPU (中央処理装置)の移植
性を考慮してC言語で書かれる場合が多い。このような
オペレーティングシステムを動作させる場合、オペレー
ティングシステムをサポートする複数のサブシステムが
用意される。Detailed Description of the Invention (Industrial Application Field) The present invention relates to a program analysis method (prior art) that is performed for the purpose of improving the performance of an operating system, etc. As basic software for operating computer hardware, An operating system (O8) is used. In addition to assembly language, operating systems are generally written in C language in consideration of CPU (central processing unit) portability. When operating such an operating system, multiple subsystems are prepared to support the operating system.
第2図は、このようなオペレーティングシステムとサブ
システムとの関係を示すもので、特に、そのダイナミッ
クステップの発生状況の説明図を示す。FIG. 2 shows the relationship between such an operating system and subsystems, and particularly shows an explanatory diagram of how dynamic steps occur.
図において、オペレーティングシステム1が実行される
場合、サブシステム2を構成する種々の関数3が随時呼
び出される。この関数3は、C言語で作成されたサブシ
ステム2のモジュールとも呼ばれる部分で、サブルーチ
ン的な働きを行なう。オペレーティングシステム1の実
行中、このような関数3を呼び出す処理をダイナミック
ステップというが、このダイナミックステップ数は、オ
ペレーティングシステムの性能評価のためのパラメータ
となる。また、オペレーティングシステムの動作中の各
関数間の変位も同様に性能評価のパラメータとなる。In the figure, when an operating system 1 is executed, various functions 3 making up a subsystem 2 are called at any time. This function 3 is a part also called a module of the subsystem 2 created in C language, and performs a subroutine-like function. During execution of the operating system 1, the process of calling the function 3 as described above is called a dynamic step, and the number of dynamic steps is a parameter for evaluating the performance of the operating system. Furthermore, the displacement between each function during operation of the operating system also serves as a parameter for performance evaluation.
第3図には、関数間の変位の例の一覧表を示す。FIG. 3 shows a list of examples of displacements between functions.
ここには、変位例が5種類表示されており、call”
は関数を呼び出すためのコマンド、retern”は関
数呼、出し元への復帰のためのコマンド、“trap”
はトラップの例外を表わすコマンド、”int“はその
他の割込み7例外を示すコマンド、“rte”は割込み
7例外からの復帰を示すコマンドである。Five types of displacement examples are displayed here.
is a command to call a function, "return" is a function call, a command to return to the source, "trap"
is a command that represents a trap exception, "int" is a command that represents another interrupt 7 exception, and "rte" is a command that represents a return from an interrupt 7 exception.
さて、こうしたオペレーティングシステム実行中のダイ
ナミックステップ数等を測定するには、従来、ハードウ
ェアモニタあるいはソフトウェアモニタという手段が採
用されていた。Conventionally, a means called a hardware monitor or a software monitor has been used to measure the number of dynamic steps during execution of such an operating system.
第4図に、ハードウェアモニタについてのブロック図を
示す。FIG. 4 shows a block diagram of the hardware monitor.
図において、CPU5が上記オペレーティングシステム
を実行する。ここで、CPU5は、アドレス・トランス
レーション・キャッシュ・メモリ6と、外部キャッシュ
メモリ7とを介して、サブシステム等を含むメモリ空間
をアクセスする。アドレス・トランスレーション・キャ
ッシュメモリ6は、CPU5の出力する論理アドレスを
、物理アドレスに変換するテーブルデータを格納したメ
モリである。また、外部キャッシュメモリ7は、メモリ
空冊8中の実際にアクセス対象となるデータ群を取出し
て一時格納するメモリである。In the figure, a CPU 5 executes the above operating system. Here, the CPU 5 accesses a memory space including subsystems and the like via an address translation cache memory 6 and an external cache memory 7. The address translation cache memory 6 is a memory that stores table data for converting logical addresses output by the CPU 5 into physical addresses. Further, the external cache memory 7 is a memory that extracts and temporarily stores a data group that is actually an access target from the memory empty volume 8.
ハードウェアモニタを行なう場合、CPU5の出力とア
ドレス・トランスレーション・キャッシュメモリ6の出
力とをバスサイクル収集モニタ9によって取込み、その
アクセス信号をリストアツブすることによりプログラム
の実行状況を詳細に把握する。When performing hardware monitoring, the output of the CPU 5 and the output of the address translation cache memory 6 are captured by the bus cycle collection monitor 9, and the access signals are restored to grasp the program execution status in detail.
また、第5図に、ソフトウェアモニタの動作説明図な示
す。Further, FIG. 5 is an explanatory diagram of the operation of the software monitor.
ソフトウェアモニタにおいては、上記のようなバスサイ
クル収集モニタといった具体的な測定装置は必要としな
い。その代わりとして、システム(III Gこモニタ
用のプログラムを用意する。そして、被測定物となるプ
ログラムの1ステツプ毎に、そのアクセスするアドレス
信号等をシステム側に取込み、再び被測定物側に動作を
戻すといった手法により、実行状況を収集する。その結
果をプリントアウトすれば、オペレーティングシステム
の実行状況を詳細に把握することができる。The software monitor does not require a specific measuring device such as the bus cycle collection monitor described above. As an alternative, prepare a program for the system (IIIG) monitor.Then, for each step of the program to be measured, the address signal to be accessed is taken into the system side, and the program is operated again on the device to be measured. Collect the execution status using methods such as reverting the operating system.By printing out the results, you can get a detailed understanding of the operating system's execution status.
(発明が解決しようとする課題)
ところで、従来行なわれてきた、上記ハードウェアモニ
タやソフトウェアモニタによる解析では、第2図に示し
た各関数毎にその出現回数を調べたり、又、一定時間内
に出現したダイナミックステップ数を測定するといった
程度のものが一般的であった。(Problem to be Solved by the Invention) By the way, in the conventional analysis using the hardware monitor or software monitor, it is necessary to check the number of appearances of each function shown in Figure 2, or It was common to measure the number of dynamic steps that appeared in the process.
しかしながら、例えば、サブシステム毎のダイナミック
ステップ数や、サブシステム間の移動の仕方を明確に把
握することが、解析結果をより有効なものにする。この
ような解析をするために、従来システムは必ずしも満足
のいくものではなかった。However, for example, clearly understanding the number of dynamic steps for each subsystem and how to move between subsystems makes the analysis results more effective. Conventional systems have not always been satisfactory for performing such analysis.
本発明は以上の点に着目してなされたもので、サブシス
テム毎のダイナミックステップ数が容易に認識できるプ
ログラム解析方式を提供することを目的とするものであ
る。The present invention has been made with attention to the above points, and an object of the present invention is to provide a program analysis method that allows the number of dynamic steps for each subsystem to be easily recognized.
(課題を解決するための手段)
本発明のプログラム解析方式は、プログラム実行中に発
生するダイナミックステップ数を、前記プログラムのア
クセスするメモリアドレスをモニタして、カウントする
場合において、前記プログラムに使用される複数の関数
に、所定の分類ごとに規則化した名称を付し、プログラ
ム中のダイナミックステップ発生時アクセスされる、前
記関数の先頭アドレスを認識して、当該関数の名称と、
当該関数の属する前記分類を識別し、前記分類別に区分
して、前記ダイナミックステップ発生回数をカウントす
ることを特徴とするものである。(Means for Solving the Problems) The program analysis method of the present invention is used for a program when the number of dynamic steps occurring during program execution is counted by monitoring memory addresses accessed by the program. A plurality of functions are given regular names for each predetermined classification, and the start address of the function that is accessed when a dynamic step occurs in the program is recognized, and the name of the function and
The present invention is characterized in that the classification to which the function belongs is identified, the classification is classified according to the classification, and the number of occurrences of the dynamic step is counted.
(作用)
本発明の方式においては、予め、各関数に対し、オペレ
ーティングシステム等のプログラムの作り込み段階で、
サブシステム等の所定の分類毎に、特定の頭文字を持つ
ような規則化した名称を付けた関数を設定する。そして
、ハードウェアモニタあるいはソフトウェアモニタ等に
よって、プログラム中のダイナミックステップ発生時に
、アクセスされる関数の先頭アドレスから関数の名称を
認識する。その後、先に付した名称の特徴を基準に関数
を分類し区分すれば、ダイナミックステップ発生回数を
分類毎にカウントすることができる。(Operation) In the method of the present invention, for each function, at the stage of creating a program such as an operating system,
For each predetermined classification such as a subsystem, a function is set with a regularized name having a specific initial letter. Then, when a dynamic step occurs in a program, the name of the function is recognized from the start address of the function to be accessed using a hardware monitor, software monitor, or the like. Thereafter, by classifying and classifying functions based on the characteristics of the names given above, it is possible to count the number of dynamic step occurrences for each classification.
(実施例) 第1図は、本発明の詳細な説明する説明図である。(Example) FIG. 1 is an explanatory diagram for explaining the present invention in detail.
本発明の方式においては、オペレーティングシステム(
O8)等のプログラム1が実行される場合、各サブシス
テム2を構成する関数3が、ダイナミックステップによ
って呼び出される場合、こ、れなモニタ11によってモ
ニタする0図中、サブシステム2はSE、OS、SFと
3つ示されている。In the method of the present invention, the operating system (
When the program 1 such as O8) is executed, and the function 3 constituting each subsystem 2 is called by a dynamic step, it is monitored by the monitor 11. In the figure, subsystem 2 is SE, OS , SF are shown.
ここで、各サブシステムを構成する関数3には、サブシ
ステム毎にそれぞれ第6図に示したような名称が付けら
れる。これは、オペレーティングシステムの作り込み段
階で決定されるものである。Here, the functions 3 constituting each subsystem are given names as shown in FIG. 6 for each subsystem. This is determined at the stage of building the operating system.
第6図に、そのようなサブシステムと関数の名称との関
係を示す一覧表を図示した。FIG. 6 shows a list showing the relationship between such subsystems and function names.
図には、サブシステムがAP、SE、O3゜SF、・・
・DRIVEというように9個示されている。In the figure, the subsystems are AP, SE, O3゜SF,...
・Nine items are shown, such as DRIVE.
各サブシステムには、それぞれ幾つかの関数が含まれて
いるものとする。It is assumed that each subsystem includes several functions.
ここで、先ず、サブシステムAPは、主記憶装置のアド
レスが“0X4000000”未満の関数から成り、ユ
ーザー用のサブシステムを指す。このサブシステムに含
まれる関数は、オペレーティングシステムで使用しない
から名称は制限しない。また、サブシステムSEは、実
行管理用のシステムで、その各関数には頭文字に“e”
を付ける。また、サブシステムO8は、システムコール
のためのもので、各関数の先頭3文字を“O8”とする
。Here, first, the subsystem AP consists of functions whose main storage address is less than "0X4000000", and refers to a subsystem for the user. The functions included in this subsystem are not used by the operating system, so there are no restrictions on their names. Subsystem SE is an execution management system, and each function has the initial letter "e".
Add. Further, subsystem O8 is for system calls, and the first three characters of each function are "O8".
次に、サブシステムSFは、ファイル管理用のもので、
各関数の頭文字を“f”とする。また、サブシステムS
Cは、通信制御用で、各関数の頭文字を・“c ”ある
いは“C”とする。また、サブシステムSUは、システ
ム制御用で、各関数の先頭文字を“u ”とする。更に
、サブシステムSSは、システム制御用で、関数の先頭
文字を“Sとする。また、サブシステムSOは、操作管
理用で、関数の先頭2文字を“0 ”とする。Next, subsystem SF is for file management,
Let the initial letter of each function be "f". Also, subsystem S
C is for communication control, and the initial letter of each function is "c" or "C". The subsystem SU is for system control, and the first character of each function is "u". Furthermore, the subsystem SS is for system control, and the first character of the function is "S."The subsystem SO is for operation management, and the first two characters of the function are "0."
最後に、ドライブ(DRIVE)は、上記以外のシステ
ムで、先頭の3文字をドライバ名とするように関数名を
付ける。Finally, for DRIVE, in systems other than those mentioned above, give a function name such that the first three characters are the driver name.
以上のように、関数をサブシステム毎に分類して特定の
名称を付した後、オペレーティングシステムを実行させ
ながら、第1図に示すように、モニタ11を用いて、関
数名、プロセス名、関数毎のダイナミックステップ数、
アドレス、関数間の変位等を収集する。As described above, after classifying the functions into subsystems and giving them specific names, as shown in FIG. number of dynamic steps per
Collect addresses, displacements between functions, etc.
この収集方法は、先に説明したハードウェアモニタある
いはソフトウェアモニタを用いて、第4図あるいは第5
図で説明した通りに行なう。従って、重複する説明は省
略する。This collection method uses the hardware monitor or software monitor described above.
Proceed as explained in the diagram. Therefore, duplicate explanations will be omitted.
再び第1図に戻って、モニタ11によって収集されたデ
ータは編集部12によって編集される。Returning to FIG. 1 again, the data collected by the monitor 11 is edited by the editing section 12.
編集部12においては、モニタ11の収集したデータを
、図中に示したような出力フォーマット13で編集する
。The editing unit 12 edits the data collected by the monitor 11 in an output format 13 as shown in the figure.
即ち、モニタ11では、オペレーティングシステム1に
おいて、ダイナミックステップが発生したとき、最初に
アクセスされる関数の先頭アドレスについてテーブル1
4を参照する。このテーブル14によれば、先頭アドレ
スに対応して、関数の名称及びその関数の属するサブシ
ステムを引出すことができる。また、関数間の変位も、
必要な関連情報と共に編集の対象とする。その結果、同
図の出力フォーマット13に示すように、発生した変位
が関連情報と共にリストアツブされ、更に、各サブシス
テム毎にダイナミックステップ数がカウントされて、プ
リントアウトされる。That is, the monitor 11 uses Table 1 for the start address of the function that is first accessed when a dynamic step occurs in the operating system 1.
See 4. According to this table 14, it is possible to extract the name of a function and the subsystem to which the function belongs, corresponding to the start address. Also, the displacement between functions is
Subject to editing along with necessary related information. As a result, as shown in output format 13 in the figure, the displacements that have occurred are restored together with related information, and the number of dynamic steps for each subsystem is counted and printed out.
このようなテーブルの参照や分類編集等の処理自体は、
従来、一般に使用されているソフトウェア、例えば、U
NIXマシンにおける5tepやdsaコマンド及びe
miコマンド等によって実行することができる。The processing itself such as table reference and classification editing, etc.
Conventionally, commonly used software such as U
5tep, dsa command and e on NIX machine
This can be executed using the mi command or the like.
以上のように、第1図に示した出力フォーマット13を
見て分かるように、本発明の方式によれば、オペレーテ
ィングシステム実行中のトータルダイナミックステップ
数だけでなく、それを各サブシステム毎に分類した数を
容易に求めることができ、プログラム解析に威力を発揮
する。As described above, as can be seen from the output format 13 shown in FIG. It is easy to find the number of variables, and it is very useful for program analysis.
本発明は以上の実施例に限定されない。The present invention is not limited to the above embodiments.
上記実施例では、サブシステム毎のステップ数を出力す
る例を示したが、従来法により、これと並行して関数毎
にダイナミックステップ数をカウントしても差し支えな
い。In the above embodiment, an example was shown in which the number of steps for each subsystem is output, but it is also possible to count the number of dynamic steps for each function in parallel using a conventional method.
また、本発明の方法は、オペレーティングシステムに限
らず、各種プログラムの実行中に発生するダイナミック
ステップ数をモニタしてカウントする種々の場合に応用
できる。Furthermore, the method of the present invention is applicable not only to operating systems but also to various cases where the number of dynamic steps occurring during the execution of various programs is monitored and counted.
(発明の効果)
以上説明した本発明のプログラム解析方式によれば、プ
ログラムに使用される複数の関数に対し、所定の分類毎
に規則化した名称を付し、これをモニタするようにした
ので、モニタの結果得られたデータをその分類毎に区分
して、ダイナミックステップ数のカウントを行なうこと
ができる。(Effects of the Invention) According to the program analysis method of the present invention described above, regularized names are given to a plurality of functions used in a program for each predetermined classification, and these are monitored. , the number of dynamic steps can be counted by dividing the data obtained as a result of monitoring into categories.
従って、プログラム解析作業を、従来に比べてより詳細
に効率的に行なうことができる。Therefore, program analysis work can be performed in more detail and more efficiently than in the past.
第1図は本発明の方式の具体例を示す説明図、第2図は
ダイナミックステップの発生状況の説明図、第3図は関
数間の変位の例を示す一覧表、第4図はハードウェアモ
ニタのブロック図、第5図はソフトウェアモニタの動作
説明図、第6図は本発明におけるサブシステムと関数の
名称の関係を示す一覧表である。
1・・・プログラム(OS)、2・・・サブシステム、
3・・・関数、11・・・モニタ、12・・・編集部、
13・・・出力フォーマット、14・・・テーブル。
特許出願人 沖電気工業株式会社Fig. 1 is an explanatory diagram showing a specific example of the method of the present invention, Fig. 2 is an explanatory diagram of the occurrence situation of dynamic steps, Fig. 3 is a list showing examples of displacement between functions, and Fig. 4 is a hardware diagram. FIG. 5 is a block diagram of the monitor, FIG. 5 is an explanatory diagram of the operation of the software monitor, and FIG. 6 is a list showing the relationship between the names of subsystems and functions in the present invention. 1...Program (OS), 2...Subsystem,
3...Function, 11...Monitor, 12...Editorial department,
13...Output format, 14...Table. Patent applicant Oki Electric Industry Co., Ltd.
Claims (1)
、前記プログラムのアクセスするメモリアドレスをモニ
タして、カウントする場合において、 前記プログラムに使用される複数の関数に、所定の分類
ごとに規則化した名称を付し、 プログラム中のダイナミックステップ発生時アクセスさ
れる、前記関数の先頭アドレスを認識して、当該関数の
名称と、当該関数の属する前記分類を識別し、前記分類
別に区分して、前記ダイナミックステップ発生回数をカ
ウントすることを特徴とするプログラム解析方式。[Claims] In the case where the number of dynamic steps that occur during program execution is counted by monitoring memory addresses accessed by the program, a plurality of functions used in the program are classified according to predetermined classifications. It gives a regularized name, recognizes the start address of the function that is accessed when a dynamic step occurs in the program, identifies the name of the function and the classification to which the function belongs, and classifies it according to the classification. and counting the number of occurrences of the dynamic step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63269519A JPH02116935A (en) | 1988-10-27 | 1988-10-27 | Program analyzing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63269519A JPH02116935A (en) | 1988-10-27 | 1988-10-27 | Program analyzing system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02116935A true JPH02116935A (en) | 1990-05-01 |
Family
ID=17473526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63269519A Pending JPH02116935A (en) | 1988-10-27 | 1988-10-27 | Program analyzing system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02116935A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06342386A (en) * | 1991-02-28 | 1994-12-13 | Internatl Business Mach Corp <Ibm> | System and method for profiling of computer system |
-
1988
- 1988-10-27 JP JP63269519A patent/JPH02116935A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06342386A (en) * | 1991-02-28 | 1994-12-13 | Internatl Business Mach Corp <Ibm> | System and method for profiling of computer system |
JP2777496B2 (en) * | 1991-02-28 | 1998-07-16 | インターナショナル・ビジネス・マシーンズ・コーポレイション | Uses when profiling multi-processes in computer systems |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100337748B1 (en) | A method and apparatus for structured memory analysis of data processing systems and applications | |
KR100338223B1 (en) | A method and apparatus for structured memory analysis of data processing systems and applications | |
US6754890B1 (en) | Method and system for using process identifier in output file names for associating profiling data with multiple sources of profiling data | |
US20020184615A1 (en) | System and method for selectively and automatically modifying the source code of a computer program | |
JPH10105427A (en) | Computer operating method for displaying state logical data concerning memory access in electronic mutual connection bus | |
CN111124789B (en) | Chip simulation debugging system and debugging method | |
CN112052073A (en) | Script performance analysis method and device, readable storage medium and electronic equipment | |
CN110865866B (en) | Virtual machine safety detection method based on introspection technology | |
JPH02116935A (en) | Program analyzing system | |
CN117909160A (en) | Firmware crash analysis method and device based on Internet of things | |
CN109299132B (en) | SQL data processing method and system and electronic equipment | |
CN116662134A (en) | Linux kernel performance tracking tool based on eBPF | |
CN111324463A (en) | Engineering file label clearing method, system, device and storage medium | |
EP2587380B1 (en) | Runtime environment and method for non-invasive monitoring of software applications | |
JP2663893B2 (en) | Architecture simulator | |
CN114629786A (en) | Log real-time analysis method, device, storage medium and system | |
CN113806199B (en) | Cloud log cutting method based on event | |
JPH0887417A (en) | Compiler device | |
JPS58149527A (en) | Automatic tuning system of system | |
JP2811804B2 (en) | Variable output range specification method | |
JP2697601B2 (en) | Simulation method of multiplication / division instruction interlock | |
JP2919406B2 (en) | Performance evaluation method | |
CN116594750A (en) | Function call collection method, device, equipment, storage medium and product | |
CN118093346A (en) | Task mining method, device, equipment, storage medium and product | |
JP3171233B2 (en) | Data processing system, data processing apparatus and method |