JP2015022667A - Trace information collection device, trace information collection method, and computer program - Google Patents

Trace information collection device, trace information collection method, and computer program Download PDF

Info

Publication number
JP2015022667A
JP2015022667A JP2013152182A JP2013152182A JP2015022667A JP 2015022667 A JP2015022667 A JP 2015022667A JP 2013152182 A JP2013152182 A JP 2013152182A JP 2013152182 A JP2013152182 A JP 2013152182A JP 2015022667 A JP2015022667 A JP 2015022667A
Authority
JP
Japan
Prior art keywords
information
buffer
trace information
trace
buffers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013152182A
Other languages
Japanese (ja)
Inventor
聡史 澤田
Satoshi Sawada
聡史 澤田
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2013152182A priority Critical patent/JP2015022667A/en
Publication of JP2015022667A publication Critical patent/JP2015022667A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To collect information to be used for investigating the factor of stall occurrence in a plurality of programs whose processing operates in association with each other.SOLUTION: A trace information collection device includes: a collection part 10 for collecting the trace information of a plurality of programs; a first information storage part 20 including a plurality of buffers (22 to 24) capable of storing the trace information of a first program and management information 21 for storing information necessary for access to the buffer in which the current trace information is collected among those buffers; and a second information storage part 30 including a plurality of buffers (32 to 34) capable of storing the trace information of a second program and management information 31 for storing information necessary for access to the buffer in which the current trace information is collected among those buffers. When a stall is detected, a management part 40 simultaneously switches the collection destination of the trace information from the buffer in which the current trace information is collected to the buffer different from the buffer.

Description

本発明は、トレース情報収集装置およびトレース情報収集方法、並びにコンピュータ・プログラムに関する。   The present invention relates to a trace information collection device, a trace information collection method, and a computer program.

実行しているプログラムの途中でストールが発生した場合、そのストールが発生する前の詳細なトレース情報があれば、係るストールに至る過程を確認することができ、それにより、係るストールが発生した原因が判明する可能性が大きくなる。ここで、ストールとは、デッドロックやCPU(Central Processing Unit)が割り当てられないなどの、プログラムの処理がまったく進まない停止もしくは異常な遅延状態をいう。   If a stall occurs in the middle of the program being executed, if there is detailed trace information before the stall occurs, the process leading to the stall can be confirmed, and the cause of the stall Is likely to be found. Here, the stall refers to a stop or abnormal delay state in which the program processing does not proceed at all, such as deadlock or a CPU (Central Processing Unit) not being assigned.

この詳細なトレース情報を常時採取すると、採取されるトレース情報は膨大な量になる。そのため、トレース情報をサイクリックに出力することにより、ディスク容量不足を防ぐ事例が多い。サイクリックに出力するとは、トレース情報の格納先である記憶領域のアドレス空間において末尾までトレース情報を格納した後は、その記憶領域の先頭から、既に格納されているトレース情報に上書きによって更新することにより、トレース情報の格納を続けることである。   If this detailed trace information is always collected, the amount of trace information collected is enormous. For this reason, there are many cases in which the shortage of disk capacity is prevented by cyclically outputting trace information. To output cyclically, after storing trace information to the end in the address space of the storage area where the trace information is stored, update the trace information already stored from the beginning of the storage area by overwriting. Thus, the storage of trace information is continued.

スレッド間で連携するマルチスレッドプログラムなど、複数の処理が関連して動作するプログラムでは、他のプログラムの処理遅延やアンロック漏れなどの原因でストールする場合がある。そのため、このようなプログラムでは、ストールした処理のトレース情報だけではなく、関連する他の処理に関する詳細なトレース情報も原因の調査に必要となる。   In a program such as a multi-thread program that cooperates between threads and that operates in association with a plurality of processes, the program may stall due to a processing delay of other programs or an unlock leak. Therefore, in such a program, not only the trace information of the stalled process but also detailed trace information regarding other related processes are required for investigation of the cause.

しかし、トレース情報を参照して調査を行うときには、トレース情報をサイクリックに出力することにより、既に、ストールが発生した時点のトレース情報が残っていない場合がある。   However, when the investigation is performed with reference to the trace information, the trace information at the time when the stall occurs may not be left by cyclically outputting the trace information.

例えば、あるスレッドが停止したことにより、他のスレッドにおいて応答待ちタイムアウトが発生することによって異常と判断されたとしても、停止したスレッドが動作を再開し、その後正常に動作する場合がある。   For example, even if it is determined that there is an abnormality due to a response waiting timeout occurring in another thread due to a certain thread being stopped, the stopped thread may resume its operation and then operate normally.

あるスレッドの排他解除漏れにより、他のスレッドが排他取得待ちで待たされ続けるような場合にも、排他解除漏れしたスレッドは、正常に動作を続けてしまう。   Even if another thread keeps waiting for exclusive acquisition due to omission of exclusion of a certain thread, the thread that has lost omission of exclusion continues to operate normally.

また、あるスレッドが応答を返さなかったことにより、他のスレッドが応答待ちで待たされ続けるような場合にも、応答を返さなかったスレッドは、正常に動作を続けてしまう。   In addition, even when another thread keeps waiting for a response because a certain thread does not return a response, the thread that does not return a response continues to operate normally.

あるいは、あるスレッドが非同期に複数の通知を他のスレッドに対して行い、その一つが不正な通知であることにより、他のスレッドが停止に至るような場合にも、不正な通知をしたスレッドは、正常に動作を続けてしまう。   Or, if a thread performs multiple notifications asynchronously to another thread and one of them is an illegal notification, the thread that made the illegal notification is Will continue to work normally.

これらのような場合に、運用者は、スレッドが停止した時点のトレース情報、排他解除漏れした時点のトレース情報、応答を返し忘れた時点のトレース情報、不正な通知をした時点のトレース情報を確認する必要がある。しかし、応答待ちタイムアウトなどの異常を検知した時点では、トレース情報がサイクリックに出力されることにより、すでに上書きされ、必要なトレース情報が入手できない可能性があるという問題がある。   In such cases, the operator checks the trace information when the thread stops, the trace information when the exclusion release is omitted, the trace information when the response is forgotten to be returned, and the trace information when the incorrect notification is made. There is a need to. However, when an abnormality such as a response waiting timeout is detected, there is a problem that the trace information is cyclically output, so that it is already overwritten and the necessary trace information may not be obtained.

特開2002−007172号公報JP 2002-007172 A 特開2000−181748号公報JP 2000-181748 A 特開2000−057013号公報JP 2000-057013 A 特開平11−184736号公報Japanese Patent Application Laid-Open No. 11-184736 特開第5093175号公報JP 5093175 A 特開第4114879号公報Japanese Patent No. 4114879 特開平08−044595号公報Japanese Patent Laid-Open No. 08-044595

ここで、本願出願に先だって存在する関連技術としては、例えば以下の特許文献がある。   Here, as related technologies existing prior to the present application, there are, for example, the following patent documents.

特許文献1に提案されている技術を用いることにより、ストールが発生したことをタイムスタンプの更新状態によって判定することができる。   By using the technique proposed in Patent Document 1, it is possible to determine that a stall has occurred based on the update state of the time stamp.

特許文献2に提案されている技術を用いることにより、マルチメモリ空間で動作するプログラムの各空間のトレース情報を採取することができる。   By using the technique proposed in Patent Document 2, it is possible to collect trace information of each space of a program operating in a multi-memory space.

特許文献3に提案されている技術を用いることにより、トレース情報を格納するバッファを複数持ち、トレース情報の格納先のバッファがいっぱいになったら、次のバッファに切り替えて、複数のバッファを繰り返し使用することができる。   By using the technique proposed in Patent Document 3, there are multiple buffers for storing trace information, and when the buffer for storing trace information is full, switch to the next buffer and use multiple buffers repeatedly. can do.

特許文献4に提案されている技術を用いることにより、ストール検出時に、データを収集することができる。   By using the technique proposed in Patent Document 4, data can be collected when a stall is detected.

特許文献5に提案されている技術を用いることにより、トレース情報採取対象のイベント発生時に、トレース情報を採取することができる。   By using the technique proposed in Patent Document 5, it is possible to collect trace information when an event for which trace information is to be collected occurs.

