JP2008123438A - Computer system, program information collection method, and computer program - Google Patents

Computer system, program information collection method, and computer program Download PDF

Info

Publication number
JP2008123438A
JP2008123438A JP2006309338A JP2006309338A JP2008123438A JP 2008123438 A JP2008123438 A JP 2008123438A JP 2006309338 A JP2006309338 A JP 2006309338A JP 2006309338 A JP2006309338 A JP 2006309338A JP 2008123438 A JP2008123438 A JP 2008123438A
Authority
JP
Japan
Prior art keywords
program
acquisition
count value
program information
information
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.)
Withdrawn
Application number
JP2006309338A
Other languages
Japanese (ja)
Inventor
Manabu Tsukada
学 塚田
Yoshiaki Horinouchi
義章 堀之内
Takashi Yamamoto
隆嗣 山本
Atsuyuki Uchihira
敬幸 内平
Shinichi Hayashi
伸一 林
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 JP2006309338A priority Critical patent/JP2008123438A/en
Publication of JP2008123438A publication Critical patent/JP2008123438A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To collect proper information for repairing a problem occurred in a multiprocessor system. <P>SOLUTION: This computer system mounted with a plurality of CPUs is provided with a collection point setting part 104 for setting sequentially acquisition points serving as a trigger for the start of acquisition processing for acquiring program information including a register value and process information under execution of a program, within the program, a program information collection part 107 for conducting the acquisition processing in the set acquisition point, a counter part 17 for outputting a count value incremented in each of the accesses, a count value acquisition part 101 for acquiring the count value from the counter part 17 in every acquisition processing, and a history information output means 110 for outputting the acquired program information together with the corresponding count value, to be stored. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、複数のCPUを搭載したコンピュータにおいて発生した問題についての解析に用いるプログラム情報を収集するための方法などに関する。   The present invention relates to a method for collecting program information used for analyzing a problem that occurs in a computer having a plurality of CPUs.

汎用サーバなどのサーバ機で発生した問題を改修する場合、一般に、問題の発生時にスナップショット的に収集されたダンプ情報を基にして解析を行い、問題を再現するための再現試験を繰り返して、その原因を追究することが行われる。   When repairing a problem that occurred in a server machine such as a general-purpose server, generally, analysis is performed based on the dump information collected in a snapshot when the problem occurs, and a reproduction test to reproduce the problem is repeated. The cause is pursued.

解析に必要な情報を収集するための方法として、一般に、問題の発生時点のメモリの状態を凍結し、そのメモリの状態およびCPU(プロセッサ)の状態についての情報を収集しそれをダンプ情報として蓄積することが行われている。しかし、このようにして収集された情報は、静的な情報であるため、問題が検出された箇所は特定できるが、問題の原因となるポイントを見つけることは困難なことが多い。そこで、命令の実行の経過をたどる(トレースする)ことができる履歴情報(走行履歴情報)を収集することが求められる。そのための方法として、特許文献1のような方法が提案されている。   As a method for collecting information necessary for analysis, generally, the memory state at the time of occurrence of the problem is frozen, and information about the memory state and the CPU (processor) state is collected and stored as dump information. To be done. However, since the information collected in this way is static information, the location where the problem is detected can be identified, but it is often difficult to find the point that causes the problem. Therefore, it is required to collect history information (running history information) that can trace (trace) the progress of execution of instructions. As a method for that purpose, a method as disclosed in Patent Document 1 has been proposed.

特許文献1によれば、ヘッダ領域とログデータ領域とからなるログエリアをメモリ上に割り当て、そのヘッダ領域にはログデータの取得に必要な情報を格納し、ログルーチン実行時にはそのヘッダ領域を参照してそこに格納されている情報に基づいて、ログデータ領域にログデータを取得させる。   According to Patent Document 1, a log area composed of a header area and a log data area is allocated on a memory, information necessary for acquiring log data is stored in the header area, and the header area is referred to when executing a log routine. Based on the information stored there, the log data area is made to acquire log data.

ところで、現在の汎用サーバは、複数のCPUが並列に命令を実行するマルチプロセッサシステムが一般的となっている。マルチプロセッサシステムでは、複数のCPUで処理が競合することによってデータが破壊されるなどの問題が発生することがある。このような問題は、競合のタイミングに依存するため再現性に乏しく解析が困難である。マルチプロセッサシステムで発生する問題の原因を追究するためには十分な履歴情報を収集する必要があるが、上記のような従来の方法では、それを行うことが難しい。   By the way, the current general-purpose server is generally a multiprocessor system in which a plurality of CPUs execute instructions in parallel. In a multiprocessor system, there may be a problem that data is destroyed due to processing conflicts among a plurality of CPUs. Since such a problem depends on the timing of competition, the reproducibility is poor and the analysis is difficult. In order to investigate the cause of a problem that occurs in a multiprocessor system, it is necessary to collect sufficient history information, but it is difficult to do so with the conventional method as described above.

マルチプロセッサシステムにおいて履歴情報を収集するための方法として、特許文献2のような方法が提案されている。   As a method for collecting history information in a multiprocessor system, a method as disclosed in Patent Document 2 has been proposed.

特許文献2によれば、マルチプロセッサ構成からなる監視対象マイクロプロセッサシステムの、一のマイクロプロセッサシステムが実行するプログラムのトレースを行なうトレース装置が、プログラムの各命令段階の実行の度に、各命令を実行した時刻の情報と、トレース結果情報の履歴とを記録し、その時刻の情報とトレース結果情報とを対応させて出力する。そして、その履歴を編集して出力部に表示させる。
特開平8−171501号公報 特開平10−260864号公報
According to Patent Document 2, a trace device that traces a program executed by one microprocessor system of a monitoring target microprocessor system having a multiprocessor configuration is configured to execute each instruction at each instruction stage of the program. The information on the time of execution and the history of the trace result information are recorded, and the information on the time and the trace result information are output in correspondence with each other. Then, the history is edited and displayed on the output unit.
JP-A-8-171501 Japanese Patent Laid-Open No. 10-260864

しかし、特許文献2によると、メモリのバスの情報をコピーして出力することでそれを履歴情報としている。すなわち、メモリのリードまたはライトのみを対象としているので、問題発生時の解析に必要な情報を収集できない場合がある。   However, according to Patent Document 2, the information on the memory bus is copied and output to make it history information. In other words, since only the memory read or write is targeted, there is a case where information necessary for analysis when a problem occurs cannot be collected.

また、従来、履歴情報を出力するために専用のハードウェアを用いる方法があった。しかし、この方法では、汎用サーバ向けに提供されている汎用のボードを使用している場合に、その技術の更新が早いため、ボード自体のアップグレードを頻繁に行う必要が生じ、その度に専用のハードウェアを追加しなければならなくなる。それによって、余分なコストがかかってしまう。加えて、品質的にも不安定になる危険性がある。   Conventionally, there has been a method of using dedicated hardware for outputting history information. However, with this method, when a general-purpose board provided for general-purpose servers is used, the technology is updated quickly, so it is necessary to frequently upgrade the board itself. You will have to add hardware. As a result, extra costs are incurred. In addition, there is a risk of quality instability.

本発明は上記のような問題点に鑑み、マルチプロセッサシステムにおいて発生する問題の改修のために必要な情報を収集することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to collect information necessary for repairing problems that occur in a multiprocessor system.

本発明に係るコンピュータシステムは、複数のCPUを搭載したコンピュータシステムであって、プログラムの実行中(起動中)に前記CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイント(プログラム停止位置)を、当該プログラム内において順次設定する取得ポイント設定手段と、前記プログラムの処理が前記取得ポイントの箇所に来るごとに、前記取得処理を行うプログラム情報取得手段と、アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタと、前記プログラム情報取得手段によって前記取得処理が行われるごとに、前記カウンタにアクセスして前記カウント値を取得するカウント値取得手段と、前記取得処理で取得された前記プログラム情報を、前記カウント値取得手段によって取得された当該プログラム情報に対応する前記カウント値とともに保存するプログラム情報保存手段と、を有する。   A computer system according to the present invention is a computer system equipped with a plurality of CPUs, and triggers for starting an acquisition process for acquiring program information including a register value and process information of the CPU during execution (starting) of the program Acquisition point (program stop position) to be set in order in the program, acquisition point setting means, program information acquisition means for performing the acquisition process each time the program processing comes to the acquisition point, A counter that outputs a count value that is incremented or decremented each time it is accessed, and a count value acquisition unit that accesses the counter and acquires the count value each time the acquisition process is performed by the program information acquisition unit And acquired by the acquisition process The serial program information, having a program information storage means for storing together with the count value corresponding to the acquired the program information by the count value obtaining means.

好ましくは、前記プログラム情報取得手段および前記カウント値取得手段は、それぞれ、前記CPUごとに設けられており、前記カウンタは、前記CPUごとに設けられた前記各カウント値取得手段から共通にアクセスされるように設けられており、前記プログラム情報取得手段は、それぞれに対応する前記CPUから前記レジスタ値を取得する。   Preferably, the program information acquisition unit and the count value acquisition unit are provided for each CPU, and the counter is commonly accessed from the count value acquisition units provided for each CPU. The program information acquisition means acquires the register value from the corresponding CPU.

また好ましくは、ユーザから指定される、前記プログラム情報の取得対象を受け付ける取得対象受付手段と、前記取得対象受付手段が受け付けた前記取得対象が関数であった場合に、当該関数内において前記取得ポイントを順次設定する関数内設定手段と、を有する。   Further preferably, when the acquisition target receiving unit that receives the acquisition target of the program information designated by the user and the acquisition target received by the acquisition target receiving unit is a function, the acquisition point in the function In-function setting means for sequentially setting.

