JP2015118493A - Trace device and trace program - Google Patents

Trace device and trace program Download PDF

Info

Publication number
JP2015118493A
JP2015118493A JP2013260733A JP2013260733A JP2015118493A JP 2015118493 A JP2015118493 A JP 2015118493A JP 2013260733 A JP2013260733 A JP 2013260733A JP 2013260733 A JP2013260733 A JP 2013260733A JP 2015118493 A JP2015118493 A JP 2015118493A
Authority
JP
Japan
Prior art keywords
program
trace
unit
cpus
operation 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.)
Pending
Application number
JP2013260733A
Other languages
Japanese (ja)
Inventor
龍一 佐藤
Ryuichi Sato
龍一 佐藤
明 平田
Akira Hirata
明 平田
雅浩 虻川
Masahiro Abukawa
雅浩 虻川
下谷 光生
Mitsuo Shitaya
光生 下谷
伸輝 岡田
Nobuteru Okada
伸輝 岡田
圭人 吉村
Keito Yoshimura
圭人 吉村
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2013260733A priority Critical patent/JP2015118493A/en
Publication of JP2015118493A publication Critical patent/JP2015118493A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a trace device that can suppress increase in CPU load upon output processing of program operation information without adding exclusive hardware, and can record the program operation information without being affected by system down (or an operation situation of a system operation system).SOLUTION: A trace device 1001 incorporating a multicore processor including a plurality of CPUs 101-1 to 101-3 and 201, the trace device 1001 comprises: a system operation system 100 that runs a program using the CPUs 101-1 to 101-3, and collects program operation information indicative of an operation history of the program; and a log control system 200 that operates independently of a system operation system 100 without being affected by an operation situation of the system operation system 100 using the CPU 201, and outputs the program operation information collected by the system operation system 100 to an IO device 1.

Description

本発明は、マルチコアプロセッサを搭載してトレース(プログラム動作情報)をするトレース装置に関するものである。   The present invention relates to a tracing device that mounts a multi-core processor and performs tracing (program operation information).

従来のプログラム動作情報(トレース)収集方法は、例えば計算機システムが動作中に、日付、時刻、動作内容などをUART(Universal Asynchronous Receiver Transmitter)に出力する方法や、前記プログラム動作情報をメモリに出力し、不揮発領域へ書き出し、プログラム動作情報を収集する方法が利用されている。しかし、UARTにプログラム動作情報を出力する方法ではUARTへ出力するためにCPU負荷が生じ、CPU(Central Processing Unit)の動作タイミングに影響を及ぼす。プログラム動作情報の出力量によっては、システムの動作に副作用が生じることがあるため、プログラム動作情報を出力する処理負荷を考慮した運用が必要である。また、プログラム動作情報を不揮発領域へ出力する方法は、例えばOS(オペレーティングシステム)を含むシステムがダウンした場合やハングアップした状態の場合は、収集したプログラム動作情報を収集できない状態に陥ることがある。   Conventional program operation information (trace) collection methods include, for example, a method of outputting the date, time, operation content, etc. to a UART (Universal Asynchronous Receiver Transmitter) while the computer system is operating, or outputting the program operation information to a memory. A method of writing to a nonvolatile area and collecting program operation information is used. However, in the method of outputting the program operation information to the UART, a CPU load is generated because the program operation information is output to the UART, which affects the operation timing of the CPU (Central Processing Unit). Depending on the output amount of the program operation information, side effects may occur in the operation of the system. Therefore, it is necessary to operate in consideration of the processing load for outputting the program operation information. Also, the method for outputting the program operation information to the non-volatile area may fall into a state where the collected program operation information cannot be collected, for example, when the system including the OS (operating system) is down or hung up. .

これらの課題を解決するために従来技術で次の特許文献1、特許文献2の技術が開示されている。特許文献1の技術は、CPUの動作タイミングに影響を与えることなく、プログラム動作情報を収集する技術として、専用のハードウェアを追加し、主記憶装置にプログラム動作情報を書き込み、専用ハードウェアから外部記憶装置にプログラム動作情報を転送し、CPUを介在させないことでCPU負荷を低減させる。また、専用ハードウェアを追加するため、システムがダウンした状況においても専用ハードウェアを経由してプログラム動作情報の収集を可能にしている。特許文献2の技術は、複数のCPUを持つ計算機において各CPUの負荷を監視し、CPU負荷が低いコアにトレーサを動作させるようにスケジュールするものである。それにより特定のCPU負荷が高くなることを防ぎ、システムに対する副作用を軽減できる技術が発明されている。   In order to solve these problems, the following patent documents 1 and 2 are disclosed as conventional techniques. The technique of Patent Document 1 adds dedicated hardware as a technique for collecting program operation information without affecting the operation timing of the CPU, writes the program operation information to the main storage device, and externally uses the dedicated hardware. The program operation information is transferred to the storage device, and the CPU load is reduced by not interposing the CPU. Further, since dedicated hardware is added, it is possible to collect program operation information via the dedicated hardware even when the system is down. The technique of Patent Document 2 monitors the load on each CPU in a computer having a plurality of CPUs, and schedules the tracer to operate on a core with a low CPU load. Thus, a technique has been invented that prevents a specific CPU load from becoming high and reduces the side effects on the system.

特開2004−54532号公報JP 2004-54532 A 特開2012−18438号公報JP 2012-18438 A

特許文献1は、専用のハードウェアを追加することで、システムに対する負荷の軽減、システムダウン時にもプログラム動作情報の収集を可能にしているが、計算機システムに専用ハードウェアを追加する必要がある。計算機システムへ専用ハードウェアを追加するため、コストおよびサイズが大きくなるという課題がある。   Japanese Patent Application Laid-Open No. 2004-228867 reduces the load on the system by adding dedicated hardware and enables collection of program operation information even when the system is down. However, it is necessary to add dedicated hardware to the computer system. Since dedicated hardware is added to the computer system, there is a problem that the cost and size increase.

特許文献2は、既存の計算機システムにリソース監視機構などをソフトウェアで実現し、専用のハードウェアは不要である。このため、コスト高、サイズ拡大の課題は発生しないが、システム全体がダウンした状況では、プログラム動作情報をUARTや不揮発領域へ書き出しができない状況に陥る場合がある。更にリソース監視機構をソフトウェアで実現する場合、それらを動作させるためのCPUリソースが必要であり、システムに対する副作用が発生しないように運用する必要がある。   In Patent Document 2, a resource monitoring mechanism and the like are realized by software in an existing computer system, and dedicated hardware is not required. For this reason, the problem of high cost and size expansion does not occur, but when the entire system is down, the program operation information may not be written to the UART or the nonvolatile area. Further, when the resource monitoring mechanism is realized by software, CPU resources for operating them are necessary, and it is necessary to operate so as not to cause side effects on the system.

この発明は、専用ハードウェアを追加することなくプログラム動作情報の出力処理におけるCPU負荷増大を抑制し、またシステムダウンの影響を受けずにプログラム動作情報の記録が可能なトレース装置の提供を目的とする。   An object of the present invention is to provide a trace device capable of suppressing an increase in CPU load in program operation information output processing without adding dedicated hardware and recording program operation information without being affected by a system down. To do.

この発明のトレース装置は、
複数のCPU(Central Processing Unit)を有するマルチコアプロセッサを搭載するトレース装置において、
前記マルチコアプロセッサの有する前記複数のCPUのうち、1以上の一部のCPUを用いてプログラムを実行し、前記プログラムの処理状況の履歴を示すプログラム動作情報を収集するシステム動作部と、
前記マルチコアプロセッサの有する前記複数のCPUのうち、前記システム動作部が使用するCPUとは異なる1以上のCPUを用いて前記システム動作部の稼働状況に影響されることなく前記システム動作部とは独立に稼働すると共に、前記システム動作部の収集した前記プログラム動作情報をIO(Input/Output)デバイスに出力するログ制御部と
を備えたことを特徴とする。
The tracing device of the present invention
In a trace device equipped with a multi-core processor having a plurality of CPUs (Central Processing Units),
A system operation unit that executes a program using one or more of the CPUs of the multi-core processor and collects program operation information indicating a history of the processing status of the program;
Of the plurality of CPUs of the multi-core processor, one or more CPUs different from the CPU used by the system operation unit are used and are independent of the system operation unit without being affected by the operating status of the system operation unit. And a log control unit that outputs the program operation information collected by the system operation unit to an IO (Input / Output) device.