特許文献6に提案されている技術を用いることにより、トレース採取対象プログラムの稼動停止時間比率を比較することにより、通常と異なる動作で動いていると判断した場合に、トレース情報の採取を行うことができる。   By using the technique proposed in Patent Document 6, by comparing the operation stop time ratios of the trace collection target programs, it is possible to collect trace information when it is determined that the program is operating in a different operation. Can do.

特許文献7に提案されている技術を用いることにより、トレース採取対象プログラムが動くプロセスでは、トレース情報をバッファに格納し、別プロセスでバッファからファイルに入力することにより、トレース採取対象プログラムに対して、トレース採取のためにかかる負荷を少なくすることができる。   By using the technique proposed in Patent Document 7, in a process in which a trace collection target program runs, trace information is stored in a buffer and input to the file from the buffer in a separate process. The load required for collecting traces can be reduced.

しかし、特許文献1乃至7に提案されている技術を用いても、複数の処理が関連して動作するプログラムにおけるトレース収集に関しては考慮されておらず、上述した課題を解決するには至っていない。   However, even when the techniques proposed in Patent Documents 1 to 7 are used, the collection of traces in a program in which a plurality of processes operate in relation is not considered, and the above-described problems have not been solved.

本発明は、スレッド間で連携するマルチスレッドプログラムなど、複数の処理が関連して動作するプログラムにおいて、ストール発生の原因調査に用いる情報を採取することが可能なトレース情報収集装置等を提供することを主たる目的とする。   The present invention provides a trace information collection device and the like that can collect information used for investigating the cause of a stall occurrence in a program that operates in association with a plurality of processes, such as a multi-thread program that cooperates between threads. Is the main purpose.

上記の目的を達成すべく、本発明に係るトレース情報収集装置は、以下の構成を備えることを特徴とする。   In order to achieve the above object, a trace information collecting apparatus according to the present invention has the following configuration.

即ち、本発明に係るトレース情報収集装置は、
複数のプログラムが並行、又は疑似並行に関連して動作する環境において、それらのプログラムのトレース情報を収集する収集手段と、
前記複数のプログラムのうち、第1のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第1の情報格納部と、
前記複数のプログラムのうち、第2のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第2の情報格納部と、
あらかじめ定めたストール判定条件を判定することによりストールを検出した場合に、前記第1及び第2の情報格納部に対して、前記複数のバッファのうち、前記現在トレース情報を収集しているバッファから、そのバッファとは異なるバッファに、前記トレース情報の収集先を一斉に切り替えて、前記トレース情報を保存するように制御する管理手段とを
備える
ことを特徴とする。
That is, the trace information collecting apparatus according to the present invention is
A collecting means for collecting trace information of the programs in an environment in which a plurality of programs operate in parallel or pseudo-concurrency;
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the first program, and management information for storing information necessary for accessing the buffer that is currently collecting the trace information among the buffers, A first information storage unit including:
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the second program, and management information for storing information necessary for accessing a buffer that is currently collecting the trace information among the buffers, A second information storage unit including:
When a stall is detected by determining a predetermined stall determination condition, from the buffer that is currently collecting the trace information among the plurality of buffers with respect to the first and second information storage units And a management unit for controlling the collection of the trace information to be simultaneously switched to a buffer different from the buffer and storing the trace information.

同目的を達成する本発明に係るトレース情報収集方法は、
複数のプログラムが並行、又は疑似並行に関連して動作する環境において、情報処理装置によって、
前記複数のプログラムのうち、第1のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第1の情報格納部に対し、第1のプログラムのトレース情報を、前記管理情報を元に、前記バッファに収集し、
前記複数のプログラムのうち、第2のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第2の情報格納部に対し、第2のプログラムのトレース情報を、前記管理情報を元に、前記バッファに収集し、
あらかじめ定めたストール判定条件を判定することによりストールを検出した場合に、前記第1及び第2の情報格納部に対して、前記複数のバッファのうち、前記現在トレース情報を収集しているバッファから、そのバッファとは異なるバッファに、前記トレース情報の収集先を一斉に切り替えて、前記トレース情報を保存するように制御する
ことを特徴とする。
The trace information collection method according to the present invention that achieves the same object,
In an environment where a plurality of programs operate in parallel or pseudo-parallel, the information processing apparatus
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the first program, and management information for storing information necessary for accessing the buffer that is currently collecting the trace information among the buffers, Collecting trace information of the first program in the buffer based on the management information for the first information storage unit including
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the second program, and management information for storing information necessary for accessing a buffer that is currently collecting the trace information among the buffers, Collecting trace information of the second program in the buffer based on the management information for the second information storage unit including
When a stall is detected by determining a predetermined stall determination condition, from the buffer that is currently collecting the trace information among the plurality of buffers with respect to the first and second information storage units The collection of the trace information is simultaneously switched to a buffer different from the buffer, and control is performed to save the trace information.

更に、同目的は、上記構成を有するトレース情報収集方法、並びにトレース情報収集装置を、コンピュータによって実現するコンピュータ・プログラム、及びそのコンピュータ・プログラムが格納されている、コンピュータ読み取り可能な記憶媒体によっても達成される。   Further, the object is achieved by a computer program for realizing the trace information collecting method and the trace information collecting apparatus having the above-described configuration by a computer, and a computer-readable storage medium storing the computer program. Is done.

上記の本発明によれば、スレッド間で連携するマルチスレッドプログラムなど、複数の処理が関連して動作するプログラムにおいて、ストール発生の原因調査に用いる情報を採取することができる。   According to the present invention described above, it is possible to collect information used for investigating the cause of the occurrence of a stall in a program that operates in association with a plurality of processes, such as a multi-thread program that cooperates between threads.

本発明の第1の実施形態に係るトレース情報収集装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace information collection apparatus which concerns on the 1st Embodiment of this invention. 本発明の第2の実施形態に係るトレース情報収集装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace information collection apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る管理情報を説明する図である。It is a figure explaining the management information which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るバッファ情報を説明する図である。It is a figure explaining the buffer information which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るトレース情報収集部におけるトレース情報を共有メモリに格納する処理を示すフローチャートである。It is a flowchart which shows the process which stores the trace information in the shared memory in the trace information collection part which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るバッファ管理部におけるストール監視処理を示すフローチャートである。It is a flowchart which shows the stall monitoring process in the buffer management part which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るバッファ管理部における状態初期化処理を示すフローチャートである。It is a flowchart which shows the state initialization process in the buffer management part which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るバッファ管理部におけるファイル書き込みに関する処理を示すフローチャートである。It is a flowchart which shows the process regarding the file writing in the buffer management part which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るファイル出力部におけるファイル書き込み処理を示すフローチャートである。It is a flowchart which shows the file writing process in the file output part which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係るトレース情報収集装置を変形した構成を示すブロック図である。It is a block diagram which shows the structure which deform | transformed the trace information collection apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第3の実施形態に係るトレース情報収集装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace information collection apparatus which concerns on the 3rd Embodiment of this invention. 本発明の第4の実施形態に係るトレース情報収集装置の構成を示すブロック図である。It is a block diagram which shows the structure of the trace information collection apparatus which concerns on the 4th Embodiment of this invention. 本発明の第1乃至第4の実施形態を実現可能なコンピュータ(情報処理装置)のハードウェア構成を例示的に説明する図である。It is a figure which illustrates illustartively the hardware constitutions of the computer (information processing apparatus) which can implement | achieve the 1st thru | or 4th embodiment of this invention.

次に、本発明を実施する形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

<第1の実施形態>
図1は、本発明の第1の実施形態に係るトレース情報収集装置の構成を示すブロック図である。
<First Embodiment>
FIG. 1 is a block diagram showing a configuration of a trace information collecting apparatus according to the first embodiment of the present invention.

トレース情報収集装置は、収集部10と、情報格納部20と、情報格納部30と、管理部40とを含む。   The trace information collection device includes a collection unit 10, an information storage unit 20, an information storage unit 30, and a management unit 40.

収集部10は、処理60からトレース情報を収集し、収集したトレース情報を情報格納部20に格納する。また、収集部10は、処理70からトレース情報を収集し、収集したトレース情報を情報格納部30に格納する。   The collection unit 10 collects trace information from the process 60 and stores the collected trace information in the information storage unit 20. Further, the collection unit 10 collects trace information from the processing 70 and stores the collected trace information in the information storage unit 30.