本発明に係る他の形態のコンピュータシステムは、プログラムの実行中に所定のデータがアクセスされる際に当該プログラムをブレークさせるための設定を行うブレーク設定手段と、前記プログラムの実行中にブレークが発生したときに、前記CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理を行うプログラム情報取得手段と、アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタと、前記プログラム情報取得手段によって前記取得処理が行われるごとに、前記カウンタにアクセスして前記カウント値を取得するカウント値取得手段と、前記取得処理で取得された前記プログラム情報を、前記カウント値取得手段によって取得された当該プログラム情報に対応する前記カウント値とともに保存するプログラム情報保存手段と、を有する。   According to another aspect of the computer system of the present invention, when a predetermined data is accessed during execution of a program, break setting means for setting the program to break, and a break occurs during execution of the program Program information acquisition means for performing acquisition processing for acquiring program information including the register value and process information of the CPU, a counter that outputs a count value incremented or decremented each time there is an access, and the program Each time the acquisition process is performed by the information acquisition unit, the count value acquisition unit that accesses the counter to acquire the count value, and the program information acquired by the acquisition process is acquired by the count value acquisition unit. Corresponding to the program information Having a program information storage means for storing together with the serial count value.

マルチプロセッサシステムにおいて発生する問題の改修のために必要な情報を収集することができる。   Information necessary for repairing problems that occur in a multiprocessor system can be collected.

図1は本発明に係るコンピュータ1のハードウェア構成の例を示す図、図2はメモリ空間に格納されたプロセスを示す図である。   FIG. 1 is a diagram showing an example of a hardware configuration of a computer 1 according to the present invention, and FIG. 2 is a diagram showing a process stored in a memory space.

図1に示すようにコンピュータ1は、複数のCPU(Central Processing Unit)11a,11b,…、メモリ12、ハードディスク13、および通信インターフェース14を有する。コンピュータ1は、マルチプロセッサに対応したパーソナルコンピュータまたはワークステーションなどであり、例えば汎用サーバなどのサーバ機として用いられる。以下、CPU11a,11b,…について、それぞれまたは全部を「CPU11」と記載することがある。他の符号についても同様である。   As shown in FIG. 1, the computer 1 includes a plurality of CPUs (Central Processing Units) 11 a, 11 b,..., A memory 12, a hard disk 13, and a communication interface 14. The computer 1 is a personal computer or a workstation compatible with a multiprocessor, and is used as a server machine such as a general-purpose server. Hereinafter, each or all of the CPUs 11a, 11b,... May be referred to as “CPU 11”. The same applies to other codes.

ハードディスク13には、OS(Operating System)および各種ツールなどに関する種々のプログラムがインストールされている。これらのプログラムは、その実行に際して読み出され、プロセスなどの実行単位でメモリ12のメモリ空間に格納される。プロセスは、例えば、図2に示されるような、プロセスIDおよびスタック情報(プロセススタック情報)を含むプロセス構造体によって構成される。このようなプロセスが順次実行されることによって、プログラムの処理が行われる。   Various programs relating to an OS (Operating System) and various tools are installed in the hard disk 13. These programs are read at the time of execution, and stored in the memory space of the memory 12 in units of execution such as processes. The process is configured by a process structure including a process ID and stack information (process stack information) as shown in FIG. 2, for example. Program processing is performed by sequentially executing such processes.

通信インターフェース14は、LAN、WAN、またはインターネットなどの通信回線を介して他の装置と通信を行うためのインターフェースである。この通信インターフェース14には、NIC(Network Interface Card)、モデム、USB、その他種々のインターフェースが含まれる。   The communication interface 14 is an interface for communicating with other devices via a communication line such as a LAN, WAN, or the Internet. The communication interface 14 includes a network interface card (NIC), a modem, a USB, and other various interfaces.

また、コンピュータ1には、ユーザが指令を入力するための入力装置であるキーボード2、マウス3、および表示装置であるディスプレイ4が接続されている。   The computer 1 is connected to a keyboard 2 that is an input device for a user to input a command, a mouse 3, and a display 4 that is a display device.

コンピュータ1においては、ユーザが予め指定したプログラムの実行中に、リソースの使用状況などに関するログ(履歴情報)が出力され収集される。本実施形態では、CPUのレジスタに関する情報(レジスタ情報)およびメモリに保持されるプロセスに関する情報(プロセス情報)などがログとして収集される。ログを収集する対象(ログ収集対象)として、特定の関数または特定のデータを指定することも可能である。その場合は、指定された関数またはデータに関する処理においてログが出力される。以下、ログの収集に関する処理について説明する。
〔機能構成の説明〕
図3はコンピュータ1の機能的構成の例を示す図、図4はプロセス情報取得の処理を説明するための図、図5は履歴情報出力処理部15の構成の例を示す図、図6はレジスタ情報取得の処理を説明するための図である。
In the computer 1, logs (history information) relating to resource usage and the like are output and collected during execution of a program designated in advance by the user. In the present embodiment, information related to CPU registers (register information), information related to processes held in the memory (process information), and the like are collected as logs. It is also possible to specify a specific function or specific data as an object (log collection object) for collecting logs. In that case, a log is output in the processing related to the specified function or data. Hereinafter, processing related to log collection will be described.
[Description of functional configuration]
3 is a diagram showing an example of the functional configuration of the computer 1, FIG. 4 is a diagram for explaining the process information acquisition processing, FIG. 5 is a diagram showing an example of the configuration of the history information output processing unit 15, and FIG. It is a figure for demonstrating the process of register information acquisition.

図3に示すようにコンピュータ1は、履歴情報出力処理部15、プロセス情報取得部16、およびカウンタ部17などによって構成される。   As shown in FIG. 3, the computer 1 includes a history information output processing unit 15, a process information acquisition unit 16, a counter unit 17, and the like.

履歴情報出力処理部15a,15b,…は、それぞれ、各CPU11a,11b,…に対応付けられて設けられている。すなわち、履歴情報出力処理部15aとCPU11a、履歴情報出力処理部15bとCPU11bのように、履歴情報出力処理部15とCPU11とが1対1で対応付けられている。履歴情報出力処理部15は、所定のプログラムの実行中にログを出力するための処理を行う。以下、このログを「履歴情報DR」と記載することがある。出力された履歴情報DRは、メモリ12またはハードディスク13などの記憶装置の所定の領域に保存される。   The history information output processing units 15a, 15b,... Are provided in association with the CPUs 11a, 11b,. That is, the history information output processing unit 15 and the CPU 11 are associated one-to-one like the history information output processing unit 15a and the CPU 11a, and the history information output processing unit 15b and the CPU 11b. The history information output processing unit 15 performs processing for outputting a log during execution of a predetermined program. Hereinafter, this log may be referred to as “history information DR”. The output history information DR is stored in a predetermined area of a storage device such as the memory 12 or the hard disk 13.

プロセス情報取得部16は、図4に示すように、メモリ空間に格納されているプロセスIDおよびスタック情報を取得するための処理を行う。ここで取得されたプロセスIDおよびスタック情報は、履歴情報出力処理部15に出力され、履歴情報DRの生成に用いられる。   As shown in FIG. 4, the process information acquisition unit 16 performs a process for acquiring a process ID and stack information stored in the memory space. The process ID and the stack information acquired here are output to the history information output processing unit 15 and used to generate the history information DR.

なお、プロセスIDはプロセススタック上にあるプロセス構造体を参照することで収集できる。また、スタック情報を収集することで、プロセスのバックトレース情報を知ることができる。以下、これらプロセスIDおよびスタック情報をまとめて「プロセス情報」と記載することがある。   The process ID can be collected by referring to the process structure on the process stack. Further, by collecting stack information, it is possible to know process backtrace information. Hereinafter, the process ID and stack information may be collectively referred to as “process information”.

カウンタ部17は、ログの出力をカウントするための数値(カウント値)を保持しており、履歴情報出力処理部15からアクセスされる度に、そのカウント値を一つインクリメント(またはディクリメント)して出力する。なお、出力した後にカウント値をインクリメントするようにしてもよい。カウンタ部17は、複数のCPU11a、11b、…に対して共通に(1つだけ)設けられているので、CPU11に対して排他的なカウント値を出力することになる。出力されたカウント値は、履歴情報出力処理部15において履歴情報DRの生成に用いられる。   The counter unit 17 holds a numerical value (count value) for counting log output, and increments (or decrements) the count value by one each time it is accessed from the history information output processing unit 15. Output. Note that the count value may be incremented after output. Since the counter unit 17 is provided in common (only one) for the plurality of CPUs 11a, 11b,..., An exclusive count value is output to the CPU 11. The output count value is used by the history information output processing unit 15 to generate history information DR.

さて、図5に示すように履歴情報出力処理部15は、カウント値取得部101、レジスタ値取得部102、収集対象指定受付部103、収集ポイント設定部104、収集対象関数設定部105、収集対象データ設定部106、プログラム情報収集部107、履歴情報生成部108、出力先指定受付部109、および履歴情報出力部110などによって構成される。   As shown in FIG. 5, the history information output processing unit 15 includes a count value acquisition unit 101, a register value acquisition unit 102, a collection target designation reception unit 103, a collection point setting unit 104, a collection target function setting unit 105, and a collection target. The data setting unit 106, the program information collection unit 107, the history information generation unit 108, the output destination designation reception unit 109, the history information output unit 110, and the like.

なお、図3および図5の各部の処理を実現するためのプログラムおよびデータは、ハードディスク13にインストールされている。これらのプログラムおよびデータは必要に応じてメモリ12に読み出され、CPU11によってそのプログラムが実行される。   Note that the program and data for realizing the processing of each unit in FIGS. 3 and 5 are installed in the hard disk 13. These programs and data are read into the memory 12 as necessary, and the CPU 11 executes the programs.

カウント値取得部101は、カウンタ部17にアクセスし、そこからカウント値を取得する。レジスタ値取得部102は、図6に示すように、対応するCPU11のレジスタ情報としてレジスタの値(レジスタ値)を取得する。なお、「対応するCPU11」とは、そのレジスタ値取得部102が属する履歴情報出力処理部15に対応するCPU11のことである。履歴情報出力処理部15に含まれる他の各部についても同様に表現する。   The count value acquisition unit 101 accesses the counter unit 17 and acquires the count value therefrom. As illustrated in FIG. 6, the register value acquisition unit 102 acquires a register value (register value) as register information of the corresponding CPU 11. The “corresponding CPU 11” is the CPU 11 corresponding to the history information output processing unit 15 to which the register value acquisition unit 102 belongs. The other parts included in the history information output processing unit 15 are expressed in the same manner.