この発明により、専用ハードウェアを追加することなくプログラム動作情報の出力処理におけるCPU負荷増大を抑制し、またシステムダウンの影響を受けずにプログラム動作情報の記録が可能なトレース装置を提供できる。   According to the present invention, it is possible to provide a tracing device that can suppress an increase in CPU load in the output processing of program operation information without adding dedicated hardware and can record program operation information without being affected by a system down.

実施の形態1による、トレース装置を示す構成図。1 is a configuration diagram showing a trace device according to Embodiment 1. FIG. 実施の形態1による、トレース装置の共有メモリの内部構成を示す説明図。FIG. 3 is an explanatory diagram showing an internal configuration of a shared memory of the trace device according to the first embodiment. 実施の形態1による、トレース装置の動作を示すフローチャート(システム動作系)。5 is a flowchart (system operation system) showing the operation of the trace device according to the first embodiment. 実施の形態1による、トレース装置の動作を示すフローチャート(ログ制御系)。6 is a flowchart (log control system) showing the operation of the trace apparatus according to the first embodiment. 実施の形態1による、トレース装置のシステム動作系の稼働状態監視のシーケンス図。FIG. 3 is a sequence diagram of monitoring the operating state of the system operation system of the trace device according to the first embodiment. 実施の形態1による、トレース装置のログ制御系がシステム動作系の異常を検出した場合のシーケンス図。FIG. 6 is a sequence diagram when the log control system of the trace apparatus detects an abnormality in the system operation system according to the first embodiment. 実施の形態1による、トレース装置のシステム動作系で異常を検出した場合のシーケンス図。FIG. 3 is a sequence diagram when an abnormality is detected in the system operation system of the trace device according to the first embodiment. 実施の形態2による、トレース装置を示す構成図。FIG. 4 is a configuration diagram showing a trace device according to a second embodiment. 実施の形態3による、トレース装置を示す構成図。FIG. 6 is a configuration diagram showing a trace device according to a third embodiment. 実施の形態3による、トレース装置の動作を示すフローチャート。10 is a flowchart showing the operation of the trace device according to the third embodiment. 実施の形態4による、トレース装置を示す構成図。FIG. 6 is a configuration diagram showing a trace device according to a fourth embodiment.

実施の形態1.
図1〜図7を参照して実施の形態1のトレース装置1001を説明する。
図1は、実施の形態1のトレース装置1001のハードウェア構成及びソフトウェア構成を含む構成図である。図1に示すトレース装置1001は、4個のCPU(Central Processing Unit)であるCPU101−1、CPU101−2、CPU101−3,CPU201を備えたマルチコアプロセッサに、システム動作系100(システム動作部)とログ制御系200(ログ制御部)を構築する例である。
Embodiment 1 FIG.
The trace apparatus 1001 according to the first embodiment will be described with reference to FIGS.
FIG. 1 is a configuration diagram including a hardware configuration and a software configuration of the trace apparatus 1001 according to the first embodiment. A trace apparatus 1001 shown in FIG. 1 includes a system operating system 100 (system operating unit) and a multi-core processor including CPUs 101-1, CPU 101-2, CPU 101-3, and CPU 201, which are four CPUs (Central Processing Units). This is an example of constructing a log control system 200 (log control unit).

(システム動作系100)
システム動作系100は、CPU101−1〜101−3、OS(オペレーティングシステム)102、CPU間通信部103、アプリケーションプログラム104、IO(Input/Output)アクセス制御部105、異常検出処理部106、及びプログラム情報書込部107から構成される。プログラム情報書込部107は、プログラム動作情報を書き出すプログラムを有するプロセスをCPU101−1等が実行することで実現される。
ここで「プログラム動作情報」とは、プログラムの動作履歴の情報(トレース)である。
(System operation system 100)
The system operation system 100 includes a CPU 101-1 to 101-3, an OS (Operating System) 102, an inter-CPU communication unit 103, an application program 104, an IO (Input / Output) access control unit 105, an abnormality detection processing unit 106, and a program An information writing unit 107 is included. The program information writing unit 107 is realized by the CPU 101-1 or the like executing a process having a program for writing program operation information.
Here, “program operation information” is information (trace) of program operation history.

(ログ制御系200)
ログ制御系200は、CPU201、CPU間通信部203、IOアクセス制御部205、異常検出処理部206及びプログラム情報読出部207から構成されている。
(Log control system 200)
The log control system 200 includes a CPU 201, an inter-CPU communication unit 203, an IO access control unit 205, an abnormality detection processing unit 206, and a program information reading unit 207.

また、トレース装置1001は、システム動作系100とログ制御系200とが共通して用いるIO(Input/Output)デバイス1、メモリ2(例えば主記憶装置)、通信路3を備えている。上記のシステム動作系100、ログ制御系200は、「〜部」の機能を有する各プログラム、OS102、「各プログラム及びOS102」を実行するCPU101−1〜101−3、201によって実現される。図1に示すように、トレース装置1001では、マルチコアプロセッサを複数の系(図1では2つ)に分割し、システム動作系100とログ制御系200とを構成する。システム動作系100にはCPUを3個、ログ制御系200にはCPUを1個割り当てる。CPU101−1〜101−3、CPU201の4つのCPUは、同一アーキテクチャを持つ。これら4つのCPUは、通信路3で接続され、CPU間、或いは同じく通信路3に接続される周辺ハードウェアであるIOデバイス1、メモリ2と互いに情報を伝達できるように構成されている。   The trace device 1001 includes an IO (Input / Output) device 1, a memory 2 (for example, a main storage device), and a communication path 3 that are commonly used by the system operation system 100 and the log control system 200. The system operation system 100 and the log control system 200 described above are realized by each program having the function of “unit”, the OS 102, and the CPUs 101-1 to 101-3 and 201 that execute “each program and the OS 102”. As shown in FIG. 1, in the trace apparatus 1001, the multi-core processor is divided into a plurality of systems (two in FIG. 1), and the system operation system 100 and the log control system 200 are configured. Three CPUs are allocated to the system operation system 100 and one CPU is allocated to the log control system 200. The four CPUs, the CPUs 101-1 to 101-3 and the CPU 201, have the same architecture. These four CPUs are connected by a communication path 3 and are configured to be able to transmit information to each other or to the IO device 1 and the memory 2 that are peripheral hardware connected to the communication path 3.

システム動作系100は、OS102を搭載する。また、システム動作系100は、CPU間通信部103,アプリケーションプログラム104,IOアクセス制御部105,異常検出処理部106、プログラム情報書込部107を搭載しシステム動作系を構築する。CPU間通信部103〜プログラム情報書込部107はOS102上で動作する。また、ログ制御系200にOSは搭載せず、単純な構成とする。ログ制御系200はCPU間通信部203,IOアクセス制御部205,異常検出処理部206、プログラム情報読出部207を搭載し、ログ制御系を構築する。システム動作系100とログ制御系200とで共用するIOデバイス1へのアクセスは、システム動作系100またはログ制御系200とのうちの、どちらか一方がアクセスすることとする。システム動作系100とログ制御系200とのIOデバイス1へのアクセスの競合を防ぐため、IOアクセス制御部105、205で排他制御を行う。   The system operation system 100 includes an OS 102. The system operation system 100 includes an inter-CPU communication unit 103, an application program 104, an IO access control unit 105, an abnormality detection processing unit 106, and a program information writing unit 107, and constructs a system operation system. The inter-CPU communication unit 103 to the program information writing unit 107 operate on the OS 102. In addition, the log control system 200 does not include an OS and has a simple configuration. The log control system 200 includes an inter-CPU communication unit 203, an IO access control unit 205, an abnormality detection processing unit 206, and a program information reading unit 207, and constructs a log control system. Assume that either the system operation system 100 or the log control system 200 accesses the IO device 1 shared by the system operation system 100 and the log control system 200. In order to prevent contention of access to the IO device 1 between the system operation system 100 and the log control system 200, the IO access control units 105 and 205 perform exclusive control.

図1に示すように、メモリ2は、システム動作系100が使用するシステム動作系メモリ領域21と、ログ制御系200が使用するログ制御系メモリ領域22と、システム動作系100とログ制御系200との両者で使用する共有メモリ23に分割されている。   As shown in FIG. 1, the memory 2 includes a system operation system memory area 21 used by the system operation system 100, a log control system memory area 22 used by the log control system 200, a system operation system 100, and a log control system 200. And shared memory 23 used by both of them.