情報格納部20は、管理情報21と、バッファ22と、バッファ23と、バッファ24とを有する。   The information storage unit 20 includes management information 21, a buffer 22, a buffer 23, and a buffer 24.

管理情報21は、それらの3つのバッファのうちで、現在のトレース情報の格納先であるバッファを表す情報である(詳細は、第2の実施形態において、図3を参照して後述する)。   The management information 21 is information representing a buffer that is the storage destination of the current trace information among these three buffers (details will be described later with reference to FIG. 3 in the second embodiment).

情報格納部30は、図1に示すように情報格納部20と同じ構成で、管理情報31と、バッファ32と、バッファ33と、バッファ34とを有する。   As shown in FIG. 1, the information storage unit 30 has the same configuration as the information storage unit 20, and includes management information 31, a buffer 32, a buffer 33, and a buffer 34.

管理部40は、ストール発生を検知して、トレース情報を確保するために、トレース情報の格納先となるバッファを一斉に切り替える。すなわち、管理部40は、情報格納部20と情報格納部30の管理情報21および31を次にトレース情報を格納するバッファの情報に変更する。   The management unit 40 detects the occurrence of a stall and switches the buffers that are the storage destinations of the trace information all at once in order to secure the trace information. That is, the management unit 40 changes the management information 21 and 31 in the information storage unit 20 and the information storage unit 30 to information on a buffer that stores trace information next.

本実施形態によれば、複数の処理が関連して動作するプログラムにおいて、ストール発生の原因調査に用いる情報を採取することができるという効果がある。   According to the present embodiment, there is an effect that information used for investigating the cause of the occurrence of a stall can be collected in a program that operates in association with a plurality of processes.

その理由は、各処理が別々の共有メモリにトレース情報を格納し、トレース情報の格納先として各共有メモリに複数のバッファを用意するためである。これにより、ある処理にストールの可能性を検知した場合に、一斉にトレース情報を格納するバッファを変更して保存することにより、その時点までの他の処理のトレース情報も残すことができる。   The reason is that each process stores the trace information in a separate shared memory and prepares a plurality of buffers in each shared memory as a storage destination of the trace information. As a result, when the possibility of stall in a certain process is detected, the trace information of other processes up to that point can be left by changing and saving the buffer for storing the trace information all at once.

<第2の実施形態>
図2は、本発明の第2の実施形態に係るトレース情報収集装置の構成を示すブロック図である。
<Second Embodiment>
FIG. 2 is a block diagram showing the configuration of the trace information collecting apparatus according to the second embodiment of the present invention.

本実施形態に係るトレース情報収集装置は、プロセス100と、トレース情報収集部200と、共有メモリ301および302と、属性361および362と、バッファ管理部400と、ファイル出力部500と、ファイル600とを有する。   The trace information collection apparatus according to this embodiment includes a process 100, a trace information collection unit 200, shared memories 301 and 302, attributes 361 and 362, a buffer management unit 400, a file output unit 500, and a file 600. Have

プロセス100は、スレッド101と、スレッド102とを含む。   The process 100 includes a thread 101 and a thread 102.

スレッド101で動作するアプリケーションプログラム(図示せず)は、トレース情報収集部200により、共有メモリ301へトレース情報を格納する。   An application program (not shown) operating in the thread 101 stores trace information in the shared memory 301 by the trace information collection unit 200.

同様に、スレッド102で動作するアプリケーションプログラム(図示せず)は、トレース情報収集部200により、共有メモリ302へトレース情報を格納する。   Similarly, an application program (not shown) that operates in the thread 102 stores trace information in the shared memory 302 by the trace information collection unit 200.

共有メモリ301は、管理情報311と、トレース情報の格納先である3つのバッファ(バッファA321、バッファB331およびバッファC341)とを含む。   The shared memory 301 includes management information 311 and three buffers (buffer A321, buffer B331, and buffer C341) that are storage destinations of trace information.

バッファ管理部400は、バッファ情報401を含む。   The buffer management unit 400 includes buffer information 401.

図3は、本発明の第2の実施形態に係る管理情報311を説明する図である。   FIG. 3 is a diagram for explaining the management information 311 according to the second embodiment of the present invention.

管理情報311は、トレース情報収集部200がトレース情報を格納する際に、トレース情報の格納先を示す情報を得るために参照する情報である。すなわち、図3に示すように、管理情報311は、トレース情報を格納する位置である格納位置811と、現在トレース情報の格納先となっているバッファの開始位置であるバッファ開始位置812と、該バッファの終了位置であるバッファ終了位置813のそれぞれについて、各々のアドレスを表す情報であるアドレス814を含む。   The management information 311 is information that is referred to in order to obtain information indicating the storage location of the trace information when the trace information collection unit 200 stores the trace information. That is, as shown in FIG. 3, the management information 311 includes a storage position 811 that is a position for storing trace information, a buffer start position 812 that is a start position of a buffer that is currently storing trace information, For each buffer end position 813 that is the buffer end position, an address 814 that is information representing each address is included.

また、管理情報311は、3つのバッファ(バッファA321、バッファB331およびバッファC341)各々の開始位置と終了位置のアドレスを表す情報であるバッファ情報815も含む。   The management information 311 also includes buffer information 815 that is information indicating the addresses of the start position and end position of each of the three buffers (buffer A321, buffer B331, and buffer C341).

バッファ情報815は、トレース情報の格納先のバッファの切り替えのため、格納位置811と、バッファ開始位置812およびバッファ終了位置813を更新する場合に、参照される情報である。   The buffer information 815 is information that is referred to when the storage position 811, the buffer start position 812, and the buffer end position 813 are updated in order to switch the buffer where the trace information is stored.

トレース情報収集部200は、バッファA321と、バッファB331と、バッファC341の3つのバッファのうちで、管理情報311が表すバッファに、トレース情報を格納する。トレース情報収集部200は、トレース情報の格納先として、バッファA321の次はバッファB331を使用し、バッファB331の次はバッファC341を使用する。さらに、トレース情報収集部200は、バッファC341の次はバッファA321を使用する。   The trace information collection unit 200 stores the trace information in the buffer represented by the management information 311 among the three buffers of the buffer A321, the buffer B331, and the buffer C341. The trace information collection unit 200 uses the buffer B331 after the buffer A321 and the buffer C341 after the buffer B331 as a storage destination of the trace information. Further, the trace information collection unit 200 uses the buffer A321 after the buffer C341.

属性361は、例えば、オペレーティングシステムにより提供される共有メモリ301の属性を表す情報である。属性361は、例えば、共有メモリ301の作成時刻や作成者、および、共有メモリ301の直近の更新時刻を含む。共有メモリ301に書き込みを行うと、オペレーティングシステムは、属性361に含まれる更新時刻に、書き込みを行った時刻を設定する。   The attribute 361 is information representing the attribute of the shared memory 301 provided by the operating system, for example. The attribute 361 includes, for example, the creation time and creator of the shared memory 301 and the latest update time of the shared memory 301. When writing to the shared memory 301, the operating system sets the time of writing to the update time included in the attribute 361.

共有メモリ302は、共有メモリ301と同様の構成である。共有メモリ302の管理情報312、バッファA322、バッファB332、バッファC342および属性362は、共有メモリ301の管理情報311、バッファA321、バッファB331、バッファC341、属性361にそれぞれ相当する。   The shared memory 302 has the same configuration as the shared memory 301. Management information 312, buffer A 322, buffer B 332, buffer C 342, and attribute 362 of the shared memory 302 correspond to management information 311, buffer A 321, buffer B 331, buffer C 341, and attribute 361 of the shared memory 301, respectively.

ファイル出力部500は、バッファ管理部400からの指示により、指定されたバッファに格納されたトレース情報をファイル600へ書き込む。   The file output unit 500 writes the trace information stored in the designated buffer to the file 600 according to an instruction from the buffer management unit 400.

バッファ管理部400は、共有メモリ301と、共有メモリ302内のすべてのバッファを管理する。   The buffer management unit 400 manages the shared memory 301 and all the buffers in the shared memory 302.