収集対象指定受付部(収集対象選択部)103は、ログ収集対象についてのユーザから指定を受け付け、指定されたログ収集対象がプログラム、関数、またはデータのいずれであるかを判別し、その判別に応じて、指定されたログ出力対象を収集ポイント設定部104、収集対象関数設定部105、または収集対象データ設定部106に通知する。すなわち、プログラムが指定された場合は、収集ポイント設定部104に対して、そのプログラムを通知する。関数が指定された場合は、収集対象関数設定部105に対してその関数を通知する。データが指定された場合は、収集対象データ設定部106に対してそのデータを通知する。   The collection target designation receiving unit (collection target selection unit) 103 receives designation from the user regarding the log collection target, determines whether the specified log collection target is a program, a function, or data. Accordingly, the designated log output target is notified to the collection point setting unit 104, the collection target function setting unit 105, or the collection target data setting unit 106. That is, when a program is designated, the program is notified to the collection point setting unit 104. When a function is designated, the function is notified to the collection target function setting unit 105. When data is designated, the data is notified to the collection target data setting unit 106.

収集ポイント設定部104、収集対象関数設定部105、および収集対象データ設定部106は、実行中のプログラムの処理を一時的に停止して履歴情報DRの収集を開始する位置、すなわちログの収集の契機となる位置(以下、「プログラム停止位置」と記載することがある。)を設定する。なお、収集ポイント設定部104は、指定されたプログラム内において全ての履歴情報DRを収集できるようにプログラム停止位置を設定する。収集対象関数設定部105は、指定された関数内においてプログラム停止位置を設定する。収集対象データ設定部106は、指定されたデータに対してプログラム停止位置を設定する。   The collection point setting unit 104, the collection target function setting unit 105, and the collection target data setting unit 106 temporarily stop processing of the program being executed and start collecting history information DR, that is, log collection. Set a trigger position (hereinafter sometimes referred to as “program stop position”). The collection point setting unit 104 sets the program stop position so that all history information DR can be collected in the designated program. The collection target function setting unit 105 sets a program stop position in the designated function. The collection target data setting unit 106 sets a program stop position for the specified data.

プログラム情報収集部107は、レジスタ値取得部102からレジスタ値を取得し、プロセス情報取得部からプロセス情報を取得する。以下、レジスタ値およびプロセス情報をまとめて「プログラム情報」と記載することがある。   The program information collection unit 107 acquires a register value from the register value acquisition unit 102 and acquires process information from the process information acquisition unit. Hereinafter, register values and process information may be collectively referred to as “program information”.

履歴情報生成部108は、プログラム情報収集部107が収集したプログラム情報を、必要に応じて加工し形式を変換するなどして履歴情報DRを生成する。   The history information generation unit 108 generates the history information DR by processing the program information collected by the program information collection unit 107 as necessary and converting the format.

生成された履歴情報DRをどのような場所(出力先)にどのような方法(出力方法)で出力するのかは、予めユーザによって指定される。例えば、以下のような内容が指定される。   It is designated in advance by the user which method (output method) the generated history information DR is output to which location (output destination). For example, the following contents are specified.

(1)メモリ空間内にデータ領域を確保しそこに出力する。     (1) A data area is secured in the memory space and output there.

(2)予め設けられた標準の出力先に出力する。     (2) Output to a standard output destination provided in advance.

(3)特定のファイルに出力する。     (3) Output to a specific file.

(4)指定したIPアドレス(サーバなど)へ通信回線を介して送信(パケット送信)する。     (4) Transmit (packet transmission) to a designated IP address (server, etc.) via a communication line.

1つの履歴情報DRに対して複数の出力先を指定することも可能である。その場合は、指定された出力先のそれぞれに対してその履歴情報DRが出力される。   It is also possible to designate a plurality of output destinations for one history information DR. In that case, the history information DR is output to each of the designated output destinations.

出力先指定受付部(出力選択部)109は、履歴情報DRの出力先などについてのユーザからの指定を受け付け、それを履歴情報出力部110に通知する。   The output destination designation receiving unit (output selecting unit) 109 receives designation from the user about the output destination of the history information DR and notifies the history information output unit 110 of it.

履歴情報出力部(履歴保持部)110は、履歴情報生成部108が生成した履歴情報DRを、出力先指定受付部109から通知された出力先に対して出力する。   The history information output unit (history holding unit) 110 outputs the history information DR generated by the history information generation unit 108 to the output destination notified from the output destination designation receiving unit 109.

以下、履歴情報DRを収集する際の各部の処理を、第1の方法、第2の方法、および第3の方法に大別してさらに詳しく説明する。なお、以下において、履歴情報DRの出力先として、CPU11ごとに設けられたメモリ12内の領域が指定されているものとする。
〔第1の方法〕
図7は第1の方法による履歴情報DRの収集の処理の流れを説明するためのフローチャート、図8はプログラム停止位置の設定の処理を説明するための図、図9は履歴情報DRの例を示す図、図10は各CPU11について出力された履歴情報DRを示す図である。
Hereinafter, the processing of each unit when collecting the history information DR will be described in more detail by broadly dividing into the first method, the second method, and the third method. In the following, it is assumed that an area in the memory 12 provided for each CPU 11 is designated as the output destination of the history information DR.
[First method]
FIG. 7 is a flowchart for explaining the flow of processing for collecting history information DR by the first method, FIG. 8 is a diagram for explaining processing for setting a program stop position, and FIG. 9 is an example of history information DR. FIG. 10 is a diagram showing history information DR output for each CPU 11.