システム動作系100は通常のシステムを動作させる系である。システム動作系100のプログラム情報書込部107は、システム動作系100で動作するアプリケーションプログラム104をはじめ、OS102を含むプログラム動作情報を収集し、収集したプログラム動作情報を共有メモリ23へ書き込む。   The system operation system 100 is a system for operating a normal system. The program information writing unit 107 of the system operation system 100 collects the program operation information including the OS 102 as well as the application program 104 operating on the system operation system 100 and writes the collected program operation information to the shared memory 23.

ログ制御系200のプログラム情報読出部207は、共有メモリ23から、プログラム情報書込部107が書き込んだプログラム動作情報を読み出し、IOデバイス1へ、読み出したプログラム動作情報を出力する。   The program information reading unit 207 of the log control system 200 reads the program operation information written by the program information writing unit 107 from the shared memory 23 and outputs the read program operation information to the IO device 1.

(システム動作系100の異常検出)
CPU間通信部103,203と、異常検出処理部106、206とによって、システム動作系100の稼働状態の監視を行い、システム動作系100の異常検出を行う。システム動作系100の異常が検出された場合は、ログ制御系200の異常検出処理部206は、システム動作系100のCPU101−1〜101−3を停止させると共に、共有メモリ23に格納されているプログラム動作情報をプログラム情報読出部207に、IOデバイス1へ出力させる。
(Abnormality detection of system operation system 100)
The inter-CPU communication units 103 and 203 and the abnormality detection processing units 106 and 206 monitor the operating state of the system operation system 100 and detect an abnormality in the system operation system 100. When an abnormality of the system operation system 100 is detected, the abnormality detection processing unit 206 of the log control system 200 stops the CPUs 101-1 to 101-3 of the system operation system 100 and is stored in the shared memory 23. Program operation information is output to the IO device 1 by the program information reading unit 207.

図2は共有メモリ23の使用領域を示す図である。共有メモリ23は、図2に示すように、プログラム動作情報を出力するIOデバイスの種別に応じてメモリ領域が分割される。システム動作系100は、プログラム動作情報を出力するIOデバイスの種別に応じた共有メモリ領域にプログラム動作情報の書き込みを行う。図2は2つのIOデバイスへプログラム動作情報を出力する場合の図である。例えばIOデバイスAの出力用領域231は、UARTへの出力領域であり、IOデバイスBの出力用領域232は、不揮発なストレージであるHDD(Hard Disk Drive)やSDメモリーカード(SD Memory Card(SDは登録商標))への出力領域として割り当てる。   FIG. 2 is a diagram showing a use area of the shared memory 23. As shown in FIG. 2, the shared memory 23 has a memory area divided according to the type of IO device that outputs program operation information. The system operation system 100 writes the program operation information in the shared memory area corresponding to the type of the IO device that outputs the program operation information. FIG. 2 is a diagram when program operation information is output to two IO devices. For example, the output area 231 of the IO device A is an output area to the UART, and the output area 232 of the IO device B is a non-volatile storage such as an HDD (Hard Disk Drive) or an SD memory card (SD Memory Card (SD) Is assigned as an output area to the registered trademark)).

<トレース装置1001の起動とプログラム動作情報収集>
次に、実施の形態1のトレース装置1001の動作について説明する。
図3は、システム動作系100のプログラム情報書込部107が、共有メモリ23にプログラム動作情報を書き込むフローチャートである。電源オンなど、システム起動トリガを検出すると、ログ制御系200が起動し、その後、システム動作系100が起動する。起動したシステム動作系100は通常の動作を行い、プログラム情報書込部107が動作内容をプログラム動作情報として共有メモリ23へ書き込む(ST1)。共有メモリ23のプログラム動作情報を格納する領域は、システム動作系100のみが書き込みを行うものとする。なお読み出しはプログラム情報読出部207のみが行う。このためアクセス競合が発生せず、図3に示す通り、判定処理なしで共有メモリ23へ書き込みができる。また、ログ制御系200起動後にシステム動作系100を起動させることで、システム動作系100の起動時からのプログラム動作情報を取得することができる。なお、システムの起動時間の短縮を目的とし、システム動作系100と、ログ制御系200とを並列で起動させてもよい。
<Activation of Trace Device 1001 and Collection of Program Operation Information>
Next, the operation of the trace device 1001 according to the first embodiment will be described.
FIG. 3 is a flowchart in which the program information writing unit 107 of the system operation system 100 writes the program operation information to the shared memory 23. When a system activation trigger such as power on is detected, the log control system 200 is activated, and then the system operation system 100 is activated. The activated system operation system 100 performs a normal operation, and the program information writing unit 107 writes the operation content to the shared memory 23 as the program operation information (ST1). It is assumed that only the system operating system 100 writes in the area for storing the program operation information in the shared memory 23. The reading is performed only by the program information reading unit 207. Therefore, access contention does not occur, and writing to the shared memory 23 can be performed without determination processing as shown in FIG. In addition, by starting the system operation system 100 after starting the log control system 200, it is possible to acquire program operation information from the time when the system operation system 100 is started. Note that the system operation system 100 and the log control system 200 may be activated in parallel for the purpose of shortening the system activation time.

<プログラム動作情報の出力>
図4は、プログラム情報読出部207が、共有メモリ23に格納されたプログラム動作情報を、IOデバイス1への出力するフローチャートである。出力先のIOデバイス1がシステム動作系100からもアクセスされる場合は、アクセス競合が発生するため、図4に示すように、IOアクセス制御部205で排他制御を行う。これについては後述する。
<Output of program operation information>
FIG. 4 is a flowchart in which the program information reading unit 207 outputs the program operation information stored in the shared memory 23 to the IO device 1. When the output destination IO device 1 is also accessed from the system operating system 100, access contention occurs, and therefore, the exclusive control is performed by the IO access control unit 205 as shown in FIG. This will be described later.

ログ制御系200のプログラム情報読出部207は、共有メモリ23に書き込まれたプログラム動作情報を出力先のIOデバイスの種別に応じた共有メモリ23の領域から読み出し(ST10)、プログラム動作情報が存在するか判定する(ST11)。IOデバイス1へ出力するプログラム動作情報が存在する場合、IOアクセス制御部205は、IOデバイス1へのアクセスが可能か判定する(ST12)。IOアクセス制御部205がアクセス可能と判定した場合、プログラム情報読出部207は、IOデバイス1へプログラム動作情報の出力処理を行う(ST13)。IOデバイス1への出力処理はシステム動作系100と共用する通信路3の効率を考慮し、プログラム情報読出部207は、プログラム動作情報が一定量、共有メモリ23に溜まるまで待ち、一定量溜まる毎にIOデバイス1へ出力する。IOデバイス1へのデータ転送は、ログ制御系200のCPU201による転送に加え、DMA(Direct Memory Access)を利用してもよい。   The program information reading unit 207 of the log control system 200 reads the program operation information written in the shared memory 23 from the area of the shared memory 23 corresponding to the type of the output destination IO device (ST10), and the program operation information exists. (ST11). If there is program operation information to be output to the IO device 1, the IO access control unit 205 determines whether access to the IO device 1 is possible (ST12). When the IO access control unit 205 determines that access is possible, the program information reading unit 207 performs output processing of program operation information to the IO device 1 (ST13). The output processing to the IO device 1 considers the efficiency of the communication path 3 shared with the system operation system 100, and the program information reading unit 207 waits until a certain amount of program operation information is accumulated in the shared memory 23, and every time a certain amount is accumulated. Output to the IO device 1. Data transfer to the IO device 1 may use DMA (Direct Memory Access) in addition to the transfer by the CPU 201 of the log control system 200.