バッファ管理部400は、共有メモリ301または302の前回の更新からの時間が、あらかじめ定めておいた一定時間を超えていないかを監視する。一定時間を超えて更新されていないことを検出した場合、バッファ管理部400は、トレース情報収集部200がトレース情報を格納するバッファを、現在格納しているバッファから次のバッファへ変更することを示すように、管理情報311および312を更新する。   The buffer management unit 400 monitors whether the time since the last update of the shared memory 301 or 302 has exceeded a predetermined time. When the buffer management unit 400 detects that the update has not been performed for a certain time, the buffer management unit 400 changes the buffer in which the trace information collection unit 200 stores the trace information from the currently stored buffer to the next buffer. As shown, the management information 311 and 312 are updated.

バッファ管理部400は、バッファ情報401を有する。   The buffer management unit 400 has buffer information 401.

図4は、本発明の第2の実施形態に係るバッファ情報401を説明する図である。   FIG. 4 is a diagram for explaining buffer information 401 according to the second embodiment of the present invention.

バッファ管理部400は、バッファA321および322、バッファB331および332、バッファC341および342を管理するため、バッファ情報401を有する。   The buffer management unit 400 has buffer information 401 for managing the buffers A 321 and 322, the buffer B 331 and 332, and the buffers C 341 and 342.

バッファ情報401は、バッファ識別名821と、ステータス822と、最終時刻823とを含む。すなわち、バッファ識別名821と、ステータス822と、最終時刻823とは、バッファ情報401において、図4に概念的に示すテーブルの如く関連付けされていることとする。   The buffer information 401 includes a buffer identification name 821, a status 822, and a final time 823. In other words, the buffer identification name 821, the status 822, and the final time 823 are associated in the buffer information 401 as shown in the table conceptually shown in FIG.

バッファ識別名821は、バッファを識別するための情報である。   The buffer identification name 821 is information for identifying a buffer.

ステータス822は、例えば、「格納中」、「空き」、「書き込み中」、「一時保存」の4つの状態を表す情報である。バッファ管理部400が、ステータス822の設定および変更を行う。   The status 822 is information representing four states, for example, “stored”, “free”, “writing”, and “temporarily saved”. The buffer management unit 400 sets and changes the status 822.

ステータス822が「格納中」とは、該バッファにトレース情報収集部200がトレース情報を格納する状態であることを示す。   The status 822 “stored” indicates that the trace information collection unit 200 is storing trace information in the buffer.

ステータス822が「空き」とは、該バッファを使用していない状態であることを示す。   The status 822 “free” indicates that the buffer is not used.

ステータス822が「書き込み中」とは、該バッファ内のトレース情報を、ファイル出力部500がファイル600へ書き込み中であることを示す。   The status “822” indicates that the file output unit 500 is writing the trace information in the buffer to the file 600.

ステータス822が「一時保存」とは、トレース情報収集部200がトレース情報を格納中ではないが、上書き等を行わずに、そのままトレース情報を保持している状態であることを示す。   The status 822 “temporarily saved” indicates that the trace information collection unit 200 is not storing the trace information but is holding the trace information as it is without being overwritten.

最終時刻823は、トレース情報を格納するバッファを変更した時刻を表す情報である。   The last time 823 is information indicating the time when the buffer for storing the trace information is changed.

バッファ管理部400が、トレース情報を格納するバッファを変更して、該バッファが「格納中」の状態でなくなったときに、その時刻を、最終時刻823に設定する。   When the buffer management unit 400 changes the buffer for storing the trace information and the buffer is no longer in the “storage” state, the time is set to the final time 823.

例えば、トレース情報収集部200が、バッファA321および322にトレース情報を格納している場合、バッファAのステータス822は、「格納中」となっている。バッファ管理部400が、トレース情報収集部200のトレース格納先をバッファA(321および322)からバッファB(331および332)へ変更する際には、バッファAのステータス822を「一時保存」にし、バッファBのステータス822を「格納中」にする。   For example, when the trace information collection unit 200 stores the trace information in the buffers A321 and 322, the status 822 of the buffer A is “in storage”. When the buffer management unit 400 changes the trace storage destination of the trace information collection unit 200 from the buffer A (321 and 322) to the buffer B (331 and 332), the status 822 of the buffer A is set to “temporary storage”. The status 822 of the buffer B is set to “stored”.

また、バッファ管理部400は、格納するバッファの変更を行った時刻をバッファBの最終時刻823に設定する。   Further, the buffer management unit 400 sets the time when the buffer to be stored is changed to the last time 823 of the buffer B.

さらに、バッファ管理部400は、管理情報311の格納位置811と、バッファ開始位置812とに対応するアドレス814欄にバッファB331の開始アドレスを、バッファ終了位置813に対応するアドレス814欄にバッファB331の終了アドレスを設定する。   Further, the buffer management unit 400 stores the start address of the buffer B331 in the address 814 column corresponding to the storage location 811 and the buffer start location 812 of the management information 311 and the buffer B331 in the address 814 column corresponding to the buffer end location 813. Set the end address.

また、バッファ管理部400は、管理情報312に対しても同様の設定を行う。すなわち、バッファ管理部400は、管理情報312の格納位置811と、バッファ開始位置812とに対応するアドレス814欄にバッファB332の開始アドレスを、バッファ終了位置813に対応するアドレス814欄にバッファB332の終了アドレスを設定する。   In addition, the buffer management unit 400 performs similar settings for the management information 312. That is, the buffer management unit 400 stores the start address of the buffer B 332 in the address 814 column corresponding to the storage position 811 and the buffer start position 812 of the management information 312, and the buffer B 332 in the address 814 column corresponding to the buffer end position 813. Set the end address.

これらの処理により、トレース情報収集部200は、バッファB331および332にトレース情報を格納するようになる。   With these processes, the trace information collection unit 200 stores the trace information in the buffers B331 and 332.

次に、図5乃至図9のフローチャートを参照して本発明の第2の実施形態の動作について詳細に説明する。   Next, the operation of the second exemplary embodiment of the present invention will be described in detail with reference to the flowcharts of FIGS.

図5は、本発明の第2の実施形態に係るトレース情報収集部200におけるトレース情報を共有メモリ301に格納する処理を示すフローチャートである。   FIG. 5 is a flowchart showing a process of storing the trace information in the shared memory 301 in the trace information collection unit 200 according to the second embodiment of the present invention.

初めに、トレース情報収集部200は、スレッド101からトレース情報の格納要求を受けて、管理情報311を参照する(ステップS11)。   First, the trace information collection unit 200 receives a trace information storage request from the thread 101 and refers to the management information 311 (step S11).

トレース情報収集部200は、格納要求を受けたトレース情報のサイズを、格納位置811のアドレスに加算する。加算により求められた位置が、バッファ終了位置813のアドレスを越えるか否かを、トレース情報収集部200は、チェックする(ステップS12)。   The trace information collection unit 200 adds the size of the trace information that has received the storage request to the address of the storage location 811. The trace information collection unit 200 checks whether or not the position obtained by the addition exceeds the address of the buffer end position 813 (step S12).

バッファ終了位置813のアドレスを超える(ステップS12にて「Yes」)場合には、トレース情報収集部200は、現在格納中のバッファの先頭に、トレース情報を格納する。すなわち、トレース情報収集部200は、バッファ開始位置812のアドレスにトレース情報を格納する(ステップS13)。トレース情報収集部200は、格納位置811のアドレスを、格納したトレース情報のサイズをバッファ開始位置812のアドレスに加算した値に変更する(ステップS14)。   When the address of the buffer end position 813 is exceeded (“Yes” in step S12), the trace information collection unit 200 stores the trace information at the head of the buffer currently being stored. That is, the trace information collection unit 200 stores the trace information at the address of the buffer start position 812 (step S13). The trace information collection unit 200 changes the address of the storage location 811 to a value obtained by adding the size of the stored trace information to the address of the buffer start location 812 (step S14).

バッファ終了位置813のアドレスを超えない(ステップS12にて「No」)場合には、トレース情報収集部200は、格納位置811のアドレスにトレース情報を格納する(ステップS15)。トレース情報収集部200は、格納位置811のアドレスを、格納したトレース情報のサイズ加算した値に変更する(ステップS16)。   When the address of the buffer end position 813 is not exceeded (“No” in step S12), the trace information collection unit 200 stores the trace information at the address of the storage position 811 (step S15). The trace information collection unit 200 changes the address of the storage location 811 to a value obtained by adding the size of the stored trace information (step S16).

図6は、本発明の第2の実施形態に係るバッファ管理部400におけるストール監視処理を示すフローチャートである。   FIG. 6 is a flowchart showing a stall monitoring process in the buffer management unit 400 according to the second embodiment of the present invention.