履歴情報DRの収集のために、ユーザは、ログ収集対象のプログラム(以下、「プログラムP1」と記載する。)を指定する(#100)。収集対象指定受付部103は、その指定を受け付ける。   In order to collect the history information DR, the user designates a log collection target program (hereinafter referred to as “program P1”) (# 100). The collection target designation receiving unit 103 receives the designation.

プログラムP1の開始に先立って、収集ポイント設定部104は、収集対象指定受付部103が受け付けたユーザからの指定に基づいてプログラムP1に対してプログラム停止位置の設定を行う。ここで、プログラム停止位置の設定について、図8を参照して説明する。   Prior to the start of the program P1, the collection point setting unit 104 sets a program stop position for the program P1 based on the designation from the user received by the collection target designation receiving unit 103. Here, the setting of the program stop position will be described with reference to FIG.

図8において、メモリ12のメモリ空間にプログラムP1が格納されている。プログラム停止位置の設定に際して、収集ポイント設定部104は、まず、プログラムP1の先頭アドレスを取得する(#101)。図8の(i)に示されるように、その先頭アドレスに格納されている命令M1を、メモリ空間内に予め用意されている命令退避用領域(データ退避領域)にコピーすることによって退避させる(#102)。さらに、図8の(ii)に示されるように、プログラムP1の先頭アドレスの内容をトラップ命令に置き換える(#103)。これによって、プログラムP1の先頭アドレスがプログラム停止位置として設定される。なお、命令とは、例えばプロセスなどの実行単位である。   In FIG. 8, a program P 1 is stored in the memory space of the memory 12. When setting the program stop position, the collection point setting unit 104 first acquires the head address of the program P1 (# 101). As shown in FIG. 8I, the instruction M1 stored at the head address is saved by copying it to an instruction saving area (data saving area) prepared in advance in the memory space ( # 102). Further, as shown in (ii) of FIG. 8, the contents of the head address of the program P1 are replaced with a trap instruction (# 103). As a result, the head address of the program P1 is set as the program stop position. An instruction is an execution unit such as a process.

プログラムP1の処理が開始されると、先頭アドレスに格納されたトラップ命令が実行される(#104)。それによってプログラム情報収集部107が起動され動作を開始する。なお、トラップ命令には、例えば、プログラム情報収集部107を起動する旨の命令および次に処理されるべき命令(ジャンプ先)のアドレスなどが含まれている。   When the processing of the program P1 is started, the trap instruction stored at the head address is executed (# 104). As a result, the program information collection unit 107 is activated and starts operating. The trap instruction includes, for example, an instruction for starting the program information collecting unit 107 and an address of an instruction (jump destination) to be processed next.

プログラム情報収集部107は、動作を開始すると、プログラムP1の処理を一時的に停止させる。そして、その時点でのプログラム情報を収集するための処理を行う(#105)。   When starting the operation, the program information collection unit 107 temporarily stops the processing of the program P1. Then, processing for collecting program information at that time is performed (# 105).

プログラム情報の収集に際して、プログラム情報収集部107は、レジスタ値取得部102に指示して対応するCPU11からそのCPU11のレジスタ情報を取得させる。また、これと並行してまたは前後して、プロセス情報取得部16に対して、プロセス情報を取得するように指示する。そして、それらレジスタ情報およびプロセス情報を、それぞれ、レジスタ値取得部102およびプロセス情報取得部16から受け取る。   When collecting program information, the program information collection unit 107 instructs the register value acquisition unit 102 to acquire the register information of the CPU 11 from the corresponding CPU 11. In parallel or before or after this, the process information acquisition unit 16 is instructed to acquire process information. The register information and process information are received from the register value acquisition unit 102 and the process information acquisition unit 16, respectively.

履歴情報生成部108は、プログラム情報収集部107が収集したプログラム情報(レジスタ情報およびプロセス情報)を受け取り、それを用いて履歴情報DRを生成するための処理を行う。この処理に際して、履歴情報生成部108は、カウント値取得部101に対してカウント値の取得を指示する。その指示に基づいてカウント値取得部101は、カウンタ部17にアクセスしカウント値を取得する(#106)。   The history information generation unit 108 receives the program information (register information and process information) collected by the program information collection unit 107, and performs processing for generating history information DR using the program information. In this process, the history information generation unit 108 instructs the count value acquisition unit 101 to acquire a count value. Based on the instruction, the count value acquisition unit 101 accesses the counter unit 17 and acquires the count value (# 106).

このとき、カウンタ部17は、自身で保持するカウント値を1つ増やす。これによって、次にアクセスされたときに、今回出力したカウント値よりも1大きいカウント値が出力される。すなわち、各プログラム情報に対して全体として一意となるシーケンシャルなカウント値の払い出しが行われる。   At this time, the counter unit 17 increases the count value held by itself by one. As a result, when accessed next time, a count value that is one greater than the count value output this time is output. That is, a sequential count value that is unique as a whole is paid out for each program information.

カウント値を取得すると、カウント値取得部101は、それを履歴情報生成部108に対して出力する。履歴情報生成部108は、プログラム情報収集部107から受け取ったプログラム情報に対して、そのカウント値を付与する。さらに、プログラム情報に示される内容を並べ替え、わかりやすくなるように冗長化し、または不要な情報を削除するなどの加工処理を必要に応じて行って、図9に示すような履歴情報DRを生成する。   When the count value is acquired, the count value acquisition unit 101 outputs it to the history information generation unit 108. The history information generation unit 108 gives the count value to the program information received from the program information collection unit 107. Furthermore, the history information DR as shown in FIG. 9 is generated by rearranging the contents shown in the program information, making it redundant so that it is easy to understand, or performing unnecessary processing such as deleting unnecessary information. To do.

図9に示されるように、履歴情報DRには、カウント値、レジスタ値、プロセスID、およびスタック情報の他、「CPU識別情報」および「命令」などが含まれる。   As shown in FIG. 9, the history information DR includes “CPU identification information” and “instruction” in addition to the count value, register value, process ID, and stack information.

「CPU識別情報」には、各CPU11a,11b,…を識別するための情報が示される。なお、上の例では、命令M1を実行するCPUのCPU識別情報を取得することでもよい。「命令」には、CPUが実行した命令文が示される。なお、ここでは、説明簡単のため、カウント値として図9に示すような値を用いたが、実際には、32ビット程度の値が用いられる。   The “CPU identification information” indicates information for identifying each of the CPUs 11a, 11b,. In the above example, CPU identification information of the CPU that executes the instruction M1 may be acquired. The “command” indicates a command sentence executed by the CPU. Here, for simplicity of explanation, a value as shown in FIG. 9 is used as the count value, but a value of about 32 bits is actually used.

履歴情報出力部110は、対応するCPU11に対して設けられたメモリ12内の領域(履歴格納エリア)に、履歴情報生成部108が生成した履歴情報DRを出力して保存する(#107)。   The history information output unit 110 outputs and stores the history information DR generated by the history information generation unit 108 in an area (history storage area) in the memory 12 provided for the corresponding CPU 11 (# 107).

この後、プログラム情報収集部107は、命令退避用領域に退避された命令M1を実行し(#108)、実行の後は、その命令M1をメモリ空間の元のアドレス、すなわちトラップ命令が格納されているアドレスに戻す(#109)。なお、この場合に、プログラム情報収集部107は、命令M1の実行を支援するようにしてもよい。すなわち、命令M1のアドレスをCPU11に渡し、実際の命令M1の処理はCPU11が実行するようにしてもよい。後に説明する〔第2の方法〕における図11のステップ#208についても同様である。   Thereafter, the program information collection unit 107 executes the instruction M1 saved in the instruction saving area (# 108), and after execution, the instruction M1 is stored with the original address of the memory space, that is, the trap instruction. (# 109). In this case, the program information collection unit 107 may support execution of the instruction M1. That is, the address of the instruction M1 may be passed to the CPU 11, and the actual process of the instruction M1 may be executed by the CPU 11. The same applies to step # 208 of FIG. 11 in the [second method] described later.

さらに、プログラム情報収集部107は、収集ポイント設定部104に対して、次のプログラム停止位置の設定を指示する。収集ポイント設定部104は、その指示に基づいて、プログラムP1において、命令M1の次に実行される命令(次の命令)のアドレスを求める。   Further, the program information collection unit 107 instructs the collection point setting unit 104 to set the next program stop position. Based on the instruction, the collection point setting unit 104 obtains the address of the instruction (next instruction) to be executed next to the instruction M1 in the program P1.

次の命令のアドレスは、通常、命令M1が格納されているアドレスの次のアドレスとなるが、命令M1が関数呼び出しに係る命令である場合は、呼び出す先のアドレスが次の命令のアドレスとなる。分岐命令などの場合はレジスタ情報を参照して、次の命令のアドレスを求める。   The address of the next instruction is normally the address next to the address where the instruction M1 is stored, but when the instruction M1 is an instruction related to a function call, the address to be called is the address of the next instruction. . In the case of a branch instruction, the address of the next instruction is obtained by referring to the register information.

次の命令(ここでは、「命令M2」と記載する。)のアドレスが求まると(#110および#111でYes)、その命令M2を命令退避用領域に退避させ(#112)、そのアドレスの内容をトラップ命令に置き換える(#113)。   When the address of the next instruction (herein referred to as “instruction M2”) is obtained (Yes in # 110 and # 111), the instruction M2 is saved in the instruction saving area (# 112), and the address The contents are replaced with a trap instruction (# 113).

ステップ#113までの処理が終了すると、プログラムP1の処理が続行される。そして、その処理が命令M2に差し掛かる(達する)と、ステップ#113において命令M2のアドレスに格納されたトラップ命令が実行される(#104)。そして、命令M2についてのステップ#105からステップ#109までの処理が行われる。その後、ステップ#110において、さらに次の命令のアドレスが決定され、同様の処理が繰り返される。   When the processing up to step # 113 is completed, the processing of the program P1 is continued. When the process reaches (reaches) the instruction M2, the trap instruction stored at the address of the instruction M2 is executed in step # 113 (# 104). Then, the process from step # 105 to step # 109 for the instruction M2 is performed. Thereafter, in step # 110, the address of the next instruction is further determined, and the same processing is repeated.

以上の処理によって、図10に示すように、CPU11ごとに、順次、プログラムP1に含まれるすべの命令についての履歴情報DRが出力される。すなわち、複数のCPU11に跨って、実行された命令を順次トレースできるプログラム走行履歴を得ることができる。
〔第2の方法〕
図11は第2の方法による履歴情報DRの収集の処理の流れを説明するためのフローチャートである。ここでは、ユーザが任意に指定した関数の実行時にのみ履歴情報DRを収集する場合について説明する。なお、〔第1の方法〕において説明したものと同様の処理については詳細な説明は省略する。
Through the above processing, as shown in FIG. 10, the history information DR for all the instructions included in the program P1 is sequentially output for each CPU 11. That is, it is possible to obtain a program running history that can sequentially trace executed instructions across a plurality of CPUs 11.
[Second method]
FIG. 11 is a flowchart for explaining the flow of processing for collecting history information DR by the second method. Here, a case will be described in which history information DR is collected only when a function arbitrarily designated by the user is executed. Note that detailed description of the same processing as that described in [First Method] is omitted.

ユーザがログ収集対象の関数(ここでは、「関数K1」と記載する。)を指定すると、収集対象指定受付部103は、その指定を受け付ける(#200)。   When the user designates a log collection target function (here, described as “function K1”), the collection target designation receiving unit 103 receives the designation (# 200).

収集対象関数設定部105は、収集対象指定受付部103から関数K1の関数名を受け取り、プログラム上のシンボル情報を基にメモリ空間内でのその関数K1の開始アドレスおよび範囲を求める(#201)。さらに、求めた開始アドレスに示される命令(ここでは、「命令M3」と記載する。)を命令退避用領域に退避させ(#202)、その開始アドレスの内容をトラップ命令によって置き換える(#203)。これによって、その開始アドレスがプログラム停止位置に設定される。   The collection target function setting unit 105 receives the function name of the function K1 from the collection target designation receiving unit 103, and obtains the start address and range of the function K1 in the memory space based on the symbol information on the program (# 201). . Furthermore, the instruction indicated by the obtained start address (herein referred to as “instruction M3”) is saved in the instruction save area (# 202), and the contents of the start address are replaced with a trap instruction (# 203). . As a result, the start address is set to the program stop position.

関数K1を含むプログラム(ここでは、「プログラムP2」と記載する。)が開始されその処理が関数K1に差し掛かると、関数K1の先頭アドレスに格納されたトラップ命令が実行される(#204)。それによってプログラム情報収集部107が起動され動作を開始する。プログラム情報収集部107は、動作を開始すると、プログラムP2の処理を一時的に停止させる。そして、その時点でのプログラム情報を収集する(#205)。   When a program including the function K1 (herein referred to as “program P2”) is started and the process reaches the function K1, the trap instruction stored at the start address of the function K1 is executed (# 204). . As a result, the program information collection unit 107 is activated and starts operating. When starting the operation, the program information collecting unit 107 temporarily stops the processing of the program P2. Then, program information at that time is collected (# 205).

履歴情報生成部108は、プログラム情報収集部107が収集したプログラム情報を受け取り、それを用いて履歴情報DRを生成するための処理を行う。この処理に際して、履歴情報生成部108は、カウント値取得部101に対してカウント値の取得を指示する。その指示に基づいてカウント値取得部101は、カウンタ部17にアクセスしカウント値を取得する(#206)。   The history information generation unit 108 receives the program information collected by the program information collection unit 107, and performs processing for generating history information DR using the program information. In this process, the history information generation unit 108 instructs the count value acquisition unit 101 to acquire a count value. Based on the instruction, the count value acquisition unit 101 accesses the counter unit 17 and acquires a count value (# 206).

このとき、カウンタ部17は、自身で保持するカウント値を1つ増やす。これによって、次にアクセスされたときに、今回出力したカウント値よりも1大きいカウント値が出力される。   At this time, the counter unit 17 increases the count value held by itself by one. As a result, when accessed next time, a count value that is one greater than the count value output this time is output.

履歴情報生成部108は、カウント値取得部101が取得したカウント値およびプログラム情報収集部107から受け取ったプログラム情報を用いて履歴情報DRを生成する。   The history information generation unit 108 generates history information DR using the count value acquired by the count value acquisition unit 101 and the program information received from the program information collection unit 107.

履歴情報出力部110は、対応するCPU11に対して設けられたメモリ12内の領域に、履歴情報生成部108が生成した履歴情報DRを出力して保存する(#207)。   The history information output unit 110 outputs and stores the history information DR generated by the history information generation unit 108 in an area in the memory 12 provided for the corresponding CPU 11 (# 207).

この後、プログラム情報収集部107は、命令退避用領域に格納されている命令M3を実行し(#208)、その命令M3をメモリ空間の元のアドレス、すなわちトラップ命令が格納されているアドレスに戻す(#209)。   Thereafter, the program information collection unit 107 executes the instruction M3 stored in the instruction saving area (# 208), and sets the instruction M3 to the original address of the memory space, that is, the address where the trap instruction is stored. Return (# 209).

さらに、プログラム情報収集部107は、収集対象関数設定部105に対して、次のプログラム停止位置の設定を指示する。収集対象関数設定部105は、その指示に基づいて、関数K1において、命令M3の次に実行される命令(次の命令)のアドレスを求める。   Furthermore, the program information collection unit 107 instructs the collection target function setting unit 105 to set the next program stop position. Based on the instruction, the collection target function setting unit 105 obtains the address of the instruction (next instruction) to be executed next to the instruction M3 in the function K1.

次の命令のアドレスは、通常は現在の命令のアドレスの次のアドレスであるが、分岐命令等の場合はレジスタ情報を参照し、次の命令のアドレスを求める。現在の命令が関数呼び出しの命令である場合は、関数呼び出しから復帰した際に実行されるアドレスとなる。   The address of the next instruction is normally the address next to the address of the current instruction, but in the case of a branch instruction or the like, the register information is referred to determine the address of the next instruction. When the current instruction is a function call instruction, the address is executed when returning from the function call.

次の命令(ここでは、「命令M4」と記載する。)のアドレスが求まると(#210および#211でYes)、その命令M4を命令退避用領域に退避させ(#212)、そのアドレスの内容をトラップ命令に置き換える(#213)。   When the address of the next instruction (herein referred to as “instruction M4”) is obtained (Yes in # 210 and # 211), the instruction M4 is saved in the instruction saving area (# 212), and the address The contents are replaced with a trap instruction (# 213).

ステップ#213までの処理が終了すると、プログラム本体であるプログラムP2の処理が続行される。そして、命令M4の処理に差し掛かると、ステップ#213において命令M4のアドレスに格納されたトラップ命令が実行される(#204)。そして、命令M4についてのステップ#205からステップ#209までの処理が行われる。その後、ステップ#210において、さらに次の命令のアドレスが決定され、同様の処理が繰り返される。   When the processing up to step # 213 is completed, the processing of the program P2, which is the program body, is continued. When the processing of the instruction M4 is started, the trap instruction stored at the address of the instruction M4 is executed in step # 213 (# 204). Then, processing from step # 205 to step # 209 for the instruction M4 is performed. Thereafter, in step # 210, the address of the next instruction is further determined, and the same processing is repeated.

なお、関数K1が他の関数から呼び出されるものである場合は、関数K1の実行が終了し呼び出し元の関数に戻るときに、関数K1の先頭アドレスの命令を命令退避用領域に退避してトラップ命令と置き換えておく。これは、次に関数K1が動作したときにもプログラム情報収集部107を動作させるためである。   If the function K1 is called from another function, when the execution of the function K1 ends and the function returns to the calling function, the instruction at the head address of the function K1 is saved in the instruction saving area and trapped. Replace with an instruction. This is because the program information collecting unit 107 is operated when the function K1 is operated next time.

以上の処理によって、ユーザが指定した関数K1の範囲内での履歴情報DRが蓄積され関数K1についての動作をトレースできる情報を得ることができる。   Through the above processing, history information DR within the range of the function K1 designated by the user is accumulated, and information that can trace the operation of the function K1 can be obtained.

なお、第2の方法において、複数の関数をログ収集対象として指定するようにしてもよい。その場合も、履歴情報DRが出力される順(命令の実行順)に、各履歴情報DRに対して一意でシーケンシャルなカウント値が対応付けられるので、その履歴情報DRによって、複数の関数間における命令の実行順序および実行したCPU11を特定することができる。
〔第3の方法〕
図12は第3の方法による履歴情報DRの収集の処理の流れを説明するためのフローチャート、図13はブレークの設定および発生の際の処理を説明するための図である。ここでは、ユーザが任意に指定したデータがアクセスされたときにのみ履歴情報DRを収集する場合について説明する。なお、〔第1の方法〕および〔第2の方法〕において説明したものと同様の処理については詳細な説明は省略する。
In the second method, a plurality of functions may be designated as log collection targets. Also in this case, a unique and sequential count value is associated with each history information DR in the order in which the history information DR is output (instruction execution order). The execution order of instructions and the CPU 11 that executed them can be specified.
[Third method]
FIG. 12 is a flowchart for explaining the flow of processing for collecting history information DR by the third method, and FIG. 13 is a diagram for explaining processing for setting and generating a break. Here, a case will be described in which the history information DR is collected only when data arbitrarily designated by the user is accessed. Note that detailed description of the same processing as that described in [First Method] and [Second Method] is omitted.

ユーザがログ収集対象のデータ(ここでは、「データD1」と記載する。)を指定すると、収集対象指定受付部103は、その指定を受け付ける(#300)。   When the user designates log collection target data (herein described as “data D1”), the collection target designation receiving unit 103 receives the designation (# 300).

収集対象データ設定部106は、収集対象指定受付部103からデータD1の名前(データ名)を受け取り、図13の(i)に示すように、データD1に対して「リードブレーク」および「ライトブレーク」を設定する(#301)。   The collection target data setting unit 106 receives the name (data name) of the data D1 from the collection target designation receiving unit 103, and as shown in (i) of FIG. 13, “read break” and “write break” are performed on the data D1. "Is set (# 301).

「リードブレーク」とは、それが設定されたデータが読み出されようとしたときにその読み出しに係る実行中のプログラムをブレーク(中断)させる機能である。「ライトブレーク」とは、それが設定されたデータへの書き込み(更新)が行われようとしたときにその書き込みに係る実行中のプログラムをブレークさせる機能である。なお、本実施形態では、リードブレークまたはライトブレークによってブレークが発生したときにプログラム情報収集部107が起動され動作を開始する。または、データD1へのアクセスが行われたときに、収集対象データ設定部106が実行中のプログラムの処理を中断させ、プログラム情報収集部107を起動するようにしてもよい。リードブレークおよびライトブレークの設定によって、データD1のアドレスがプログラム停止位置に設定される。   The “read break” is a function that breaks (suspends) a program that is being executed when the set data is about to be read. The “write break” is a function for causing a program that is being executed to break when a write (update) to the set data is attempted. In this embodiment, when a break occurs due to a read break or a write break, the program information collection unit 107 is activated and starts operating. Alternatively, when the data D1 is accessed, the processing of the program being executed by the collection target data setting unit 106 may be interrupted, and the program information collection unit 107 may be activated. By setting the read break and the write break, the address of the data D1 is set at the program stop position.

プログラムの実行中に、リードブレークおよびライトブレークを設定されたデータへの読み込みまたは書き込みについてのアクセスがあると、ブレークが発生する(#302)。これによって、プログラム情報収集部107が起動される(図13の(ii))。   If there is an access for reading or writing to data for which a read break and a write break are set during the execution of the program, a break occurs (# 302). As a result, the program information collection unit 107 is activated ((ii) in FIG. 13).

プログラム情報収集部107は、動作を開始すると、その時点でのプログラム情報を収集する(#303)。   When the operation starts, the program information collection unit 107 collects program information at that time (# 303).

履歴情報生成部108は、プログラム情報収集部107が収集したプログラム情報を受け取り、それを用いて履歴情報DRを生成するための処理を行う。この処理に際して、履歴情報生成部108は、カウント値取得部101に対してカウント値の取得を指示する。その指示に基づいてカウント値取得部101は、カウンタ部17にアクセスしカウント値を取得する(#304)。   The history information generation unit 108 receives the program information collected by the program information collection unit 107, and performs processing for generating history information DR using the program information. In this process, the history information generation unit 108 instructs the count value acquisition unit 101 to acquire a count value. Based on the instruction, the count value acquisition unit 101 accesses the counter unit 17 and acquires the count value (# 304).

このとき、カウンタ部17は、自身で保持するカウント値を1つ増やす。これによって、次にアクセスされたときに、今回出力したカウント値よりも1大きいカウント値が出力される。   At this time, the counter unit 17 increases the count value held by itself by one. As a result, when accessed next time, a count value that is one greater than the count value output this time is output.

履歴情報生成部108は、カウント値が取得したカウント値およびプログラム情報収集部107から受け取ったプログラム情報を用いて履歴情報DRを生成する。   The history information generation unit 108 generates history information DR using the count value acquired by the count value and the program information received from the program information collection unit 107.

履歴情報出力部110は、対応するCPU11に対して設けられたメモリ12内の領域に、履歴情報生成部108が生成した履歴情報DRを出力して保存する(#305)。   The history information output unit 110 outputs and stores the history information DR generated by the history information generation unit 108 in an area in the memory 12 provided for the corresponding CPU 11 (# 305).

この後、通常どおり元のデータD1についての読み込みまたは書き込みの処理が行われその後の処理が続行される(#306)。処理の実行中に、再びデータD1がアクセスされたときは、ステップ#302以降の処理が行われる。   Thereafter, the reading or writing process for the original data D1 is performed as usual, and the subsequent process is continued (# 306). When the data D1 is accessed again during the execution of the process, the processes after step # 302 are performed.

なお、ログ収集対象のデータを複数個指定することも可能である。その場合は、収集対象データ設定部106によって、それら複数のデータに対してリードブレークおよびライトブレークが設定される。そして、それらのデータのいずれかにアクセスがあったときにブレークが発生し、それによって、ステップ#302以降の処理が行われる。   It is also possible to specify a plurality of data for log collection. In that case, a read break and a write break are set for the plurality of pieces of data by the collection target data setting unit 106. Then, a break occurs when any of these data is accessed, whereby the processing from step # 302 is performed.

以上の処理によって、ユーザが指定したデータD1の参照または更新の際に履歴情報DRが蓄積され、データD1についての処理をトレースできる情報を得ることができる。   Through the above processing, the history information DR is accumulated when referring to or updating the data D1 designated by the user, and information that can trace the processing on the data D1 can be obtained.

なお、リードブレークまたはライトブレークのいずれを設定するのかをユーザが指定できるようにしてもよい。   Note that the user may be able to specify whether to set a read break or a write break.

ところで、複数のCPUを有するコンピュータにおいて問題が発生した場合、その原因となる操作(または処理)を追求するために、CPUごとにプログラム走行履歴を収集し、実行された命令を複数のCPUに跨って時系列にトレースする必要がある。   By the way, when a problem occurs in a computer having a plurality of CPUs, in order to pursue an operation (or process) that causes the problem, a program running history is collected for each CPU, and executed instructions are spread over a plurality of CPUs. Need to be traced in time series.

本実施形態によれば、問題が発生した際の解析(障害解析)に有効なプログラム情報(レジスタ情報およびプロセス情報)が出力される。また、CPU11ごとに履歴情報出力処理部15が設けられかつ全てのCPU11に対して1つのカウンタ部17が設けられていることによって、出力される各プログラム情報に対して一意でシーケンシャルなカウント値が付与される。これによって、プログラム情報が実行命令単位の時系列な履歴情報として蓄積される。すなわち、命令の実行順序および実行したCPU11を特定できる情報を収集することができる。   According to the present embodiment, program information (register information and process information) effective for analysis when a problem occurs (failure analysis) is output. In addition, since the history information output processing unit 15 is provided for each CPU 11 and one counter unit 17 is provided for all the CPUs 11, a unique and sequential count value can be obtained for each program information to be output. Is granted. Thereby, program information is accumulated as time-series history information in units of execution instructions. That is, it is possible to collect information that can specify the execution order of instructions and the CPU 11 that has executed the instructions.

発生した問題の解析の際にキーとなる情報(関数およびデータなど)は、既存のダンプファイルの内容から事前に想定できている場合がある。そのような場合、実行された全ての命令についてプログラム情報を収集すると、解析に無関係であることが既に分かっている情報まで出力されることになり、それによってメモリ領域(リソース)が無駄に消費されてしまう。また、真に解析に必要な情報が紛れてしまうことによって、解析の作業に支障をきたしてしまう恐れがある。   In some cases, key information (functions, data, etc.) when analyzing a problem that has occurred can be estimated in advance from the contents of an existing dump file. In such a case, if program information is collected for all executed instructions, information that is already known to be irrelevant to the analysis will be output, which wastes memory space (resources). End up. Moreover, there is a possibility that the analysis work may be hindered because the information necessary for the analysis is truly lost.

収集する情報の量を削減するために、タイマなどを使用し、一定の時間間隔で収集を行うことも考えられる。しかし、この方法では、収集が行われるべき時点で収集が行われずに必要な情報が欠落してしまうことがある。そうすると、解析の作業に支障をきたしてしまう。   In order to reduce the amount of information to be collected, it is conceivable to use a timer or the like and perform collection at regular time intervals. However, in this method, there is a case where necessary information is lost because the collection is not performed at the time when the collection should be performed. This will hinder the analysis work.

上述の第2または第3の方法によると、解析のためにプログラム情報の収集が必要な関数またはデータが予めユーザによって指定され、その関数内の各命令またはそのデータの単位でプログラム情報が収集される。このように必要な部分のみについてのプログラム情報を収集することによって、解析に必要な情報を収集しつつ無駄にリソースが消費されることを防止できる。また、効率的なトレースが可能となる。   According to the second or third method described above, a function or data that requires collection of program information for analysis is designated in advance by the user, and program information is collected in units of each instruction or data in the function. The By collecting program information for only necessary parts in this way, it is possible to prevent resources from being wasted while collecting information necessary for analysis. Also, efficient tracing is possible.

また、本実施形態によれば、ユーザ自らが、履歴情報DRの出力先として、高速なメディア、大容量のメディア、または通信回線(ネットワーク)を介した他の装置のメディアなど、ユーザ環境のことなる種々の場所(記録エリア)を指定できる。よって、リソースの使用状況などに応じた適切な場所に履歴情報DRを出力することができ、利便性が向上する。   Further, according to the present embodiment, the user himself / herself is a user environment such as a high-speed medium, a large-capacity medium, or a medium of another device via a communication line (network) as an output destination of the history information DR. Various locations (recording areas) can be designated. Therefore, the history information DR can be output to an appropriate place according to the resource usage status and the convenience is improved.

さらに、本実施形態によれば、問題発生時の解析に必要な情報の収集をソフトウェアによって実現できるので、特別なハードウェアを追加する必要がなく、コストを抑えることができる。   Furthermore, according to the present embodiment, information necessary for analysis when a problem occurs can be collected by software, so that it is not necessary to add special hardware, and costs can be reduced.

すなわち、本実施形態によれば、問題発生時の解析の作業を飛躍的に効率化でき、原因の解明が不可能であった問題について解明できる可能性を高くできる。更に、収集する情報を絞り込むことで、高速化かつ効率化を実現でき、加えて、解析作業の効率をも向上できる。   That is, according to this embodiment, the analysis work at the time of the problem occurrence can be dramatically improved, and the possibility that the problem that could not be solved can be solved. Furthermore, by narrowing down the information to be collected, speeding up and efficiency can be realized, and in addition, the efficiency of analysis work can be improved.

図14は第1から第3の方法を併用した場合のプログラム停止位置の設定の処理を説明するための図、図15は他の例による履歴情報の収集の処理の流れを説明するためのフローチャートである。   FIG. 14 is a diagram for explaining processing for setting a program stop position when the first to third methods are used in combination, and FIG. 15 is a flowchart for explaining the flow of processing for collecting history information according to another example. It is.

本実施形態においては、第1の方法、第2の方法、および第3の方法を個々に行う場合について説明したが、これらを併用することも可能である。すなわち、ログ収集対象としてプログラムP4、関数K2、およびデータD2が指定された場合は、図14に示すように、収集ポイント設定部104によってプログラムP4および関数K2の先頭アドレスにトラップ命令が格納され、データ2に対してリードブレークおよびライトブレークが設定される。そして、プログラムP4の先頭アドレスに格納されたトラップ命令の実行を契機として第1の方法による履歴情報DRの収集が行われる。関数K2の先頭アドレスに格納されたトラップ命令の実行を契機として第2の方法による履歴情報DRの収集が行われる。また、データD2へのアクセスを契機として第3の方法による履歴情報DRの収集が行われる。   In this embodiment, although the case where the 1st method, the 2nd method, and the 3rd method were performed individually was demonstrated, these can also be used together. That is, when the program P4, the function K2, and the data D2 are designated as the log collection target, as shown in FIG. 14, the trap instruction is stored at the start address of the program P4 and the function K2 by the collection point setting unit 104, A read break and a write break are set for data 2. The history information DR is collected by the first method triggered by the execution of the trap instruction stored at the head address of the program P4. The history information DR is collected by the second method triggered by the execution of the trap instruction stored at the head address of the function K2. Further, history information DR is collected by the third method triggered by access to data D2.

本実施形態では、コンピュータ1として複数のCPUを有するものを用いたが、単一のCPUを有するコンピュータを用いてもよい。その場合は、履歴情報出力処理部15を1つだけ設けておけばよい。   In the present embodiment, a computer 1 having a plurality of CPUs is used, but a computer having a single CPU may be used. In that case, only one history information output processing unit 15 may be provided.

また、カウント値を履歴情報DRに含めるのではなく、履歴情報DRとともに指定の出力先に出力して保存するようにしてもよい。   Further, the count value may not be included in the history information DR, but may be output and stored together with the history information DR at a specified output destination.

第1の方法および第2の方法において、ユーザなどによって予め指定された命令についてのみプログラム停止位置を設定するようにし、それによって、指定された命令についての履歴情報DRだけを収集するようにしてもよい。   In the first method and the second method, the program stop position is set only for an instruction designated in advance by a user or the like, and thereby only the history information DR for the designated instruction is collected. Good.

または、次のようにして履歴情報DRを収集してもよい。予め履歴情報DRの収集対象とする全ての命令を命令退避用領域に退避させて(図15(a)の#400)、それぞれをトラップ命令に置き換えておく(#401)。そして、プログラムが開始されたら(図15(b)の#500)、ステップ#401において置き換えられた各トラップ命令の箇所において履歴情報DRを収集するための処理、すなわち図7のステップ#104からステップ#109までの処理または図11のステップ#204からステップ#209までの処理を実行するようにする。なお、図15(a)に示す各ステップについては、ユーザ自らが手動で行うようにしてもよい。   Alternatively, the history information DR may be collected as follows. All instructions to be collected in the history information DR are saved in advance in the instruction saving area (# 400 in FIG. 15A), and each is replaced with a trap instruction (# 401). Then, when the program is started (# 500 in FIG. 15B), a process for collecting history information DR at the location of each trap instruction replaced in step # 401, that is, steps from step # 104 in FIG. The processing up to # 109 or the processing from step # 204 to step # 209 in FIG. 11 is executed. Note that each step shown in FIG. 15A may be manually performed by the user himself / herself.

本実施形態では、第1の方法および第2の方法において、ある命令についての履歴情報DRの収集が行われた後に次の命令についてのプログラム停止位置の設定を行ったが、プログラム停止位置の設定を、履歴情報DRを収集する対象となる全ての命令に対して予め行っておくようにしてもよい。   In the present embodiment, in the first method and the second method, the history information DR for a certain instruction is collected and then the program stop position is set for the next instruction. However, the program stop position is set. May be performed in advance for all instructions for which the history information DR is collected.

なお、履歴情報DRを生成することによって履歴の管理を支援する履歴情報生成部108を「履歴管理部」と呼ぶことができる。履歴についてのデータを一旦保持し、出力する履歴情報出力部110を「履歴保持部」と呼ぶことができる。   The history information generation unit 108 that supports history management by generating the history information DR can be referred to as a “history management unit”. The history information output unit 110 that once holds and outputs data about the history can be referred to as a “history holding unit”.

その他、コンピュータ1の各部の構成、機能、各データが示す内容、処理の内容または順序などは、本発明の趣旨に沿って適宜変更することができる。   In addition, the configuration and function of each unit of the computer 1, the contents indicated by each data, the contents or order of processing, and the like can be appropriately changed in accordance with the spirit of the present invention.

上に述べた実施例には、以下に述べるような付記も開示されている。
(付記1)
複数のCPUを搭載したコンピュータシステムであって、
プログラムの実行中に前記CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイントを、当該プログラム内において順次設定する取得ポイント設定手段と、
前記プログラムの処理が前記取得ポイントの箇所に来るごとに、前記取得処理を行うプログラム情報取得手段と、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタと、
前記プログラム情報取得手段によって前記取得処理が行われるごとに、前記カウンタにアクセスして前記カウント値を取得するカウント値取得手段と、
前記取得処理で取得された前記プログラム情報を、前記カウント値取得手段によって取得された当該プログラム情報に対応する前記カウント値とともに保存するプログラム情報保存手段と、
を有することを特徴とするコンピュータシステム。
(付記2)
前記プログラム情報取得手段および前記カウント値取得手段は、それぞれ、前記CPUごとに設けられており、
前記カウンタは、前記CPUごとに設けられた前記各カウント値取得手段から共通にアクセスされるように設けられており、
前記プログラム情報取得手段は、それぞれに対応する前記CPUから前記レジスタ値を取得する、
付記1記載のコンピュータシステム。
(付記3)
ユーザから指定される、前記プログラム情報の取得対象を受け付ける取得対象受付手段と、
前記取得対象受付手段が受け付けた前記取得対象が関数であった場合に、当該関数内において前記取得ポイントを順次設定する関数内設定手段と、
を有する付記1または2記載のコンピュータシステム。
(付記4)
前記取得対象受付手段が受け付けた前記取得対象がデータであった場合に、前記プログラムの実行中に当該データがアクセスされる際に当該プログラムをブレークさせるための設定を行うブレーク設定手段を有し、
前記プログラム情報取得手段は、前記プログラムの実行中にブレークが発生したときに前記取得処理を行う、
付記3記載のコンピュータシステム。
(付記5)
ユーザから指定される、前記プログラム情報の保存先を受け付ける保存先受付手段を有し、
前記プログラム情報保存手段は、前記保存先受付手段が受け付けた保存先に前記プログラム情報を保存する、
付記1ないし4のいずれかに記載のコンピュータシステム。
(付記6)
複数のCPUを搭載したコンピュータシステムであって、
プログラムの実行中に所定のデータがアクセスされる際に当該プログラムをブレークさせるための設定を行うブレーク設定手段と、
前記プログラムの実行中にブレークが発生したときに、前記CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理を行うプログラム情報取得手段と、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタと、
前記プログラム情報取得手段によって前記取得処理が行われるごとに、前記カウンタにアクセスして前記カウント値を取得するカウント値取得手段と、
前記取得処理で取得された前記プログラム情報を、前記カウント値取得手段によって取得された当該プログラム情報に対応する前記カウント値とともに保存するプログラム情報保存手段と、
を有することを特徴とするコンピュータシステム。
(付記7)
複数のCPUを搭載したコンピュータシステムでのプログラムの実行中に当該CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイントを、当該プログラムに対して設定する第1ステップと、
前記プログラムの処理が前記取得ポイントの箇所に来たときに前記取得処理を行う第2ステップと、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタに、前記取得ポイントにおいて前記取得処理が行われたときにアクセスして、前記カウント値を取得する第3ステップと、
前記取得処理で取得された前記プログラム情報を、前記第3ステップで取得された当該プログラム情報に対応する前記カウント値とともに保存する第4ステップとを有し、
前記第1ステップの処理によって前記プログラム内に順次設定される前記各取得ポイントについて、前記第2ステップ、前記第3ステップ、および前記第4ステップの処理を行う、
ことを特徴とするプログラム情報収集方法。
(付記8)
複数のCPUを搭載したコンピュータに、
プログラムの実行中に当該CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイントを、当該プログラムに対して設定する第1ステップと、
前記プログラムの処理が前記取得ポイントの箇所に来たときに前記取得処理を行う第2ステップと、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタに、前記取得ポイントにおいて前記取得処理が行われたときにアクセスして、前記カウント値を取得する第3ステップと、
前記取得処理で取得された前記プログラム情報を、前記第3ステップで取得された当該プログラム情報に対応する前記カウント値とともに保存する第4ステップと、を実行させ、
その際に、
前記第1ステップの処理によって前記プログラム内に順次設定される前記各取得ポイントについて、前記第2ステップ、前記第3ステップ、および前記第4ステップの処理を実行させる、
ことを特徴とするコンピュータプログラム。
In the embodiment described above, the following notes are also disclosed.
(Appendix 1)
A computer system having a plurality of CPUs,
An acquisition point setting means for sequentially setting an acquisition point that triggers the start of an acquisition process for acquiring program information including the CPU register value and process information during execution of the program;
Program information acquisition means for performing the acquisition processing each time the processing of the program comes to the location of the acquisition point;
A counter that outputs an incremented or decremented count value each time it is accessed;
Each time the acquisition process is performed by the program information acquisition unit, the count value acquisition unit that accesses the counter and acquires the count value;
Program information storage means for storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired by the count value acquisition means;
A computer system comprising:
(Appendix 2)
The program information acquisition unit and the count value acquisition unit are provided for each CPU,
The counter is provided so as to be commonly accessed from each count value acquisition means provided for each CPU.
The program information acquisition means acquires the register value from the corresponding CPU.
The computer system according to appendix 1.
(Appendix 3)
An acquisition target receiving means for receiving an acquisition target of the program information designated by a user;
In-function setting means for sequentially setting the acquisition points in the function when the acquisition target received by the acquisition target receiving means is a function;
The computer system according to Supplementary Note 1 or 2, further comprising:
(Appendix 4)
When the acquisition target received by the acquisition target reception means is data, the program has break setting means for performing settings for causing the program to break when the data is accessed during execution of the program,
The program information acquisition means performs the acquisition process when a break occurs during the execution of the program.
The computer system according to attachment 3.
(Appendix 5)
A storage destination receiving means for receiving a storage destination of the program information designated by the user;
The program information storage unit stores the program information in the storage destination received by the storage destination reception unit.
The computer system according to any one of appendices 1 to 4.
(Appendix 6)
A computer system having a plurality of CPUs,
Break setting means for making a setting to break the program when predetermined data is accessed during execution of the program;
Program information acquisition means for performing an acquisition process for acquiring program information including a register value of the CPU and process information when a break occurs during execution of the program;
A counter that outputs an incremented or decremented count value each time it is accessed;
Each time the acquisition process is performed by the program information acquisition unit, the count value acquisition unit that accesses the counter and acquires the count value;
Program information storage means for storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired by the count value acquisition means;
A computer system comprising:
(Appendix 7)
The acquisition point that triggers the start of an acquisition process for acquiring program information including the register value and process information of the CPU during execution of the program in a computer system equipped with a plurality of CPUs is set for the program. One step,
A second step of performing the acquisition process when the processing of the program comes to the location of the acquisition point;
A third step of obtaining a count value by accessing a counter that outputs a count value that is incremented or decremented each time access is made, when the acquisition process is performed at the acquisition point;
A fourth step of storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired in the third step;
The second step, the third step, and the fourth step are performed for each acquisition point that is sequentially set in the program by the processing of the first step.
The program information collection method characterized by the above-mentioned.
(Appendix 8)
To a computer with multiple CPUs,
A first step of setting, for the program, an acquisition point that triggers the start of an acquisition process for acquiring program information including the register value and process information of the CPU during execution of the program;
A second step of performing the acquisition process when the processing of the program comes to the location of the acquisition point;
A third step of obtaining a count value by accessing a counter that outputs a count value that is incremented or decremented each time access is made, when the acquisition process is performed at the acquisition point;
Storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired in the third step; and
At that time,
Causing the second step, the third step, and the fourth step to be executed for each of the acquisition points sequentially set in the program by the processing of the first step;
A computer program characterized by the above.

本発明に係るコンピュータのハードウェア構成の例を示す図である。It is a figure which shows the example of the hardware constitutions of the computer concerning this invention. メモリ空間に格納されたプロセスを示す図である。It is a figure which shows the process stored in the memory space. コンピュータの機能的構成の例を示す図である。It is a figure which shows the example of a functional structure of a computer. プロセス情報取得の処理を説明するための図である。It is a figure for demonstrating the process of process information acquisition. 履歴情報出力処理部の構成の例を示す図である。It is a figure which shows the example of a structure of a log | history information output process part. レジスタ情報取得の処理を説明するための図である。It is a figure for demonstrating the process of register information acquisition. 第1の方法による履歴情報の収集の処理の流れを説明するためのフローチャートである。It is a flowchart for demonstrating the flow of a process of collection of the historical information by a 1st method. プログラム停止位置の設定の処理を説明するための図である。It is a figure for demonstrating the process of a program stop position setting. 履歴情報の例を示す図である。It is a figure which shows the example of log | history information. 各CPUについて出力された履歴情報を示す図である。It is a figure which shows the log | history information output about each CPU. 第2の方法による履歴情報の収集の処理の流れを説明するためのフローチャートである。It is a flowchart for demonstrating the flow of the process of the collection of the history information by a 2nd method. 第3の方法による履歴情報の収集の処理の流れを説明するためのフローチャートである。It is a flowchart for demonstrating the flow of the process of collection of the historical information by a 3rd method. ブレークの設定および発生の際の処理を説明するための図である。It is a figure for demonstrating the process at the time of the setting and generation | occurrence | production of a break. 第1から第3の方法を併用した場合のプログラム停止位置の設定の処理を説明するための図である。It is a figure for demonstrating the process of a program stop position setting at the time of using together the 1st to 3rd method. 他の例による履歴情報の収集の処理の流れを説明するためのフローチャートである。It is a flowchart for demonstrating the flow of the process of the collection of the history information by another example.

符号の説明Explanation of symbols

1 コンピュータ(コンピュータシステム、コンピュータ)
11 CPU
17 カウンタ部(カウンタ)
101 カウント値取得部(カウント値取得手段)
103 収集対象指定受付部(取得対象受付手段)
104 収集ポイント設定部(取得ポイント設定手段)
105 収集対象関数設定部(取得ポイント設定手段、関数内設定手段)
106 収集対象データ設定部(ブレーク設定手段)
107 プログラム情報収集部(プログラム情報取得手段)
110 履歴情報出力部(プログラム情報保存手段)
D1、D2 データ(取得対象)
K1、K2 関数(プログラム、取得対象)
P1、P2 プログラム(取得対象)
1 Computer (computer system, computer)
11 CPU
17 Counter section (counter)
101 Count value acquisition unit (count value acquisition means)
103 Collection target designation reception unit (acquisition target reception means)
104 Collection point setting section (acquisition point setting means)
105 Collection target function setting section (acquisition point setting means, function setting means)
106 Collection target data setting section (break setting means)
107 Program information collection unit (program information acquisition means)
110 History information output unit (program information storage means)
D1, D2 data (obtained)
K1, K2 function (program, acquisition target)
P1, P2 program (obtained)

Claims (6)

複数のCPUを搭載したコンピュータシステムであって、
プログラムの実行中に前記CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイントを、当該プログラム内において順次設定する取得ポイント設定手段と、
前記プログラムの処理が前記取得ポイントの箇所に来るごとに、前記取得処理を行うプログラム情報取得手段と、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタと、
前記プログラム情報取得手段によって前記取得処理が行われるごとに、前記カウンタにアクセスして前記カウント値を取得するカウント値取得手段と、
前記取得処理で取得された前記プログラム情報を、前記カウント値取得手段によって取得された当該プログラム情報に対応する前記カウント値とともに保存するプログラム情報保存手段と、
を有することを特徴とするコンピュータシステム。
A computer system having a plurality of CPUs,
An acquisition point setting means for sequentially setting an acquisition point that triggers the start of an acquisition process for acquiring program information including the CPU register value and process information during execution of the program;
Program information acquisition means for performing the acquisition processing each time the processing of the program comes to the location of the acquisition point;
A counter that outputs an incremented or decremented count value each time it is accessed;
Each time the acquisition process is performed by the program information acquisition unit, the count value acquisition unit that accesses the counter and acquires the count value;
Program information storage means for storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired by the count value acquisition means;
A computer system comprising:
前記プログラム情報取得手段および前記カウント値取得手段は、それぞれ、前記CPUごとに設けられており、
前記カウンタは、前記CPUごとに設けられた前記各カウント値取得手段から共通にアクセスされるように設けられており、
前記プログラム情報取得手段は、それぞれに対応する前記CPUから前記レジスタ値を取得する、
請求項1記載のコンピュータシステム。
The program information acquisition unit and the count value acquisition unit are provided for each CPU,
The counter is provided so as to be commonly accessed from each count value acquisition means provided for each CPU.
The program information acquisition means acquires the register value from the corresponding CPU.
The computer system according to claim 1.
ユーザから指定される、前記プログラム情報の取得対象を受け付ける取得対象受付手段と、
前記取得対象受付手段が受け付けた前記取得対象が関数であった場合に、当該関数内において前記取得ポイントを順次設定する関数内設定手段と、
を有する請求項1または2記載のコンピュータシステム。
An acquisition target receiving means for receiving an acquisition target of the program information designated by a user;
In-function setting means for sequentially setting the acquisition points in the function when the acquisition target received by the acquisition target receiving means is a function;
The computer system according to claim 1, comprising:
複数のCPUを搭載したコンピュータシステムであって、
プログラムの実行中に所定のデータがアクセスされる際に当該プログラムをブレークさせるための設定を行うブレーク設定手段と、
前記プログラムの実行中にブレークが発生したときに、前記CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理を行うプログラム情報取得手段と、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタと、
前記プログラム情報取得手段によって前記取得処理が行われるごとに、前記カウンタにアクセスして前記カウント値を取得するカウント値取得手段と、
前記取得処理で取得された前記プログラム情報を、前記カウント値取得手段によって取得された当該プログラム情報に対応する前記カウント値とともに保存するプログラム情報保存手段と、
を有することを特徴とするコンピュータシステム。
A computer system having a plurality of CPUs,
Break setting means for making a setting to break the program when predetermined data is accessed during execution of the program;
Program information acquisition means for performing an acquisition process for acquiring program information including a register value of the CPU and process information when a break occurs during execution of the program;
A counter that outputs an incremented or decremented count value each time it is accessed;
Each time the acquisition process is performed by the program information acquisition unit, the count value acquisition unit that accesses the counter and acquires the count value;
Program information storage means for storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired by the count value acquisition means;
A computer system comprising:
複数のCPUを搭載したコンピュータシステムでのプログラムの実行中に当該CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイントを、当該プログラムに対して設定する第1ステップと、
前記プログラムの処理が前記取得ポイントの箇所に来たときに前記取得処理を行う第2ステップと、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタに、前記取得ポイントにおいて前記取得処理が行われたときにアクセスして、前記カウント値を取得する第3ステップと、
前記取得処理で取得された前記プログラム情報を、前記第3ステップで取得された当該プログラム情報に対応する前記カウント値とともに保存する第4ステップとを有し、
前記第1ステップの処理によって前記プログラム内に順次設定される前記各取得ポイントについて、前記第2ステップ、前記第3ステップ、および前記第4ステップの処理を行う、
ことを特徴とするプログラム情報収集方法。
The acquisition point that triggers the start of an acquisition process for acquiring program information including the register value and process information of the CPU during execution of the program in a computer system equipped with a plurality of CPUs is set for the program. One step,
A second step of performing the acquisition process when the processing of the program comes to the location of the acquisition point;
A third step of obtaining a count value by accessing a counter that outputs a count value that is incremented or decremented each time access is made, when the acquisition process is performed at the acquisition point;
A fourth step of storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired in the third step;
The second step, the third step, and the fourth step are performed for each acquisition point that is sequentially set in the program by the processing of the first step.
The program information collection method characterized by the above-mentioned.
複数のCPUを搭載したコンピュータに、
プログラムの実行中に当該CPUのレジスタ値およびプロセス情報を含むプログラム情報を取得する取得処理の開始の契機となる取得ポイントを、当該プログラムに対して設定する第1ステップと、
前記プログラムの処理が前記取得ポイントの箇所に来たときに前記取得処理を行う第2ステップと、
アクセスがあるごとにインクリメントしまたはディクリメントしたカウント値を出力するカウンタに、前記取得ポイントにおいて前記取得処理が行われたときにアクセスして、前記カウント値を取得する第3ステップと、
前記取得処理で取得された前記プログラム情報を、前記第3ステップで取得された当該プログラム情報に対応する前記カウント値とともに保存する第4ステップと、を実行させ、
その際に、
前記第1ステップの処理によって前記プログラム内に順次設定される前記各取得ポイントについて、前記第2ステップ、前記第3ステップ、および前記第4ステップの処理を実行させる、
ことを特徴とするコンピュータプログラム。
To a computer with multiple CPUs,
A first step of setting, for the program, an acquisition point that triggers the start of an acquisition process for acquiring program information including the register value and process information of the CPU during execution of the program;
A second step of performing the acquisition process when the processing of the program comes to the location of the acquisition point;
A third step of obtaining a count value by accessing a counter that outputs a count value that is incremented or decremented each time access is made, when the acquisition process is performed at the acquisition point;
Storing the program information acquired in the acquisition process together with the count value corresponding to the program information acquired in the third step; and
At that time,
Causing the second step, the third step, and the fourth step to be executed for each of the acquisition points sequentially set in the program by the processing of the first step;
A computer program characterized by the above.
JP2006309338A 2006-11-15 2006-11-15 Computer system, program information collection method, and computer program Withdrawn JP2008123438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006309338A JP2008123438A (en) 2006-11-15 2006-11-15 Computer system, program information collection method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006309338A JP2008123438A (en) 2006-11-15 2006-11-15 Computer system, program information collection method, and computer program

Publications (1)

Publication Number Publication Date
JP2008123438A true JP2008123438A (en) 2008-05-29

Family

ID=39508098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006309338A Withdrawn JP2008123438A (en) 2006-11-15 2006-11-15 Computer system, program information collection method, and computer program

Country Status (1)

Country Link
JP (1) JP2008123438A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100108816A (en) * 2009-03-30 2010-10-08 삼성전자주식회사 Dynamic instrumentation method and apparatus of program
JP2014203384A (en) * 2013-04-09 2014-10-27 三菱電機株式会社 Unit test support device, and unit test support program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100108816A (en) * 2009-03-30 2010-10-08 삼성전자주식회사 Dynamic instrumentation method and apparatus of program
JP2010238228A (en) * 2009-03-30 2010-10-21 Samsung Electronics Co Ltd Method and device for dynamically analyzing program
US8769504B2 (en) 2009-03-30 2014-07-01 Samsung Electronics Co., Ltd. Method and apparatus for dynamically instrumenting a program
KR101581001B1 (en) * 2009-03-30 2015-12-30 삼성전자주식회사 Dynamic instrumentation method and apparatus of program
JP2014203384A (en) * 2013-04-09 2014-10-27 三菱電機株式会社 Unit test support device, and unit test support program

Similar Documents

Publication Publication Date Title
US7458078B2 (en) Apparatus and method for autonomic hardware assisted thread stack tracking
US8141053B2 (en) Call stack sampling using a virtual machine
JP5386905B2 (en) Profiling method and profiling program
JP4436036B2 (en) Information processing apparatus, trace processing method, program, and recording medium
US20050066309A1 (en) Validating software in a grid environment using ghost agents
TW201035752A (en) Dynamic performance profiling
US8037363B2 (en) Generation of trace elements within a data processing apparatus
CN101354675B (en) Method for detecting embedded software dynamic memory
US20150006961A1 (en) Capturing trace information using annotated trace output
Schulz Extracting critical path graphs from MPI applications
US20070150870A1 (en) Method and apparatus for context oriented computer program tracing and visualization
JP2015069437A (en) Trace method, processing program, and information processing device
CN109542341B (en) Read-write IO monitoring method, device, terminal and computer readable storage medium
JP4867864B2 (en) Performance data collection / display system, performance data display device, and program thereof
JP4894567B2 (en) Trace information output device and trace information output method
JP2008123438A (en) Computer system, program information collection method, and computer program
CN110134615B (en) Method and device for acquiring log data by application program
JP4120371B2 (en) Operation management system, management computer, monitored computer, operation management method and program
US8261245B2 (en) Method and system for associating profiler data with a reference clock
WO2020073200A1 (en) Program debugging method and system
JP2005338987A (en) Exception test support program and device
JP2009217617A (en) Method and device for identifying memory leak place
US7827543B1 (en) Method and apparatus for profiling data addresses
WO2016120989A1 (en) Management computer and rule test method
JP2009064125A (en) Server device and program thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090807

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20101027