<異常検出>
ログ制御系200の異常検出処理部206は、システム動作系100の稼働状態を監視し、システム動作系100の異常を検出する機能を有する。以下に具体的な検出方法を記載する。
図5は、ログ制御系200がシステム動作系100の稼働状態を監視するシーケンスの例である。通信路3を介したCPU101−1〜101―3と、CPU201との間で、CPU間通信部103,203と共有メモリ23とを利用し、システム動作系100は、周期的に共有メモリ23の稼働情報を更新する(ST100)。CPU間通信部103,203間の通信で、ログ制御系200へ稼働情報の更新通知を送出する(ST111)。ログ制御系200では、予めタイマ(図示していないがCPU201によって実現する)をセットし(ST112)、タイマカウントダウンを行っている(ST113)。ログ制御系200は、システム動作系100からの稼働情報の更新通知を受信し、更新通知を受信した場合、異常検出処理部206は共有メモリ23の稼働内容が期待する値に更新されているか確認する(ST114)。異常検出処理部206は、期待する値に更新されていることでシステム動作系100が正常動作を行っていると判断し、タイマ値をリセットし(ST115)、再度、タイマカウントダウンを行い(ST116)、以下同様に、異常検出処理部206はシステム動作系が正常に稼働しているかどうか監視を継続する。
<Abnormality detection>
The abnormality detection processing unit 206 of the log control system 200 has a function of monitoring the operating state of the system operation system 100 and detecting an abnormality of the system operation system 100. A specific detection method is described below.
FIG. 5 is an example of a sequence in which the log control system 200 monitors the operating state of the system operation system 100. Between the CPUs 101-1 to 101-3 via the communication path 3 and the CPU 201, the inter-CPU communication units 103 and 203 and the shared memory 23 are used, and the system operation system 100 periodically stores the shared memory 23. The operation information is updated (ST100). An update notification of operation information is sent to the log control system 200 through communication between the CPU communication units 103 and 203 (ST111). In the log control system 200, a timer (not shown but realized by the CPU 201) is set in advance (ST112), and a timer countdown is performed (ST113). When the log control system 200 receives the update notification of the operation information from the system operation system 100 and receives the update notification, the abnormality detection processing unit 206 checks whether the operation content of the shared memory 23 has been updated to an expected value. (ST114). The abnormality detection processing unit 206 determines that the system operation system 100 is operating normally by being updated to the expected value, resets the timer value (ST115), and performs timer countdown again (ST116). Similarly, the abnormality detection processing unit 206 continues monitoring whether the system operation system is operating normally.

<ログ制御系200によるシステム動作系100の異常検出>
図6は、システム動作系100が正常に稼働できていない状態を、ログ制御系200が検出するシーケンスの例である。ログ制御系200によるシステム動作系100の稼働状態の監視方法は、図5で示した通りである。ログ制御系200は予めタイマをセットし(ST122)、タイマカウントダウン(ST123)を行っている。システム動作系100が共有メモリ23の内容を更新したが(ST120)、システム動作系100がダウンし、稼働情報の更新通知(ST121)が通知できない状態が発生する。ログ制御系200の異常検出処理部206は、稼働情報の更新通知(ST121)が通知されないため、タイマのタイムアウトを検出し(ST124)、システム動作系の稼働状態が異常と判定し、通信路3を介してシステム動作系100のCPU101の動作を停止ST125させる。その後、異常検出処理部206はプログラム情報読出部207に、プログラム動作情報の強制出力(ST126)、システム動作系100のキャッシュ情報出力(ST127)を行わせる。ST126のプログラム動作情報の強制出力、ST127のシステム動作系100のキャッシュ情報出力については後述する。
<Abnormality detection of system operation system 100 by log control system 200>
FIG. 6 is an example of a sequence in which the log control system 200 detects a state where the system operation system 100 is not operating normally. The method of monitoring the operating state of the system operation system 100 by the log control system 200 is as shown in FIG. The log control system 200 sets a timer in advance (ST122) and performs a timer countdown (ST123). Although the system operation system 100 has updated the contents of the shared memory 23 (ST120), the system operation system 100 goes down and a state in which the operation information update notification (ST121) cannot be notified occurs. The abnormality detection processing unit 206 of the log control system 200 detects a timer timeout (ST124) because the operation information update notification (ST121) is not notified, and determines that the operation state of the system operation system is abnormal. Then, the operation of the CPU 101 of the system operation system 100 is stopped ST125. Thereafter, the abnormality detection processing unit 206 causes the program information reading unit 207 to forcibly output the program operation information (ST126) and to output the cache information of the system operation system 100 (ST127). The forced output of the program operation information in ST126 and the cache information output of the system operation system 100 in ST127 will be described later.

システム動作系100からログ制御系200の稼働情報の更新通知は通知されたが、共有メモリ23の稼働内容が期待する値に更新されていない場合も、異常検出処理部206は、システム動作系100の稼働状態異常と判断する。   Even when the update information of the operation information of the log control system 200 is notified from the system operation system 100, but the operation content of the shared memory 23 is not updated to an expected value, the abnormality detection processing unit 206 also includes the system operation system 100. Is determined to be abnormal.

<システム動作系の自系の異常検出>
図7は、システム動作系100が自系の異常を検出する場合のシーケンスの例であるシステム動作系100の異常検出処理部106は、自身のシステム動作系内の異常を検出する機能を有し、異常検出処理ST130を行う。以下に具体的な検出方法を記載する。
(1)例外などCPU101−1〜101−3のエラー検出情報を取得する。
(2)チェックサムを利用したメモリ内容の監視を行い、メモリ破壊、データの書き込み失敗の検出を行う。
(3)アプリケーションプログラム104で周期的に動作する処理が一定周期以内に動作しているか監視し、処理遅延の検出を行う。
(4)システム動作系メモリ領域21の特定の領域に確認用データを格納し、その領域が期待しない値に書き換わらないか監視する。メモリ破壊、スタックオーバフローの検出を行う。
(5)OS102のスケジューリング情報を参照し、スケジューリングのキュー操作から一定時間以上同一キューがRUN状態になっていないか、周期動作する処理が周期的にRUN状態に遷移しているかを監視する。
上記(1)〜(5)のいずれかの方法で異常を検出した場合、システム動作系100の異常検出処理部106は、CPU間通信部103,203間の通信を介して、ログ制御系200に異常検出通知を送る(ST131)。ログ制御系200では異常検出通知を受信すると、異常検出処理部206が通信路3を介してシステム動作系100のCPU101−1〜101−3の動作を停止(ST132)させる。 その後、異常検出処理部206はプログラム情報読出部207に、プログラム動作情報の強制出力(ST133)、及びシステム動作系100のキャッシュ情報出力(ST134)を行わせる。
<Detection of abnormalities in the system operating system>
FIG. 7 shows an example of a sequence when the system operation system 100 detects an abnormality in its own system. The abnormality detection processing unit 106 of the system operation system 100 has a function of detecting an abnormality in its own system operation system. Then, the abnormality detection process ST130 is performed. A specific detection method is described below.
(1) Acquire error detection information of the CPUs 101-1 to 101-3 such as exceptions.
(2) Monitor memory contents using a checksum and detect memory corruption and data write failure.
(3) Monitors whether processing that operates periodically by the application program 104 operates within a certain period, and detects processing delay.
(4) The confirmation data is stored in a specific area of the system operation system memory area 21, and it is monitored whether the area is rewritten to an unexpected value. Detects memory corruption and stack overflow.
(5) With reference to the scheduling information of the OS 102, it is monitored whether the same queue has been in the RUN state for a certain period of time or more after the scheduling queue operation, and whether the periodically operating process has periodically changed to the RUN state.
When an abnormality is detected by any one of the methods (1) to (5), the abnormality detection processing unit 106 of the system operation system 100 performs the log control system 200 via communication between the inter-CPU communication units 103 and 203. An abnormality detection notification is sent to (ST131). When the log control system 200 receives the abnormality detection notification, the abnormality detection processing unit 206 stops the operations of the CPUs 101-1 to 101-3 of the system operation system 100 via the communication path 3 (ST132). Thereafter, the abnormality detection processing unit 206 causes the program information reading unit 207 to forcibly output the program operation information (ST133) and output the cache information of the system operation system 100 (ST134).

<プログラム動作情報の強制出力(ST126,ST133)>
ログ制御系200の異常検出処理部206は、共有メモリ23にシステム動作系100のプログラム情報書込部107が書き込んだプログラム動作情報を、プログラム情報読出部207により強制的にIOデバイス1へ出力させる。システム動作系100が通信路3および共有するIOデバイス1を使用中の状態でシステム動作系100がダウンした場合は、異常検出処理部206は通信路3のアクセス権または共有するIOデバイスのアクセス権を強制的にログ制御系200に割り当てる処理を行い、プログラム情報読出部207にIOデバイス1へプログラム動作情報を出力させる。
<Forced output of program operation information (ST126, ST133)>
The abnormality detection processing unit 206 of the log control system 200 forcibly causes the program information reading unit 207 to output the program operation information written by the program information writing unit 107 of the system operation system 100 to the shared memory 23 to the IO device 1. . When the system operation system 100 is down while the system operation system 100 is using the communication path 3 and the shared IO device 1, the abnormality detection processing unit 206 has the access right of the communication path 3 or the access right of the shared IO device. Is forcibly assigned to the log control system 200 to cause the program information reading unit 207 to output program operation information to the IO device 1.