ストール監視処理は、例えば、定期的に実行される。   The stall monitoring process is executed periodically, for example.

バッファ管理部400は、属性361および362内の、共有メモリ301および302の更新時刻を取得する(ステップS21)。バッファ管理部400は、例えば、オペレーティングシステムにより提供される関数等を用いて、属性361および362を得ることができる。   The buffer management unit 400 acquires the update times of the shared memories 301 and 302 in the attributes 361 and 362 (step S21). The buffer management unit 400 can obtain the attributes 361 and 362 using, for example, a function provided by the operating system.

更新時刻を参照して、一定時間更新されていない共有メモリがあった(ステップS22にて「Yes」)場合に、バッファ管理部400は、共有メモリの更新時刻が、前にトレース情報を格納していたバッファの最終時刻823よりも後の時刻であるかを判定する(ステップS23)。なお、ここでの一定時間は、あらかじめ決めておく時間であり、特に時間の値の限定はないが、例えば、その一定時間内のトレース情報格納でバッファがいっぱいにならない程度の時間を設定する。   If there is a shared memory that has not been updated for a certain time with reference to the update time (“Yes” in step S22), the buffer management unit 400 stores the trace information before the update time of the shared memory. It is determined whether the time is later than the last time 823 of the buffer that has been stored (step S23). Here, the fixed time is a time determined in advance, and there is no particular limitation on the value of the time. For example, a time is set so that the buffer is not filled with the trace information storage within the fixed time.

共有メモリの更新時刻のほうが後の時刻である(ステップS23にて「Yes」)場合には、バッファ管理部400は、新たにストール発生の可能性を検知したと判断する。   If the update time of the shared memory is later (“Yes” in step S23), the buffer management unit 400 determines that the possibility of a new stall has been detected.

反対に、ステップS23にて「No」の場合には、バッファ管理部400は、新たにストールの可能性を検知したのではなく、既にストールの可能性を検知した状態が継続していると判断する。   On the other hand, if “No” in step S23, the buffer management unit 400 does not detect the possibility of a new stall, but determines that the state where the possibility of a stall has already been detected continues. To do.

新たにストールの可能性を検知した場合、バッファ管理部400は、次にトレース情報を格納するバッファのステータス822が「空き」であるか否かをチェックする(ステップS24)。   When the possibility of a stall is newly detected, the buffer management unit 400 checks whether or not the status 822 of the buffer that stores the trace information is “empty” (step S24).

次のバッファが「空き」であれば、バッファ管理部400は、現在「格納中」のバッファに対応する最終時刻823に現在時刻を設定し、ステータス822を「一時保存」に変更する。バッファ管理部400は、次のバッファに対応するステータス822を「格納中」に変更する(ステップS25)。さらに、管理情報311および312において、それぞれ、格納位置811、バッファ開始位置812、バッファ終了位置813に対応するアドレス814を、次のバッファを示す値で更新する(ステップS26)。   If the next buffer is “free”, the buffer management unit 400 sets the current time at the last time 823 corresponding to the buffer currently being “stored”, and changes the status 822 to “temporarily saved”. The buffer management unit 400 changes the status 822 corresponding to the next buffer to “stored” (step S25). Further, in the management information 311 and 312, the addresses 814 corresponding to the storage position 811, the buffer start position 812, and the buffer end position 813 are updated with values indicating the next buffer, respectively (step S 26).

図7は、本発明の第2の実施形態に係るバッファ管理部400における状態初期化処理を示すフローチャートである。   FIG. 7 is a flowchart showing a state initialization process in the buffer management unit 400 according to the second embodiment of the present invention.

バッファ管理部400は、ステータス822が「一時保存」のバッファの最終時刻823と現在時刻を比較する(ステップS31)。   The buffer management unit 400 compares the current time with the final time 823 of the buffer whose status 822 is “temporary storage” (step S31).

比較した結果、一定時間を経過している(ステップS32にて「Yes」)場合は、バッファのステータス822を「空き」に変更する(ステップS33)。なお、ここでの一定時間は、例えば、タイムアウトなどの異常が発生してからトレース情報取得作業(ファイル出力部500によるファイルへの書き込み処理)を行うことを想定し、「一時保存」にしてからトレース情報取得作業を行うまでにかかる時間より長い。   As a result of the comparison, if the predetermined time has passed (“Yes” in step S32), the buffer status 822 is changed to “free” (step S33). Note that the fixed time here is, for example, assumed that the trace information acquisition work (write processing to the file by the file output unit 500) is performed after an abnormality such as a timeout occurs, and is set to “temporary storage”. It takes longer than the time required to acquire the trace information.

図8は、本発明の第2の実施形態に係るバッファ管理部400におけるファイル書き込みに関する処理を示すフローチャートである。   FIG. 8 is a flowchart showing processing related to file writing in the buffer management unit 400 according to the second embodiment of the present invention.

バッファ管理部400は、ファイル出力部500から通知がきているかを確認する(ステップS41)。   The buffer management unit 400 checks whether a notification is received from the file output unit 500 (step S41).

ファイル出力部500からの通知があった(ステップS42にて「Yes」)場合は、バッファ管理部400は、ステータス822が「一時保存」のバッファがあるか確認する(ステップS43)。   If there is a notification from the file output unit 500 (“Yes” in step S42), the buffer management unit 400 checks whether there is a buffer whose status 822 is “temporarily saved” (step S43).

「一時保存」のバッファがある(ステップS43にて「Yes」)場合に、バッファ管理部400は、「一時保存」のバッファについて、そのバッファの内容をファイルに書き込むことをファイル出力部500に指示する(ステップS44)。   When there is a “temporary save” buffer (“Yes” in step S43), the buffer management unit 400 instructs the file output unit 500 to write the contents of the buffer to the file for the “temporary save” buffer. (Step S44).

「一時保存」のバッファがない(ステップS43にて「No」)場合に、バッファ管理部400は、「一時保存」のバッファがないことをファイル出力部500に通知する(ステップS48)。   If there is no “temporary save” buffer (“No” in step S43), the buffer management unit 400 notifies the file output unit 500 that there is no “temporary save” buffer (step S48).

次に、バッファ管理部400は、ファイル出力部500へファイル書き込みを指示したバッファのステータス822を、「一時保存」から「書き込み中」に変更する(ステップS45)。   Next, the buffer management unit 400 changes the status 822 of the buffer instructed to write the file to the file output unit 500 from “temporary storage” to “writing” (step S45).

バッファ管理部400は、ファイル出力部500からファイル書き込み完了の通知を待つ(ステップS46)。   The buffer management unit 400 waits for a file write completion notification from the file output unit 500 (step S46).

バッファ管理部400は、その通知を受けたら、該バッファのステータス822を「空き」に変更する(ステップS47)。   Upon receiving the notification, the buffer management unit 400 changes the status 822 of the buffer to “free” (step S47).

図9は、本発明の第2の実施形態に係るファイル出力部500におけるファイル書き込み処理を示すフローチャートである。   FIG. 9 is a flowchart showing a file writing process in the file output unit 500 according to the second embodiment of the present invention.

初めに、ファイル出力部500は、バッファ管理部400へファイルに書き込む旨を通知する(ステップS51)。   First, the file output unit 500 notifies the buffer management unit 400 that it will write to a file (step S51).

ファイル出力部500は、バッファ管理部400からの応答を待つ(ステップS52)。   The file output unit 500 waits for a response from the buffer management unit 400 (step S52).

バッファ管理部400からきた応答が、「一時保存」のバッファがないことを示す場合には、ファイル出力部500は、処理を終了する(ステップS53にて「No」)。   If the response from the buffer management unit 400 indicates that there is no “temporary storage” buffer, the file output unit 500 ends the process (“No” in step S53).

バッファ管理部400からステータス822が「一時保存」のバッファについて通知を受けた(ステップS53にて「Yes」)場合、ファイル出力部500は、指示されたバッファ内に格納されたトレース情報をファイル600へ書き込む(ステップS54)。たとえば、バッファ管理部400から「一時保存」のバッファとして、「バッファB」と通知された場合に、ファイル出力部500は、各々の共有メモリ内のバッファB(331および332)内のトレース情報をファイル600に書き込む。   When the buffer management unit 400 receives a notification of a buffer whose status 822 is “temporarily stored” (“Yes” in step S53), the file output unit 500 stores the trace information stored in the designated buffer in the file 600. (Step S54). For example, when “buffer B” is notified from the buffer management unit 400 as a “temporary storage” buffer, the file output unit 500 stores the trace information in the buffer B (331 and 332) in each shared memory. Write to file 600.