強制出力することでシステム動作系100がダウンする直前のプログラム動作情報の取得が可能である。また、IOデバイス1への出力をログ制御系200で処理するため、システム動作系100がダウンしても、IOデバイス1への出力過程で出力処理が停止せず、プログラム動作情報を取得することができる。これに対して従来の技術ではシステム動作系でIOデバイス1への出力処理を行う場合、システム動作系がダウンするとIOデバイス1への出力過程で出力処理が停止し、最後までプログラム動作情報の取得ができないことがある。   By forcibly outputting, it is possible to acquire program operation information immediately before the system operation system 100 goes down. Further, since the output to the IO device 1 is processed by the log control system 200, even if the system operation system 100 goes down, the output process does not stop in the output process to the IO device 1, and program operation information is acquired. Can do. On the other hand, in the conventional technique, when output processing to the IO device 1 is performed in the system operation system, if the system operation system goes down, the output processing is stopped in the output process to the IO device 1, and program operation information is obtained until the end. May not be possible.

<システム動作系100のキャッシュ情報出力(ST127,ST134)>
ログ制御系200の異常検出処理部206は、プログラム情報読出部207に、システム動作系100のCPU101−1〜101−3の2次キャッシュの情報を取得させ、IOデバイス1へ出力させる。このようにST127,ST134では、プログラム動作情報に加え、異常が発生したシステム動作系100におけるCPU101−1〜101−3の2次キャッシュの情報をログ制御系200側からアクセスして異常発生時の状態を収集する。
また、ログ制御系200の異常検出処理部206は、プログラム情報読出部207によって、システム動作系100のCPU101−1〜101−3の1次キャッシュの情報を取得する。
ログ制御系200の異常検出処理部206は、停止させたCPU101−1〜101−3を再度、起動させ、1次キャッシュ読み出し要求を通信路3へ送出し、CPU101−1〜101−3が保持している1次キャッシュ情報をプログラム情報読出部207を介して取得し、異常発生時の状態を収集する。ログ制御系200では、CPU101−1〜101−3の1次キャッシュ情報を取得した後は必要に応じてCPU101−1〜101−3の動作を停止させる。ログ制御系200によるシステム動作系100のCPU101−1〜101−3の1次キャッシュ、2次キャッシュ情報の取得は、システム動作系100に異常が発生した時のみでなく、障害調査や動作内容の確認を行いたいタイミングで、異常検出処理部206がCPU101を停止し、実行する方法としてもよい。
<Cache information output of system operation system 100 (ST127, ST134)>
The abnormality detection processing unit 206 of the log control system 200 causes the program information reading unit 207 to acquire the secondary cache information of the CPUs 101-1 to 101-3 of the system operation system 100 and output the information to the IO device 1. As described above, in ST127 and ST134, in addition to the program operation information, the secondary cache information of the CPUs 101-1 to 101-3 in the system operation system 100 in which an abnormality has occurred is accessed from the log control system 200 side, so Collect state.
Further, the abnormality detection processing unit 206 of the log control system 200 acquires the primary cache information of the CPUs 101-1 to 101-3 of the system operation system 100 through the program information reading unit 207.
The abnormality detection processing unit 206 of the log control system 200 activates the stopped CPUs 101-1 to 101-3 again, sends a primary cache read request to the communication path 3, and the CPUs 101-1 to 101-3 hold it. The obtained primary cache information is acquired through the program information reading unit 207, and the state at the time of occurrence of an abnormality is collected. In the log control system 200, after acquiring the primary cache information of the CPUs 101-1 to 101-3, the operations of the CPUs 101-1 to 101-3 are stopped as necessary. The acquisition of the primary cache and secondary cache information of the CPUs 101-1 to 101-3 of the system operation system 100 by the log control system 200 is performed not only when an abnormality occurs in the system operation system 100, but also for trouble investigation and operation details. The abnormality detection processing unit 206 may stop and execute the CPU 101 at a timing when confirmation is desired.

<IOデバイスアクセス制御>
トレース装置1001を構築するマルチコアプロセッサのハードウェア構成によっては、システム動作系100とログ制御系200とが共通のIOデバイス1へアクセスする場合がある。また、マルチコアプロセッサを搭載したSocでは、IOデバイスは共通の構成が多く用いられる。この場合、共通で使用するIOデバイスへのアクセス競合を防ぐために、システム動作系100のIOアクセス制御部105とログ制御系200のIOアクセス制御部205とで排他制御を実施する。IOアクセス制御部105とIOアクセス制御部205とはそれぞれCPU間通信部103、CPU間通信部203で通信路3を介し、共通に使用するIOデバイス1へのアクセス開始と終了をお互いに通知し、排他制御を行う。共通に使用するIOデバイス1へのアクセス状況をシステム動作系100とログ制御系200とで共有し、IOデバイス1へアクセスする前に確認することで競合を防ぐことができる。
<IO device access control>
Depending on the hardware configuration of the multi-core processor that constructs the trace device 1001, the system operation system 100 and the log control system 200 may access the common IO device 1. Further, in a Soc equipped with a multi-core processor, a common configuration is often used for IO devices. In this case, exclusive control is performed by the IO access control unit 105 of the system operation system 100 and the IO access control unit 205 of the log control system 200 in order to prevent access contention for commonly used IO devices. The IO access control unit 105 and the IO access control unit 205 notify the start and end of access to the commonly used IO device 1 via the communication path 3 by the inter-CPU communication unit 103 and the inter-CPU communication unit 203, respectively. Perform exclusive control. By sharing the access status to the commonly used IO device 1 between the system operation system 100 and the log control system 200 and confirming before accessing the IO device 1, contention can be prevented.

<トレース装置1001のシャットダウン>
トレース装置1001のシャットダウンは、システム動作系100が終了した後、ログ制御系200を終了させる。システム動作系100はCPU間通信を使用しログ制御系200へシャットダウンを通知する。ログ制御系200は、システム動作系100のシャットダウンを受信後、共有メモリ23に格納されているプログラム動作情報を強制的にIOデバイス1へ出力し、ログ制御系200をシャットダウンする。
<Shutdown of trace device 1001>
The shutdown of the trace device 1001 terminates the log control system 200 after the system operation system 100 is terminated. The system operation system 100 notifies the log control system 200 of the shutdown using inter-CPU communication. After receiving the shutdown of the system operation system 100, the log control system 200 forcibly outputs the program operation information stored in the shared memory 23 to the IO device 1 and shuts down the log control system 200.

なお、上記の例ではCPU数が4個のマルチコアプロセッサの例を説明したが、CPU数はこの値に限定されるものではなく、2個以上のCPUを備えたマルチコアプロセッサであってもよい。すなわち、実施の形態1のトレース装置1001は、CPU数が2個以上のマルチコアプロセッサにおいてCPU数を任意の個数に分割し、システム動作系100とログ制御系200を構築するものである。あるいは複数のCPUを有するマルチコアプロセッサの、複数のCPUの一部を用いてシステム動作系100、ログ制御系200を構成しても構わない。例えば5個のCPUを備えたマルチコアプロセッサにおいて、トレース装置1001と同様に、システム動作系100に3個使用し、ログ制御系200に1個使用しても構わない。
また、この実施の形態1では、システム動作系100にOS102が搭載された場合を説明したが、システム動作系100にOS102を搭載しないシステムにおいてもこの実施の形態1の適用が可能である。
さらにログ制御系200は単純な構成とするためOSは搭載しないこととしたが、堅牢性の高いOSを搭載する構成も可能である。
さらにシステム動作系100はSMP構成だけでなく、AMP構成のマルチOS、およびマルチCPU構成も可能である。
In the above example, the example of the multi-core processor having four CPUs has been described. However, the number of CPUs is not limited to this value, and a multi-core processor having two or more CPUs may be used. That is, the trace apparatus 1001 according to the first embodiment divides the number of CPUs into an arbitrary number in a multi-core processor having two or more CPUs, and constructs the system operation system 100 and the log control system 200. Alternatively, the system operation system 100 and the log control system 200 may be configured by using a part of a plurality of CPUs of a multi-core processor having a plurality of CPUs. For example, in a multi-core processor having five CPUs, three may be used for the system operation system 100 and one may be used for the log control system 200, similarly to the trace device 1001.
In the first embodiment, the case where the OS 102 is mounted on the system operation system 100 has been described. However, the first embodiment can be applied to a system in which the OS 102 is not mounted on the system operation system 100.
Further, since the log control system 200 has a simple configuration, the OS is not installed, but a configuration with a highly robust OS is also possible.
Furthermore, the system operation system 100 can have not only an SMP configuration but also a multi-OS configuration with an AMP configuration and a multi-CPU configuration.

実施の形態2.
図8を参照して実施の形態2のトレース装置1002を説明する。
図8は実施の形態2のトレース装置1002の構成図である。図8のトレース装置1002では、実施の形態1で示したマルチコアプロセッサを用いてトレース装置を構築する例において、計算機の仮想化技術のひとつであるハイパーバイザを利用してトレース装置を構築する。トレース装置1002は、トレース装置1001に対して、ログ制御系200にOS202を搭載すると共に、IOデバイス1へのアクセス制御やCPU間通信部を、ハイパーバイザ110を介して実現する。つまりトレース装置1002では、さらにハイパーバイザ110も加えて、システム動作系100、ログ制御系200を構成する。
Embodiment 2. FIG.
A trace device 1002 according to the second embodiment will be described with reference to FIG.
FIG. 8 is a configuration diagram of the trace device 1002 according to the second embodiment. In the trace apparatus 1002 of FIG. 8, in the example of constructing a trace apparatus using the multi-core processor shown in the first embodiment, the trace apparatus is constructed using a hypervisor which is one of computer virtualization technologies. The trace device 1002 mounts an OS 202 in the log control system 200 with respect to the trace device 1001, and realizes access control to the IO device 1 and an inter-CPU communication unit via the hypervisor 110. That is, the trace apparatus 1002 further includes the hypervisor 110 to constitute the system operation system 100 and the log control system 200.

実施の形態1との違いは、上記のようにログ制御系200にOS202を搭載する点と、CPU間通信部とIOデバイスアクセス制御部との代わりにハイパーバイザ110を利用する点であり、運用方法は実施の形態1と同様である。また、ハイパーバイザ110でシステム動作系100とログ制御系200とからのIOデバイス1へのアクセスに優先度をつけ、システム動作系100からのIOデバイスアクセスを優先する方法としてもよい。優先度付きIOデバイスアクセスを行うことで、システム動作系100への影響、すなわちIOデバイスアクセス競合発生時の待ち時間を小さくすることができる。   The difference from the first embodiment is that the OS 202 is installed in the log control system 200 as described above, and that the hypervisor 110 is used instead of the inter-CPU communication unit and the IO device access control unit. The method is the same as in the first embodiment. Alternatively, the hypervisor 110 may prioritize the access to the IO device 1 from the system operation system 100 and the log control system 200 and prioritize the IO device access from the system operation system 100. By performing IO device access with priority, it is possible to reduce the influence on the system operation system 100, that is, the waiting time when an IO device access conflict occurs.

実施の形態3.
図9、図10を参照して実施の形態3のトレース装置1003を説明する。
図9は実施の形態3による、トレース装置1003の構成図である。図9は、実施の形態1で示したマルチコアプロセッサ内にトレース装置を構築する例において、計算機の入出力を監視・制御するプログラムである、モニタプログラム120を利用し、プログラム動作情報を格納する共有メモリ23の領域を保護する構成である。図9のトレース装置1003は、実施の形態1の構成にモニタプログラム120を搭載する構成である。
図10は、システム動作系100のアプリケーションプログラム104が、共有メモリ23へアクセスするフローチャートの例である。モニタプログラム120は、共有メモリ23への不正なアクセスを防止する。共有メモリ23のプログラム動作情報の領域へアクセスするのは、プログラム動作情報を書き出すプログラムが入っているプロセス(プログラム情報書込部107)のみである。図10に示すように、モニタプログラム120は、共有メモリ23へのアクセスを監視し、プログラム動作情報を書き込むプロセスかどうか判定(ST20)する。つまり、モニタプログラム120は、ST20において、共有メモリ23へ書き込みを行うのがプログラム情報書込部107かどうかを判定する。モニタプログラム120は、プログラム動作情報を書き込むプロセス(プログラム情報書込部107)である場合、共有メモリ23へのアクセスを許可(ST21)し、プログラム動作情報を書き込むプロセス(プログラム情報書込部107)でない場合、共有メモリ23へのアクセスを禁止(ST22)する。
Embodiment 3 FIG.
A trace device 1003 according to the third embodiment will be described with reference to FIGS.
FIG. 9 is a configuration diagram of the trace device 1003 according to the third embodiment. FIG. 9 shows an example of constructing a trace device in the multi-core processor shown in the first embodiment, and uses a monitor program 120, which is a program for monitoring and controlling computer input / output, and stores program operation information. In this configuration, the area of the memory 23 is protected. The trace device 1003 in FIG. 9 has a configuration in which the monitor program 120 is installed in the configuration of the first embodiment.
FIG. 10 is an example of a flowchart in which the application program 104 of the system operation system 100 accesses the shared memory 23. The monitor program 120 prevents unauthorized access to the shared memory 23. Only the process (program information writing unit 107) containing the program for writing the program operation information accesses the program operation information area of the shared memory 23. As shown in FIG. 10, the monitor program 120 monitors access to the shared memory 23 and determines whether the process is a process for writing program operation information (ST20). That is, the monitor program 120 determines in ST20 whether or not it is the program information writing unit 107 that writes to the shared memory 23. If the monitor program 120 is a process for writing program operation information (program information writing unit 107), the process for permitting access to the shared memory 23 (ST21) and writing the program operation information (program information writing unit 107) If not, access to the shared memory 23 is prohibited (ST22).

モニタプログラム120(監視プログラム)は、マルチコアプロセッサの有する複数のCPU101−1〜101−3及びCPU201のうち、少なくともいずれかのCPUを用いることにより、共有メモリ23への書き込みを監視して書込みプログラム以外のプログラムからの共有メモリ23への書き込みを禁止する。   The monitor program 120 (monitoring program) is a program other than a writing program that monitors writing to the shared memory 23 by using at least one of the CPUs 101-1 to 101-3 and CPU 201 of the multi-core processor. Writing to the shared memory 23 from the program is prohibited.

プログラム動作情報を書き込むプロセスかどうか判定する方法には、例えばプロセスIDを利用してもよい。モニタプログラム120によって、3rdPartyアプリケーションや、悪意のあるプログラムから共有メモリ23への不要なアクセスを防止でき、トレース装置の堅牢性が向上できる。   For example, a process ID may be used as a method for determining whether or not the process writes program operation information. The monitor program 120 can prevent unnecessary access to the shared memory 23 from a 3rd Party application or a malicious program, thereby improving the robustness of the trace apparatus.

実施の形態4.
図11を参照して実施の形態4のトレース装置1004を説明する。実施の形態1ではマルチコアプロセッサ内にトレース装置を構築する例を示したが、共有メモリ23へアクセス可能な別プロセッサにログ制御系を構築することも可能である。
図11は4個のCPU101−1〜101−4を備えたマルチコアプロセッサにシステム動作系100を構築する。また、通信路3を介して共有メモリ23へアクセス可能なCPU201を備えた別プロセッサに、ログ制御系200を構築する例である。ログ制御系200を構築する別プロセッサに専用のIOデバイス4が存在する場合、システム動作系100とログ制御系200とではIOデバイスへのアクセス競合は発生しないため、IOアクセス制御部は不要である。ログ制御系200を別プロセッサに構築する点と、IOデバイスへのアクセス競合が発生しないハードウェア構成においてIOアクセス制御部が不要であること以外は、実施の形態1と同様である。
Embodiment 4 FIG.
A tracing device 1004 according to the fourth embodiment will be described with reference to FIG. In the first embodiment, an example in which a trace device is built in a multi-core processor has been shown, but it is also possible to build a log control system in another processor that can access the shared memory 23.
In FIG. 11, the system operation system 100 is constructed on a multi-core processor having four CPUs 101-1 to 101-4. Further, in this example, the log control system 200 is constructed in another processor including a CPU 201 that can access the shared memory 23 via the communication path 3. When the dedicated IO device 4 exists in another processor that constructs the log control system 200, the system operation system 100 and the log control system 200 do not cause access competition to the IO device, and thus the IO access control unit is unnecessary. . This embodiment is the same as the first embodiment except that the log control system 200 is constructed in a separate processor and that an IO access control unit is unnecessary in a hardware configuration that does not cause access competition to the IO device.