書き込み完了後、ファイル出力部500は、バッファ管理部400へファイル書き込み完了を通知する(ステップS55)。   After completing the writing, the file output unit 500 notifies the buffer management unit 400 of the completion of the file writing (step S55).

本実施形態では、1つの共有メモリ内のバッファを3個として説明したが、バッファの個数はこれに限定されず、3個以上でもよい。   In the present embodiment, three buffers in one shared memory have been described. However, the number of buffers is not limited to this, and may be three or more.

図10は、本発明の第2の実施形態に係るトレース情報収集装置を変形した構成を示すブロック図である。   FIG. 10 is a block diagram showing a modified configuration of the trace information collecting apparatus according to the second embodiment of the present invention.

図10において、共有メモリ301は、バッファA321と、バッファB331と、バッファC341と、バッファD351との4つのバッファを含む。同様に、共有メモリ302は、バッファA322と、バッファB332と、バッファC342と、バッファD352との4つのバッファを含む。   In FIG. 10, the shared memory 301 includes four buffers: a buffer A321, a buffer B331, a buffer C341, and a buffer D351. Similarly, the shared memory 302 includes four buffers: a buffer A 322, a buffer B 332, a buffer C 342, and a buffer D 352.

図10に示す如く、4つのバッファが対象の場合も処理の流れについては、変更がないため、説明は省略する。   As shown in FIG. 10, even when four buffers are targeted, the processing flow is not changed and the description thereof is omitted.

また、便宜上、共有メモリ301と302に含まれるバッファを同数として説明しているが、一方で他方が特定できれば、バッファの数は、同数に限定されない。   For convenience, the number of buffers included in the shared memories 301 and 302 is described as the same number, but the number of buffers is not limited to the same number as long as the other can be specified.

以上、説明したように、第2の実施形態には、スレッド間で連携するマルチスレッドプログラムにおいて、ストール発生の原因調査に用いる情報を採取することができるという効果がある。   As described above, the second embodiment has an effect that information used for investigating the cause of the occurrence of a stall can be collected in a multi-thread program that cooperates between threads.

その理由は、各スレッドが別々の共有メモリにトレース情報を格納し、トレース情報の格納先として各共有メモリに複数のバッファを用意するためである。これにより、ある処理にストールの可能性を検知した場合に、一斉にトレース情報を格納するバッファを変更して保存することにより、その時点までの他の処理のトレース情報も残すことができる。   The reason is that each thread stores the trace information in a separate shared memory and prepares a plurality of buffers in each shared memory as a storage destination of the trace information. As a result, when the possibility of stall in a certain process is detected, the trace information of other processes up to that point can be left by changing and saving the buffer for storing the trace information all at once.

<第3の実施形態>
図11は、本発明の第3の実施形態に係るトレース情報収集装置の構成を示すブロック図である。
<Third Embodiment>
FIG. 11 is a block diagram showing a configuration of a trace information collecting apparatus according to the third embodiment of the present invention.

図2から図11への変更点は、プロセス100が、プロセス103と、プロセス104になったことである。すなわち、本発明の第2の実施形態は、複数のスレッドからそれぞれ別々の共有メモリにトレース情報を格納する構成としていたが、本発明の第3の実施形態は、複数のプロセス(プロセス103および104)からそれぞれ別々の共有メモリにトレース情報を格納する。   The change from FIG. 2 to FIG. 11 is that the process 100 is changed to a process 103 and a process 104. That is, the second embodiment of the present invention is configured to store trace information from a plurality of threads in separate shared memories, but the third embodiment of the present invention has a plurality of processes (processes 103 and 104). ) To store the trace information in separate shared memories.

以上、説明したように、第3の実施形態には、プロセス間で連携するプログラムにおいて、ストール発生の原因調査に用いる情報を採取することができるという効果がある。   As described above, the third embodiment has an effect that it is possible to collect information used for investigating the cause of stall occurrence in a program linked between processes.

その理由は、各プロセスが別々の共有メモリにトレース情報を格納し、トレース情報の格納先として各共有メモリに複数のバッファを用意するためである。これにより、ある処理にストールの可能性を検知した場合に、一斉にトレース情報を格納するバッファを変更して保存することにより、その時点までの他の処理のトレース情報も残すことができる。 <第4の実施形態>
図12は、本発明の第4の実施形態に係るトレース情報収集装置の構成を示すブロック図である。
The reason is that each process stores trace information in a separate shared memory and prepares a plurality of buffers in each shared memory as a storage destination of the trace information. As a result, when the possibility of stall in a certain process is detected, the trace information of other processes up to that point can be left by changing and saving the buffer for storing the trace information all at once. <Fourth Embodiment>
FIG. 12 is a block diagram showing a configuration of a trace information collecting apparatus according to the fourth embodiment of the present invention.

本実施形態では、図12に示すように、共有メモリごとにストール判定部701および702を設ける。   In the present embodiment, as shown in FIG. 12, stall determination units 701 and 702 are provided for each shared memory.

ストール判定部701および702のそれぞれにストール判定条件を保持し、そのストール判定条件に基づいて、ストールの可能性の判定を行うことができる。   Stall determination units 701 and 702 each have a stall determination condition, and the possibility of a stall can be determined based on the stall determination condition.

以上、説明したように、第4の実施形態には、スレッド間で連携するマルチスレッドプログラムにおいて、あらかじめストールの定義を定め、そのストール発生の原因調査に用いる情報を採取することができるという効果がある。   As described above, the fourth embodiment has an effect that the definition of a stall can be defined in advance and information used for investigating the cause of the occurrence of the stall can be collected in a multi-thread program linked between threads. is there.

その理由は、各スレッドが別々の共有メモリにトレース情報を格納し、トレース情報の格納先として各共有メモリに複数のバッファを用意するためである。また、ストール判定条件をあらかじめ設定しておくためである。これにより、ある処理に、設定しておいたストール判定条件に基づいてストールの可能性を検知した場合に、一斉にトレース情報を格納するバッファを変更して保存することにより、その時点までの他の処理のトレース情報も残すことができる。   The reason is that each thread stores the trace information in a separate shared memory and prepares a plurality of buffers in each shared memory as a storage destination of the trace information. In addition, the stall determination condition is set in advance. As a result, when the possibility of a stall is detected in a certain process based on the set stall determination condition, the buffer for storing the trace information is changed and saved all at once, so that Trace information of the process can also be left.

(ハードウェア構成)
上述した実施形態において図1、図2、図10、図11および図12に示した各部は、専用の装置によって実践してもよいが、ソフトウェアプログラムの機能(処理)単位(ソフトウェアモジュール)と捉えることができる。但し、これらの図面に示した各部の区分けは、説明の便宜上の構成であり、実装に際しては、様々な構成が想定され得る。このような場合のハードウェア環境の一例を、図13を参照して説明する。
(Hardware configuration)
In the embodiment described above, each unit shown in FIGS. 1, 2, 10, 11 and 12 may be practiced by a dedicated device, but is regarded as a function (processing) unit (software module) of a software program. be able to. However, the division of each part shown in these drawings is a configuration for convenience of explanation, and various configurations can be assumed for mounting. An example of the hardware environment in such a case will be described with reference to FIG.

図13は、本発明の第1乃至第4の実施形態を実現可能なコンピュータ(情報処理装置)のハードウェア構成を例示的に説明する図である。即ち、図1、図2、図10、図11および図12に示したトレース情報収集装置の全体または一部を実現可能なサーバ等のコンピュータ(情報処理装置)の構成であって、上述した実施形態における各機能を実現可能なハードウェア環境を表す。   FIG. 13 is a diagram for exemplifying the hardware configuration of a computer (information processing apparatus) capable of realizing the first to fourth embodiments of the present invention. That is, it is a configuration of a computer (information processing apparatus) such as a server that can realize the whole or a part of the trace information collection apparatus shown in FIG. 1, FIG. 2, FIG. 10, FIG. The hardware environment which can implement | achieve each function in a form is represented.