以上に説明した実施の形態1〜4のトレース装置1001〜1004は、以下の効果を有する。
(1)トレース装置1001〜1004は、CPUリソースや処理時間を要するIOデバイス1への出力処理を、システムが動作するCPUとは別の専用CPUで処理する。このため、システム側(システム動作系100)はプログラム動作情報の出力処理負荷の影響を受けず動作することが可能である。
(2)また、システム動作系100とログ制御系200とは異なるシステムで動作する。よって、プログラム動作情報の取得対象であるシステム動作系100がシステムダウンした状態においても、異なるシステムで動作するログ制御系200により共有メモリ2からプログラム動作情報を取得し、取得したプログラム動作情報をIOデバイス1へ出力することが可能である。
(3)また、ログ制御系200がシステム動作系100の稼働状態を監視し、システム動作系100の異常を検出した場合は、共有メモリ2に書き込まれたプログラム動作情報を強制的にIOデバイス1へ出力する。従って、プログラム動作情報が未出力のためプログラム動作情報を解析できないという事態を防ぐことが可能である。
(4)またシステム動作系100に異常発生時、ログ制御系200からシステム動作系100のCPUを停止さてキャッシュ情報を取得する。このため、異常状態に陥ったシステム動作系100の直前の原因解析が可能である。
(5)共有メモリ23のプログラム動作情報を格納する格納領域へのアクセスは、システム動作系100は書き込みのみ、ログ制御系200は読み込みのみ行う。このため、トレース装置1001〜1004の堅牢性を高めることができる。
(6)実施の形態1〜4のトレース装置では既存のマルチコア技術を使用し、トレース装置1001〜1004を実現しているため、システムのサイズや、部品点数への影響は無く、コストへの影響もない。そのため、マルチコアプロセッサを搭載した既存システムへの導入や、また近年組込み機器において用いられることが多いSoC(System−on−a−chip)やSiP(System In Package)を使用したシステムにも、ハードウェアを変更することなく、導入が可能である。
The tracing devices 1001 to 1004 according to the first to fourth embodiments described above have the following effects.
(1) The trace devices 1001 to 1004 process output processing to the IO device 1 that requires CPU resources and processing time by a dedicated CPU that is different from the CPU on which the system operates. Therefore, the system side (system operation system 100) can operate without being affected by the output processing load of the program operation information.
(2) The system operation system 100 and the log control system 200 operate in different systems. Therefore, even when the system operation system 100 that is the acquisition target of the program operation information is in a system down state, the program operation information is acquired from the shared memory 2 by the log control system 200 operating in a different system, and the acquired program operation information is It is possible to output to the device 1.
(3) When the log control system 200 monitors the operating state of the system operation system 100 and detects an abnormality in the system operation system 100, the program operation information written in the shared memory 2 is forcibly stored in the IO device 1. Output to. Accordingly, it is possible to prevent a situation in which the program operation information cannot be analyzed because the program operation information is not output.
(4) When an abnormality occurs in the system operation system 100, the CPU of the system operation system 100 is stopped from the log control system 200 to acquire cache information. Therefore, it is possible to analyze the cause immediately before the system operation system 100 that has entered an abnormal state.
(5) Access to the storage area for storing program operation information in the shared memory 23 is performed only by the system operation system 100 and only by the log control system 200. For this reason, the robustness of the trace devices 1001 to 1004 can be enhanced.
(6) Since the trace devices according to the first to fourth embodiments use the existing multi-core technology and realize the trace devices 1001 to 1004, the system size and the number of parts are not affected, and the cost is affected. Nor. Therefore, it can be introduced into an existing system equipped with a multi-core processor, or in a system using SoC (System-on-a-chip) or SiP (System In Package), which is often used in embedded devices in recent years. It can be introduced without changing.

以上の実施の形態の説明において、「〜部」として説明したものは、「〜手段」であってもよく、また、「〜ステップ」、「〜手順」、「〜処理」であってもよい。すなわち、「〜部」として説明したものは、ソフトウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実施されても構わない。ファームウェアとソフトウェアは、プログラムとして、磁気ディスク等の記録媒体に記憶される。プログラムはCPUにより読み出され、CPUにより実行される。すなわちプログラムは、以上に述べた「〜部」としてコンピュータを機能させるものである。あるいは、以上に述べた「〜部」の手順や方法をコンピュータに実行させるものである。   In the above description of the embodiment, what has been described as “to part” may be “to means”, and may also be “to step”, “to procedure”, and “to process”. . That is, what has been described as “˜unit” may be implemented by software alone, a combination of software and hardware, or a combination of firmware. Firmware and software are stored in a recording medium such as a magnetic disk as a program. The program is read by the CPU and executed by the CPU. That is, the program causes the computer to function as the “to part” described above. Alternatively, the computer executes the procedure and method of “to part” described above.

以上の実施の形態ではトレース装置を説明したが、トレース装置の動作はコンピュータをトレース装置として機能させるためのプログラムとしても把握できることは以上の説明から当然である。また、トレース装置の各「〜部」の動作は、トレース方法としても把握できることは以上の説明により明らかである。   Although the tracing device has been described in the above embodiment, it is obvious from the above description that the operation of the tracing device can be grasped as a program for causing a computer to function as a tracing device. Further, it is apparent from the above description that the operation of each “˜unit” of the trace apparatus can be grasped as a trace method.

以上、実施の形態を説明したが、これらの実施の形態のうち、2つ以上を組み合わせて実施しても構わない。あるいは、これらの実施の形態のうち、1つを部分的に実施しても構わない。あるいは、これらの実施の形態のうち、2つ以上を部分的に組み合わせて実施しても構わない。なお、本発明はこれらの実施の形態に限定されるものではなく、必要に応じて種々の変形が可能である。   As mentioned above, although embodiment was described, you may implement combining 2 or more of these embodiments. Alternatively, one of these embodiments may be partially implemented. Alternatively, two or more of these embodiments may be partially combined. In addition, this invention is not limited to these embodiment, A various deformation | transformation is possible as needed.

1 IOデバイス、2 メモリ、3 通信路、21 システム動作系メモリ領域、22 ログ制御系メモリ領域、23 共有メモリ、101−1,101−2,101−3,201 マルチコアプロセッサのCPU、102 オペレーティングシステム、103,203 CPU間通信部、104 アプリケーションプログラム、105,205 IOアクセス制御部、106,206 異常検出処理部、100 システム動作系、200 ログ制御系、1001,1002,1003,1004 トレース装置。   1 IO device, 2 memory, 3 communication path, 21 system operation system memory area, 22 log control system memory area, 23 shared memory, 101-1, 101-2, 101-3, 201 CPU of multi-core processor, 102 operating system , 103, 203 CPU communication unit, 104 application program, 105, 205 IO access control unit, 106, 206 abnormality detection processing unit, 100 system operation system, 200 log control system, 1001, 1002, 1003, 1004 trace device.

Claims (9)

複数のCPU(Central Processing Unit)を有するマルチコアプロセッサを搭載するトレース装置において、
前記マルチコアプロセッサの有する前記複数のCPUのうち、1以上の一部のCPUを用いてプログラムを実行し、前記プログラムの動作履歴を示すプログラム動作情報を収集するシステム動作部と、
前記マルチコアプロセッサの有する前記複数のCPUのうち、前記システム動作部が使用するCPUとは異なる1以上のCPUを用いて前記システム動作部の稼働状況に影響されることなく前記システム動作部とは独立に稼働すると共に、前記システム動作部の収集した前記プログラム動作情報をIO(Input/Output)デバイスに出力するログ制御部と
を備えたことを特徴とするトレース装置。
In a trace device equipped with a multi-core processor having a plurality of CPUs (Central Processing Units),
A system operation unit that executes a program using one or more of the CPUs of the plurality of CPUs of the multi-core processor and collects program operation information indicating an operation history of the program;
Of the plurality of CPUs of the multi-core processor, one or more CPUs different from the CPU used by the system operation unit are used and are independent of the system operation unit without being affected by the operating status of the system operation unit. And a log control unit that outputs the program operation information collected by the system operation unit to an IO (Input / Output) device.
前記トレース装置は、さらに、記憶装置を備え、
前記システム動作部は、
前記記憶装置に収集した前記プログラム動作情報を書き込み、
前記ログ制御部は、
前記システム動作部が書き込んだ前記プログラム動作情報を前記記憶装置から読み出し、読み出した前記プログラム動作情報を前記IOデバイスに出力することを特徴とする請求項1記載のトレース装置。
The trace device further includes a storage device,
The system operating unit is
Write the collected program operation information to the storage device,
The log control unit
2. The trace apparatus according to claim 1, wherein the program operation information written by the system operation unit is read from the storage device, and the read program operation information is output to the IO device.
前記記憶装置は、
前記システム動作部と前記ログ制御部とがいずれも使用する共有メモリであることを特徴とする請求項2記載のトレース装置。
The storage device
The trace apparatus according to claim 2, wherein the system operation unit and the log control unit are shared memories.
前記共有メモリの前記プログラム動作情報を書き込む領域は、
前記システム動作部のみが書き込みできることを特徴とする請求項3記載のトレース装置。
The area for writing the program operation information in the shared memory is
4. The trace apparatus according to claim 3, wherein only the system operation unit can write.
前記ログ制御部は、
前記システム動作部の稼働状態を監視し、監視の結果、前記システム動作部に異常が発生したと判断した場合には、前記記憶装置に存在する前記プログラム動作情報を、前記IOデバイスに強制出力することを特徴とする請求項2〜4のいずれかに記載のトレース装置。
The log control unit
The operating state of the system operation unit is monitored, and if it is determined that an abnormality has occurred in the system operation unit as a result of monitoring, the program operation information existing in the storage device is forcibly output to the IO device. The trace device according to any one of claims 2 to 4, wherein
前記システム動作部は、
前記システム動作部の稼働状態を監視し、監視の結果、前記システム動作部に異常が発生したと判断した場合には、異常の発生を前記ログ制御部に通知し、
前記ログ制御部は、
前記システム動作部から異常の発生が通知された場合には、前記記憶装置に存在する前記プログラム動作情報を、前記IOデバイスに強制出力することを特徴とする請求項2〜5のいずれかに記載のトレース装置。
The system operating unit is
When monitoring the operating state of the system operation unit and, as a result of monitoring, determining that an abnormality has occurred in the system operation unit, notify the log control unit of the occurrence of the abnormality,
The log control unit
6. When the occurrence of an abnormality is notified from the system operation unit, the program operation information existing in the storage device is forcibly output to the IO device. Trace device.
前記ログ制御部は、
前記記憶装置に存在する前記プログラム動作情報を、前記IOデバイスに強制出力する場合には、前記システム動作部の使用するCPUにキャッシュされているキャッシュ情報を取得し、取得した前記キャッシュ情報を前記記憶装置に格納することを特徴とする請求項5または6のいずれかに記載のトレース装置。
The log control unit
When the program operation information existing in the storage device is forcibly output to the IO device, the cache information cached in the CPU used by the system operation unit is acquired, and the acquired cache information is stored in the storage device. The trace device according to claim 5, wherein the trace device is stored in the device.
前記システム動作部は、
前記プログラム動作情報を前記共有メモリに書き込むプログラム情報書込み部を備え、
前記トレース装置は、さらに、
前記マルチコアプロセッサの有する前記複数のCPUの少なくともいずれかのCPUを用いることにより、共有メモリへの書き込みを監視して前記プログラム情報書込み部によらない前記共有メモリへの書き込みを禁止する書込監視部を備えたことを特徴とする請求項3または4のいずれかに記載のトレース装置。
The system operating unit is
A program information writing unit for writing the program operation information to the shared memory;
The trace device further comprises:
Write monitoring unit that monitors writing to shared memory and prohibits writing to shared memory without using program information writing unit by using at least one of the plurality of CPUs of the multi-core processor The trace apparatus according to claim 3, further comprising:
複数のCPU(Central Processing Unit)を有するマルチコアプロセッサを搭載するコンピュータであるトレース装置に、
前記マルチコアプロセッサの有する前記複数のCPUのうち、1以上の一部のCPUを用いてプログラムを実行し、前記プログラムの処理状況の履歴を示すプログラム動作情報を収集する収集処理と、
前記マルチコアプロセッサの有する前記複数のCPUのうち、前記収集処理に使用されるCPUとは異なる1以上のCPUを用いて前記収集処理の稼働状況に影響されることなく前記収集処理とは独立に稼働すると共に、前記収集処理によって収集された前記プログラム動作情報をIO(Input/Output)デバイスに出力する出力処理と
を実行させるためのトレースプログラム。
In the trace device which is a computer equipped with a multi-core processor having a plurality of CPUs (Central Processing Units),
A collection process of executing a program using one or more CPUs of the plurality of CPUs of the multi-core processor and collecting program operation information indicating a history of a processing status of the program;
Of the plurality of CPUs of the multi-core processor, one or more CPUs different from the CPU used for the collection process are used, and the operation is independent of the collection process without being affected by the operation status of the collection process. And a trace program for executing an output process for outputting the program operation information collected by the collection process to an IO (Input / Output) device.
JP2013260733A 2013-12-18 2013-12-18 Trace device and trace program Pending JP2015118493A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013260733A JP2015118493A (en) 2013-12-18 2013-12-18 Trace device and trace program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013260733A JP2015118493A (en) 2013-12-18 2013-12-18 Trace device and trace program

Publications (1)

Publication Number Publication Date
JP2015118493A true JP2015118493A (en) 2015-06-25

Family

ID=53531173

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013260733A Pending JP2015118493A (en) 2013-12-18 2013-12-18 Trace device and trace program

Country Status (1)

Country Link
JP (1) JP2015118493A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017058751A (en) * 2015-09-14 2017-03-23 Necプラットフォームズ株式会社 Information processor, log acquisition method and log acquisition program
KR20180028570A (en) * 2016-09-08 2018-03-19 현대오트론 주식회사 Multi core system and method of driving the same
JP2019077078A (en) * 2017-10-23 2019-05-23 セイコーエプソン株式会社 Printer and control method for printer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017058751A (en) * 2015-09-14 2017-03-23 Necプラットフォームズ株式会社 Information processor, log acquisition method and log acquisition program
KR20180028570A (en) * 2016-09-08 2018-03-19 현대오트론 주식회사 Multi core system and method of driving the same
JP2019077078A (en) * 2017-10-23 2019-05-23 セイコーエプソン株式会社 Printer and control method for printer

Similar Documents

Publication Publication Date Title
JP5423871B2 (en) Information processing apparatus, information processing method, and program
JP4222370B2 (en) Program for causing a computer to execute a debugging support apparatus and a debugging processing method
JP5430756B2 (en) Providing state memory in the processor for system management mode
US8850262B2 (en) Inter-processor failure detection and recovery
JP6399916B2 (en) Information processing apparatus and control method thereof
US9229820B2 (en) Information processing device with memory dump function, memory dump method, and recording medium
US9146818B2 (en) Memory degeneracy method and information processing device
JP2010086364A (en) Information processing device, operation state monitoring device and method
JP2015118493A (en) Trace device and trace program
JP4322240B2 (en) Reboot method, system and program
JP2007334403A (en) System and method for supporting trouble of computer system
US20160283250A1 (en) Boot controlling processing apparatus
CN115576734B (en) Multi-core heterogeneous log storage method and system
JP5427814B2 (en) Failure analysis information collection device
JP6645348B2 (en) Information processing apparatus, information processing program, and information processing method
JP6632416B2 (en) Shared memory control circuit and shared memory control method
JP4867896B2 (en) Information processing system
JP5163128B2 (en) Procedure calling method, procedure calling program, recording medium, and multiprocessor in shared memory multiprocessor
JP5877533B2 (en) Computer apparatus and computer apparatus control method
JP4633553B2 (en) Debug system, debugging method and program
US7877533B2 (en) Bus system, bus slave and bus control method
JP2008287512A (en) Computer, distributed data processing system, data processing method and program
JP2009223841A (en) Instruction log acquisition program and virtual machine system
JP2017151511A (en) Information processing device, operation log acquisition method and operation log acquisition program
JP2022107229A (en) Information processing apparatus, control method, and control program