図13に示した情報処理装置9000は、CPU(Central Processing Unit)9001、ディスプレイ9002、通信インタフェース(I/F)9003、ROM(Read Only Memory)9004、RAM(Random Access Memory)9005、ハードディスク装置(HD)9006を備え、これらがバス9007を介して接続された構成を有する。ハードディスク装置(HD)9006には、プログラム群9006Aと、各種の記憶情報9006Bとが格納されている。プログラム群9006Aは、例えば、上述した図1、図2、図10、図11および図12に示した各ブロック(各部)に対応する機能を実現するためのコンピュータ・プログラムである。各種の記憶情報9006Bは、例えば、図1に示した情報格納部20、情報格納部30等である。通信インタフェース9003は、ネットワーク9100を介して外部装置と通信を実現する一般的な通信手段である。   An information processing apparatus 9000 shown in FIG. 13 includes a CPU (Central Processing Unit) 9001, a display 9002, a communication interface (I / F) 9003, a ROM (Read Only Memory) 9004, a RAM (Random Access Memory) 9005, a hard disk device ( HD) 9006, and these are connected via a bus 9007. The hard disk device (HD) 9006 stores a program group 9006A and various kinds of stored information 9006B. The program group 9006A is, for example, a computer program for realizing a function corresponding to each block (each unit) shown in FIG. 1, FIG. 2, FIG. 10, FIG. Various kinds of stored information 9006B are, for example, the information storage unit 20 and the information storage unit 30 shown in FIG. A communication interface 9003 is a general communication unit that realizes communication with an external device via the network 9100.

そして、上述した実施形態を例に説明した本発明は、その実施形態の説明において参照したブロック構成図、あるいは、フローチャートの機能を実現可能なコンピュータ・プログラムを供給した後、そのコンピュータ・プログラムを、当該ハードウェアのCPU9001に読み出して、図13に示す情報処理装置9000のハードウェア資源を用いて実行することによって達成される。具体的には、収集部10またはトレース情報収集部200を、情報処理装置9000によって実現する場合、情報処理装置9000は、図5に示すフローチャートに対応するコンピュータ・プログラムを実現すればよい。管理部40またはバッファ管理部400を、情報処理装置9000によって実現する場合、情報処理装置9000は、図6、図7および図8に示すフローチャートに対応するコンピュータ・プログラムを実現すればよい。ファイル出力部500を、情報処理装置9000によって実現する場合、情報処理装置9000は、図9に示すフローチャートに対応するコンピュータ・プログラムを実現すればよい。また、情報処理装置9000内に供給されたコンピュータ・プログラムは、読み書き可能な一時記憶メモリ(9005)またはハードディスク装置9006等の不揮発性の記憶デバイス(記憶媒体)に格納すれば良い。   The present invention described by taking the above-described embodiment as an example is a block configuration diagram referred to in the description of the embodiment, or after supplying a computer program capable of realizing the function of the flowchart, This is achieved by reading the data to the CPU 9001 of the hardware and using the hardware resources of the information processing apparatus 9000 shown in FIG. Specifically, when the collection unit 10 or the trace information collection unit 200 is realized by the information processing device 9000, the information processing device 9000 may realize a computer program corresponding to the flowchart shown in FIG. When the management unit 40 or the buffer management unit 400 is realized by the information processing device 9000, the information processing device 9000 may realize a computer program corresponding to the flowcharts shown in FIGS. When the file output unit 500 is realized by the information processing device 9000, the information processing device 9000 may realize a computer program corresponding to the flowchart shown in FIG. The computer program supplied to the information processing device 9000 may be stored in a readable / writable temporary storage memory (9005) or a non-volatile storage device (storage medium) such as the hard disk device 9006.

また、前記の場合において、当該装置内へのコンピュータ・プログラムの供給方法は、CD−ROM等の各種記憶媒体を介して当該装置内にインストールする方法や、インターネット等の通信回線を介して外部からダウンロードする方法等のように、現在では一般的な手順を採用することができる。そして、このような場合において、本発明は、係るコンピュータ・プログラムを構成するコード或いは、そのコードが記録されたところの、コンピュータ読み取り可能な記憶媒体によって構成されると捉えることができる。   In the above case, the computer program can be supplied to the apparatus from the outside through various storage media such as a CD-ROM or from the outside via a communication line such as the Internet. Currently, a general procedure can be adopted, such as a downloading method. In such a case, the present invention can be understood to be constituted by a code constituting the computer program or a computer-readable storage medium in which the code is recorded.

10 収集部
20 情報格納部
21 管理情報
22 バッファ
23 バッファ
24 バッファ
30 情報格納部
31 管理情報
32 バッファ
33 バッファ
34 バッファ
40 管理部
100 プロセス
101 スレッド
102 スレッド
103 プロセス
104 プロセス
200 トレース情報収集部
301 共有メモリ
302 共有メモリ
311 管理情報
312 管理情報
321 バッファA
322 バッファA
331 バッファB
332 バッファB
341 バッファC
342 バッファC
351 バッファD
352 バッファD
361 属性
362 属性
400 バッファ管理部
401 バッファ情報
500 ファイル出力部
600 ファイル
701 ストール判定部
702 ストール判定部
811 格納位置
812 バッファ開始位置
813 バッファ終了位置
814 アドレス
815 バッファ情報
821 バッファ識別名
822 ステータス
823 最終時刻
9000 情報処理装置(コンピュータ)
9001 CPU
9002 ディスプレイ
9003 通信インタフェース(I/F)
9004 ROM
9005 RAM
9006 ハードディスク装置(HD)
9006A プログラム群
9006B 各種の記憶情報
9007 バス
9100 ネットワーク
DESCRIPTION OF SYMBOLS 10 Collection part 20 Information storage part 21 Management information 22 Buffer 23 Buffer 24 Buffer 30 Information storage part 31 Management information 32 Buffer 33 Buffer 34 Buffer 40 Management part 100 Process 101 Thread 102 Thread 103 Process 104 Process 200 Trace information collection part 301 Shared memory 302 Shared memory 311 Management information 312 Management information 321 Buffer A
322 Buffer A
331 Buffer B
332 Buffer B
341 Buffer C
342 Buffer C
351 Buffer D
352 Buffer D
361 attribute 362 attribute 400 buffer management unit 401 buffer information 500 file output unit 600 file 701 stall determination unit 702 stall determination unit 811 storage position 812 buffer start position 813 buffer end position 814 address 815 buffer information 821 buffer identification name 822 status 823 final time 9000 Information processing device (computer)
9001 CPU
9002 Display 9003 Communication interface (I / F)
9004 ROM
9005 RAM
9006 Hard disk device (HD)
9006A Program group 9006B Various stored information 9007 Bus 9100 Network

Claims (8)

複数のプログラムが並行、又は疑似並行に関連して動作する環境において、それらのプログラムのトレース情報を収集する収集手段と、
前記複数のプログラムのうち、第1のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第1の情報格納部と、
前記複数のプログラムのうち、第2のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第2の情報格納部と、
あらかじめ定めたストール判定条件を判定することによりストールを検出した場合に、前記第1及び第2の情報格納部に対して、前記複数のバッファのうち、前記現在トレース情報を収集しているバッファから、そのバッファとは異なるバッファに、前記トレース情報の収集先を一斉に切り替えて、前記トレース情報を保存するように制御する管理手段とを
備えることを特徴とするトレース情報収集装置。
A collecting means for collecting trace information of the programs in an environment in which a plurality of programs operate in parallel or pseudo-concurrency;
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the first program, and management information for storing information necessary for accessing the buffer that is currently collecting the trace information among the buffers, A first information storage unit including:
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the second program, and management information for storing information necessary for accessing a buffer that is currently collecting the trace information among the buffers, A second information storage unit including:
When a stall is detected by determining a predetermined stall determination condition, from the buffer that is currently collecting the trace information among the plurality of buffers with respect to the first and second information storage units A trace information collecting apparatus comprising: a management unit that controls the collection of the trace information to a buffer different from the buffer at a time and controls the trace information to be saved.
前記ストール判定条件は、前記第1及び第2の情報格納部を直近に更新した時刻を参照した結果を基に判定することを特徴とする請求項1記載のトレース情報収集装置。 2. The trace information collecting apparatus according to claim 1, wherein the stall determination condition is determined based on a result of referring to a time when the first and second information storage units were most recently updated. 前記第2の情報格納部に含まれる前記複数のバッファは、前記トレース情報を格納可能で、かつ、前記第1の情報格納部に含まれる前記複数のバッファに1対1に対応することを特徴とする請求項1または請求項2記載のトレース情報収集装置。 The plurality of buffers included in the second information storage unit can store the trace information, and correspond to the plurality of buffers included in the first information storage unit on a one-to-one basis. The trace information collection device according to claim 1 or 2. 前記複数のプログラムが並行、又は疑似並行に関連して動作する環境は、マルチスレッド環境であることを特徴とする請求項1乃至3の何れかに記載のトレース情報収集装置。 The trace information collection apparatus according to claim 1, wherein an environment in which the plurality of programs operate in parallel or pseudo-parallel is a multi-thread environment. 複数のプログラムが並行、又は疑似並行に関連して動作する環境において、情報処理装置によって、
前記複数のプログラムのうち、第1のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第1の情報格納部に対し、第1のプログラムのトレース情報を、前記管理情報を元に、前記バッファに収集し、
前記複数のプログラムのうち、第2のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファへのアクセスに必要な情報を格納する管理情報とを含む第2の情報格納部に対し、第2のプログラムのトレース情報を、前記管理情報を元に、前記バッファに収集し、
あらかじめ定めたストール判定条件を判定することによりストールを検出した場合に、前記第1及び第2の情報格納部に対して、前記複数のバッファのうち、前記現在トレース情報を収集しているバッファから、そのバッファとは異なるバッファに、前記トレース情報の収集先を一斉に切り替えて、前記トレース情報を保存するように制御する
ことを特徴とするトレース情報収集方法。
In an environment where a plurality of programs operate in parallel or pseudo-parallel, the information processing apparatus
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the first program, and management information for storing information necessary for accessing the buffer that is currently collecting the trace information among the buffers, Collecting trace information of the first program in the buffer based on the management information for the first information storage unit including
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the second program, and management information for storing information necessary for accessing a buffer that is currently collecting the trace information among the buffers, Collecting trace information of the second program in the buffer based on the management information for the second information storage unit including
When a stall is detected by determining a predetermined stall determination condition, from the buffer that is currently collecting the trace information among the plurality of buffers with respect to the first and second information storage units A trace information collecting method comprising: controlling the collection of the trace information to a buffer different from the buffer at once, and saving the trace information.
前記ストール判定条件は、前記第1及び第2の情報格納部を直近に更新した時刻を参照した結果を基に判定することを特徴とする請求項5記載のトレース情報収集方法。 6. The trace information collecting method according to claim 5, wherein the stall determination condition is determined based on a result obtained by referring to a time when the first and second information storage units were most recently updated. 前記第2の情報格納部に含まれる前記複数のバッファは、前記トレース情報を格納可能で、かつ、前記第1の情報格納部に含まれる前記複数のバッファに1対1に対応することを特徴とする請求項5または請求項6記載のトレース情報収集方法。 The plurality of buffers included in the second information storage unit can store the trace information, and correspond to the plurality of buffers included in the first information storage unit on a one-to-one basis. The trace information collecting method according to claim 5 or 6. 複数のプログラムが並行して、関連して動作する環境において、それら複数のプログラムのうち、第1のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファにアクセスするために必要な情報を格納する管理情報とを含む第1の情報格納部に対し、第1のプログラムのトレース情報を、前記管理情報を元に、前記バッファに収集し、
前記複数のプログラムのうち、第2のプログラムのトレース情報を格納可能な複数のバッファと、それらバッファのうち、現在トレース情報を収集しているバッファにアクセスするために必要な情報を格納する管理情報とを含む第2の情報格納部に対し、第2のプログラムのトレース情報を、前記管理情報を元に、前記バッファに収集し、
あらかじめ定めたストール条件を判定することによりストールを検出した場合に、前記第1及び第2の情報格納部に対して、前記複数のバッファのうち、現在トレース情報を収集しているバッファから、そのバッファとは異なるバッファに、トレース情報の収集先を一斉に切り替えて、前記トレース情報を保存するように制御する制御機能を、コンピュータに実現させる
ことを特徴とするコンピュータ・プログラム。
In an environment in which a plurality of programs operate in parallel, a plurality of buffers capable of storing the trace information of the first program among the plurality of programs and the current trace information among the buffers are collected. Collecting the trace information of the first program in the buffer based on the management information, with respect to the first information storage unit including management information for storing information necessary for accessing the current buffer;
Among the plurality of programs, a plurality of buffers capable of storing the trace information of the second program, and management information for storing information necessary for accessing a buffer currently collecting the trace information among the buffers. And collecting the trace information of the second program in the buffer based on the management information for the second information storage unit including
When a stall is detected by determining a predetermined stall condition, the buffer that currently collects trace information among the plurality of buffers is detected for the first and second information storage units. A computer program for causing a computer to realize a control function for switching the collection destination of trace information to a buffer different from the buffer at a time and saving the trace information.
JP2013152182A 2013-07-23 2013-07-23 Trace information collection device, trace information collection method, and computer program Pending JP2015022667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013152182A JP2015022667A (en) 2013-07-23 2013-07-23 Trace information collection device, trace information collection method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013152182A JP2015022667A (en) 2013-07-23 2013-07-23 Trace information collection device, trace information collection method, and computer program

Publications (1)

Publication Number Publication Date
JP2015022667A true JP2015022667A (en) 2015-02-02

Family

ID=52487017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013152182A Pending JP2015022667A (en) 2013-07-23 2013-07-23 Trace information collection device, trace information collection method, and computer program

Country Status (1)

Country Link
JP (1) JP2015022667A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020524852A (en) * 2017-06-21 2020-08-20 テトラ ラバル ホールディングス アンド ファイナンス エス エイ Method for logging process data in PLC control equipment
CN113313501A (en) * 2021-05-31 2021-08-27 中检集团溯源技术服务有限公司 System and method for offline collecting tracing data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020524852A (en) * 2017-06-21 2020-08-20 テトラ ラバル ホールディングス アンド ファイナンス エス エイ Method for logging process data in PLC control equipment
JP7199387B2 (en) 2017-06-21 2023-01-05 テトラ ラバル ホールディングス アンド ファイナンス エス エイ How to log process data in PLC control equipment
CN113313501A (en) * 2021-05-31 2021-08-27 中检集团溯源技术服务有限公司 System and method for offline collecting tracing data
CN113313501B (en) * 2021-05-31 2023-12-19 中检集团溯源技术服务有限公司 System and method for offline data collection and tracing

Similar Documents

Publication Publication Date Title
JP5868429B2 (en) Method, computer program product, and apparatus for progressively unloading classes using a region-based garbage collector
CN102622426A (en) Database writing system and database writing method
US20110113215A1 (en) Method and apparatus for dynamic resizing of cache partitions based on the execution phase of tasks
CN109358947B (en) Method and system for realizing virtual machine snapshot
CN104965850A (en) Database high-available implementation method based on open source technology
JP2008234520A (en) Software behavior monitoring device, software behavior monitoring system and its program
JP2012088770A (en) Computer resource control system
US9575827B2 (en) Memory management program, memory management method, and memory management device
JP2005338985A (en) Method and system for managing storage area
TW201432446A (en) Wear leveling with marching strategy
CN106874103B (en) Heartbeat implementation method and device
US20160266808A1 (en) Information processing device, information processing method, and recording medium
JP2015022667A (en) Trace information collection device, trace information collection method, and computer program
US20200387408A1 (en) Resolving cluster computing task interference
JP2009176146A (en) Multi-processor system, failure detecting method and failure detecting program
US20150242312A1 (en) Method of managing memory, computer, and recording medium
CN101847128A (en) TLB management method and device
JP2008225599A (en) Trace information output apparatus and trace information output method
JPWO2004046926A1 (en) Event notification method, device, and processor system
JP2012247937A (en) Information processing unit, log storage control program, and log storage control method
US9218275B2 (en) Memory management control system, memory management control method, and storage medium storing memory management control program
US9128851B2 (en) Prefetching for multiple parent cores in a multi-core chip
US20130326181A1 (en) Providing usage statistics for virtual storage
JP2015191616A (en) Process control device, process control method, and process control program
JP2006079485A (en) Method for information collection for fault analysis in electronic computer