JP2013196241A - Information processor and log acquisition method - Google Patents
Information processor and log acquisition method Download PDFInfo
- Publication number
- JP2013196241A JP2013196241A JP2012061424A JP2012061424A JP2013196241A JP 2013196241 A JP2013196241 A JP 2013196241A JP 2012061424 A JP2012061424 A JP 2012061424A JP 2012061424 A JP2012061424 A JP 2012061424A JP 2013196241 A JP2013196241 A JP 2013196241A
- Authority
- JP
- Japan
- Prior art keywords
- virtual
- memory
- log
- information
- access 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
Links
Images
Abstract
Description
本発明は、情報処理装置およびログ取得方法に関する。 The present invention relates to an information processing apparatus and a log acquisition method.
プログラム開発において、調査・解析が長期化する障害の一つに不正なメモリ操作等によるデータの改変、いわゆるメモリ破壊がある。
監視するべきメモリアドレスが特定できるケースでは、そのアドレスに着目して動作ログを収集・蓄積して解析できるが、バッファのように動的にリソースを獲得して使用するようなメモリの場合は、メモリアドレスが特定できず、動的に使用するメモリリソースを使用する全てのプログラムを対象に調査する必要がある。また、ログ領域の制約があるため、調査対象をプログラム1つに絞って動作確認を繰り返し、原因元をつぶし込む調査方法を採っている。
In program development, one of the obstacles that makes investigation and analysis longer is data modification due to illegal memory operations, so-called memory destruction.
In the case where the memory address to be monitored can be identified, it is possible to analyze by collecting and accumulating the action log focusing on that address, but in the case of memory that dynamically acquires and uses resources like a buffer, It is necessary to investigate all programs that cannot use memory addresses and use dynamically used memory resources. In addition, since there is a restriction on the log area, an investigation method is adopted in which the investigation target is narrowed down to one program and the operation check is repeated to collapse the cause.
マルチプロセスや、マルチスレッド等、複数のプロセスを制御するようなプログラムでは、個々のプロセスでメモリ操作を行うため、一つのスレッドの中身を追いかけていても、問題(障害)を特定出来ないケースがあった。 In a program that controls multiple processes, such as multi-processes and multi-threads, memory operations are performed by individual processes, so it may not be possible to identify the problem (failure) even if you follow the contents of a single thread. there were.
また、Central Processing Unit(CPU)以外にもメモリ操作が出来るデバイス、例えばDirect Memory Access(DMA)コントローラ等が存在するため、調査する範囲が広域化し、原因を特定する有効な手段が存在しない。 In addition to the Central Processing Unit (CPU), there are devices that can perform memory operations, such as a Direct Memory Access (DMA) controller, so that the range to be investigated is widened and there is no effective means for identifying the cause.
1つの側面では、本発明は、メモリ破壊の原因を容易に判断可能とすることを目的とする。 In one aspect, an object of the present invention is to make it possible to easily determine the cause of memory corruption.
実施の形態の情報処理装置は、処理装置と、仮想マシンに割り当てられた仮想メモリを含むメモリと、を備える。
前記処理装置は、仮想処理部と、仮想デバイス部と、ログ出力制御部と、を備える。
An information processing apparatus according to an embodiment includes a processing device and a memory including a virtual memory allocated to a virtual machine.
The processing apparatus includes a virtual processing unit, a virtual device unit, and a log output control unit.
仮想処理部は、プログラムを実行し、前記仮想メモリに対して書き込みを行い、前記仮想メモリに対する書き込みに関する第1のメモリアクセス情報を出力する。
仮想デバイス部は、前記処理部から書き込み命令を受信し、前記仮想メモリに対して書き込みを行い、前記仮想メモリに対する書き込みに関する第2のメモリアクセス情報を出力する。
The virtual processing unit executes a program, writes to the virtual memory, and outputs first memory access information related to writing to the virtual memory.
The virtual device unit receives a write command from the processing unit, writes to the virtual memory, and outputs second memory access information related to writing to the virtual memory.
ログ出力制御部は、前記第1および前記第2のメモリアクセス情報を受信し、前記第1および前記第2のメモリアクセス情報をログとして出力する。 The log output control unit receives the first and second memory access information, and outputs the first and second memory access information as a log.
実施の形態の情報処理装置によれば、メモリ破壊の原因を容易に判断することが出来る。 According to the information processing apparatus of the embodiment, the cause of memory destruction can be easily determined.
以下、図面を参照しながら実施の形態について説明する。
図1は、実施の形態に係る情報処理装置の構成図である。
情報処理装置101は、ホストOperating System(OS)201、仮想マシン301を備える。
Hereinafter, embodiments will be described with reference to the drawings.
FIG. 1 is a configuration diagram of an information processing apparatus according to an embodiment.
The
情報処理装置101は、例えば、パーソナルコンピュータ等のコンピュータである。
ホストOS201は、情報処理装置101にインストールされたOSである。
The
The host OS 201 is an OS installed in the
仮想マシン301は、ホストOS201上で動作する仮想的なコンピュータであり、コンピュータをエミュレートするソフトウェアにより実現される。仮想マシン301は、情報処理装置101が備えるCentral Processing Unit(CPU)がコンピュータをエミュレートするソフトウェアを読み出して、実行することにより実現される。
The
仮想マシン301は、仮想CPU311、仮想DMAコントローラ321、仮想デバイス331、仮想アービター341、ログ出力制御部351、仮想メモリ361、および仮想バス371を備える。
The
仮想CPU311、仮想DMAコントローラ321、仮想デバイス331、仮想アービター341、ログ出力制御部351、および仮想メモリ361は、仮想バス371を介して接続されている。
The
仮想CPU311は、プログラムを仮想メモリ361から読み出して実行し、仮想メモリへのアクセス(書き込みおよび読み出し)を行う。
The
仮想CPU311は、仮想DMAコントローラ321および仮想デバイス331に仮想メモリ361へのアクセス命令を出力する。
The
仮想CPU311は、ログ出力制御部351に制御情報を出力する。制御情報には、監視先頭アドレス、監視サイズ、制御フラグが含まれる。
The
仮想CPU311は、仮想メモリ361に対して書き込みを行う際の情報(メモリアクセス情報)を出力する。仮想CPU311が出力するメモリアクセス情報には、書込みが発生したときのプログラムカウンタ(PC)値、命令コード、ライトアドレス、およびライトデータが含まれる。
The
PC値は、仮想CPU311が次に実行する命令が格納されたメモリのアドレスである。
命令コードは、仮想CPU311が実行した命令コードである。
The PC value is an address of a memory in which an instruction to be executed next by the
The instruction code is an instruction code executed by the
ライトアドレスは、書き込み先の仮想メモリ361のアドレスである。
ライトデータは、書き込んだデータの値である。
The write address is the address of the
Write data is the value of the written data.
仮想DMAコントローラ321は、仮想CPU311から仮想メモリ361へのアクセス命令を受信し、仮想CPU311を介さずに仮想メモリ361へのアクセス(書き込みおよび読み出し)を行う。仮想DMAコントローラ321は、仮想メモリ361に対して書き込みを行う際の情報(メモリアクセス情報)を出力する。仮想DMAコントローラ321が出力するメモリアクセス情報には、ライトアドレス、ライトデータ、データサイズ、アクセス元情報、およびソースの行番号が含まれる。
The
ライトアドレスは、書き込み先の仮想メモリ361のアドレスである。
ライトデータは、書き込んだデータの値である。
データサイズは、ライトデータのサイズである。
The write address is the address of the
Write data is the value of the written data.
The data size is the size of the write data.
アクセス元情報は、例えば、デバイス名などの仮想DMAコントローラ321を示す情報である。
ソースの行番号は、仮想メモリ361への書き込み時において実行された仮想DMAコントローラ321をエミュレートしているプログラムの行番号である。
The access source information is information indicating the
The source line number is the line number of the program emulating the
仮想デバイス331は、仮想マシン301が備える周辺デバイス(例えば、Serial Advanced Technology Attachment(SATA)コントローラ)である。仮想デバイス331は、仮想CPU311から仮想メモリ361へのアクセス命令を受信し、仮想CPU311を介さずに仮想メモリ361へのアクセス(書き込みおよび読み出し)を行う。
The
仮想デバイス331は、仮想メモリ361に対して書き込みを行う際の情報(メモリアクセス情報)を出力する。
The
仮想デバイス331が出力するメモリアクセス情報には、ライトアドレス、ライトデータ、データサイズ、アクセス元情報(例えば、デバイス名などの仮想デバイス331を示す情報)、およびソースの行番号が含まれる。
The memory access information output by the
ライトアドレスは、書き込み先の仮想メモリ361のアドレスである。
ライトデータは、書き込んだデータの値である。
データサイズは、ライトデータのサイズである。
The write address is the address of the
Write data is the value of the written data.
The data size is the size of the write data.
アクセス元情報は、例えば、デバイス名などの仮想デバイス331を示す情報である。
ソースの行番号は、仮想メモリ361への書き込み時において実行された仮想デバイス331をエミュレートしているプログラムの行番号である。
The access source information is information indicating the
The source line number is the line number of the program emulating the
仮想アービター341は、仮想CPU311、仮想DMAコントローラ321、および仮想デバイス311に対する仮想メモリ361への書き込みの許可制御を行う。
The
ログ出力制御部351は、受信したメモリアクセス情報をログ401として出力する。出力されたログ401は、例えば、情報処理装置が備える記憶装置、例えば、磁気ディスク装置や半導体記憶装置に格納される。また、ログ401の内容は、以前に出力されたログに追加されていく。
The log
情報処理装置101が備える記憶装置に格納されたログは、情報処理装置101が出力指示を受けたことを契機として、情報処理装置101が備えるディスプレイ装置等に表示される。
The log stored in the storage device included in the
仮想メモリ361は、仮想マシン301に割り当てられた仮想メモリである。仮想メモリ361は、情報処理装置101が備える(物理)メモリの一部である。
The
図2は、実施の形態に係るログ出力制御部の構成図である。
ログ出力制御部351は、CPUインターフェース352、監視アドレス先頭レジスタ353、監視サイズレジスタ354、ログ出力制御フラグレジスタ355、およびログ出力制御回路356を備える。
FIG. 2 is a configuration diagram of a log output control unit according to the embodiment.
The log
CPUインターフェース352は、仮想CPU311から制御情報を受信する。制御情報には、監視先頭アドレス、監視サイズ、制御フラグが含まれる。
The
監視アドレス先頭レジスタ353は、ログ出力制御回路356が監視する仮想メモリ361の領域の先頭のアドレス値(監視先頭アドレス)を格納する。
The monitoring address head register 353 stores the head address value (monitoring head address) of the area of the
監視サイズレジスタ354は、ログ出力制御回路356が監視する仮想メモリ361の領域のサイズ情報(監視サイズ)を格納する。
The monitor size register 354 stores size information (monitor size) of the area of the
ログ出力制御フラグレジスタ355は、ログ出力制御回路356の動作を制御する制御フラグを格納する。
The log output control flag register 355 stores a control flag for controlling the operation of the log
ログ出力制御回路356は、仮想CPU311、仮想DMAコントローラ321、および仮想デバイス331からメモリアクセス情報を受信する。
The log
ログ出力制御回路356は、ログ出力制御フラグレジスタ355を参照し、ログ出力制御フラグレジスタ355に格納された制御フラグに応じて、ログ401を出力するか否か判定する。例えば、ログ出力制御フラグレジスタ355に制御フラグとして“1”が格納されている場合、ログ出力制御回路356はログを出力すると判定し、“0”が格納されている場合、ログ出力制御回路356はログを出力しないと判定する。
The log
ログ出力制御回路356は、ログを出力すると判定した場合、監視アドレス先頭レジスタ353および監視サイズレジスタ354を参照し、監視先頭アドレスおよび監視サイズを取得する。ログ出力制御回路356は、メモリアクセス情報に含まれるライトアドレスが監視先頭アドレスから監視アドレスに監視サイズを加算した値の範囲(監視領域)に含まれるか否か判定する。そして、ライトアドレスが監視領域に含まれている場合、メモリアクセス情報をログ401として出力する。尚、監視先頭アドレスおよび監視サイズがNULLの場合、すなわち監視領域が指定されていない場合、ログ出力制御回路356は、メモリアクセス情報をログ401として出力する。
When the log
図3は、ログの例を示す図である。
図3に示すログ401の1および2行目には仮想CPU311から受信したアクセス情報が記述され、3および4行目には仮想DMAコントローラ321から受信したアクセス情報が記述され、5〜7行目には仮想デバイス331から受信したアクセス情報が記述されている。
FIG. 3 is a diagram illustrating an example of a log.
The access information received from the
ログ401の1および2行目には、プログラムカウンタ(PC)値、命令コード、ライトアドレス、およびライトデータが記述されている。PC、op_code、addr、およびvalは、それぞれ、PC値、命令コード、ライトアドレス、およびライトデータを示す。
In the first and second lines of the
ログ401の3〜7行目には、ライトアドレス、ライトデータ、データサイズ、アクセス元情報、およびソースの行番号が記述されている。addr、val、およびlenは、それぞれ、ライトアドレス、ライトデータ、およびデータサイズを示す。
In lines 3 to 7 of the
尚、アクセス元情報として記述されているdev.cは、仮想デバイス331を示し、dma.cは仮想DMAコントローラ321を示している。
Note that dev.c described as access source information indicates a
次に、仮想マシン301で実行する検証対象となるプログラム(被検証対象プログラム)について説明する。
Next, a verification target program (program to be verified) executed by the
被検証対象プログラムには、ログ出力制御部351へ制御情報を出力する出力制御指示が含まれている。
The program to be verified includes an output control instruction for outputting control information to the log
図4は、出力制御指示のライブラリを示す図である。
出力制御指示(log_ctl)には、引数として、監視先頭アドレス(start_addr)、監視サイズ(size)、制御フラグ(trace_flag)が与えられる。
FIG. 4 is a diagram showing a library of output control instructions.
In the output control instruction (log_ctl), a monitoring head address (start_addr), a monitoring size (size), and a control flag (trace_flag) are given as arguments.
監視先頭アドレスは、ログ出力制御回路356が監視する仮想メモリ361の領域の先頭のアドレス値である。
The monitoring head address is the head address value of the area of the
監視サイズは、ログ出力制御回路356が監視する仮想メモリ361の領域のサイズである。
制御フラグは、ログ出力制御回路356の動作を制御するフラグである。
The monitoring size is the size of the area of the
The control flag is a flag that controls the operation of the log
log_ctlは、以下の3つのステップを実行する。
(1)ログ出力制御部351の監視アドレス先頭レジスタ353に監視先頭アドレス(start_addr)を書き込む。
(2)ログ出力制御部351の監視サイズレジスタ354に監視サイズ(size)を書き込む。
(3)ログ出力制御部351のログ出力制御フラグレジスタ355に制御フラグ(trace_flag)を書き込む。
log_ctl performs the following three steps:
(1) Write the monitoring head address (start_addr) to the monitoring address head register 353 of the log
(2) The monitoring size (size) is written in the
(3) Write a control flag (trace_flag) to the log output
出力制御指示(log_ctl)を用いた実施の形態に係るログ取得の方法について説明する。ユーザは、log_ctlを呼び出す関数を被検証プログラムに追加する。 A log acquisition method according to the embodiment using the output control instruction (log_ctl) will be described. The user adds a function that calls log_ctl to the program to be verified.
ログ出力制御回路356にログの出力を開始させたい場合、すなわちログ出力開始指示を行いたい場合、log_ctlの引数の制御フラグに“1”を与える。
When the log
ログ出力制御回路356にログの出力を終了させたい場合、すなわち、ログ出力終了指示を行いたい場合、log_ctlの引数の制御フラグに“0”を与える。
ユーザは、被検証対象プログラムの調査対象箇所(例えば、メモリ破壊の被疑箇所)の開始ステップの前に、「ログ出力開始指示」を予め記述しておく。
When it is desired to end the log output to the log
The user describes a “log output start instruction” in advance before the start step of the investigation target portion (for example, the suspected portion of memory corruption) of the program to be verified.
また、ユーザは、被検証対象プログラムの調査対象箇所(例えば、メモリ破壊の被疑箇所)の終了ステップの前に、「ログ出力終了指示」を予め記述しておく。 In addition, the user describes in advance a “log output end instruction” before the end step of the investigation target portion (for example, the suspected portion of memory destruction) of the program to be verified.
「ログ出力開始指示」および「ログ出力終了指示」では、監視先頭アドレス(start_addr)として、動的に獲得して使用するメモリリソースを特定する変数を与え、監視サイズ(size)として、監視したい領域のサイズを与える。 In "Log output start instruction" and "Log output end instruction", the monitoring start address (start_addr) is given a variable that specifies the memory resource to be dynamically acquired and used, and the monitoring size (size) is the area to be monitored Give the size.
例えば、「ログ出力開始指示」を実行させたい場合、被検証対象プログラムの調査対象箇所の開始ステップの前に、下記命令を記述する。
log_ctl(&variable, size, 1)
For example, when it is desired to execute “log output start instruction”, the following command is described before the start step of the investigation target portion of the program to be verified.
log_ctl (& variable, size, 1)
“&variable”は監視先頭アドレス、 “size”は監視サイズ、 “1”は制御フラグを示す。“&variable”は、被検証プログラムで確保された仮想メモリ361の領域の先頭のアドレスを示す。
“& Variable” indicates the monitoring start address, “size” indicates the monitoring size, and “1” indicates the control flag. “& Variable” indicates the head address of the area of the
また、監視する領域が特定できていない場合、ユーザは被検証プログラムに「ログ出力開始指示」として
log_ctl(NULL, NULL, 1)
を記述し、
「ログ出力終了指示」として
log_ctl(NULL, NULL, 0)
を記述する。
In addition, when the area to be monitored cannot be specified, the user gives a “log output start instruction” to the program to be verified.
log_ctl (NULL, NULL, 1)
And write
As "log output end instruction"
log_ctl (NULL, NULL, 0)
Is described.
このように、監視先頭アドレス(start_addr)および監視サイズ(size)にNULLを指定することで、ログ出力制御回路356は、受信した全てのメモリアクセス情報をログ401として出力する。
Thus, by specifying NULL for the monitoring head address (start_addr) and the monitoring size (size), the log
また、被検証プログラムにおいて、「malloc」や「free」等の関数を用いて動的にメモリ領域の確保および解放された領域に対するログをログ出力制御回路356に出力させたい場合、下記のような命令を被検証プログラムに追加する。
ptr = malloc(SIZE);
log_ctl( ptr, SIZE, 1)
…
…
log_ctl( ptr, SIZE, 0)
free(ptr)
Further, in the program to be verified, when it is desired that the log
ptr = malloc (SIZE);
log_ctl (ptr, SIZE, 1)
...
...
log_ctl (ptr, SIZE, 0)
free (ptr)
上記命令について説明すると、先ずmalloc(SIZE)により、サイズが“SIZE”である領域が確保され、該領域の先頭のアドレスを示すポインタがptrに格納される。 The above instruction will be described. First, an area having a size of “SIZE” is secured by malloc (SIZE), and a pointer indicating the head address of the area is stored in ptr.
log_ctl( ptr, SIZE, 1)により、「ログ出力開始指示」が行われ、ログ出力制御回路356は、ptrからSIZE分の領域に対するメモリアクセス情報をログとして出力する。
“Log output start instruction” is performed by log_ctl (ptr, SIZE, 1), and the log
log_ctl( ptr, SIZE, 0)により、「ログ出力終了指示」が行われ、ログ出力制御回路356は、ptrからSIZE分の領域に対するメモリアクセス情報の出力を停止する。
“Log output end instruction” is performed by log_ctl (ptr, SIZE, 0), and the log
free(ptr)により、ptrで示される領域が解放される。
上記のような、出力制御指示(log_ctl)を被検証プログラムに記述することで、動的に確保された領域に対する監視を行うことが出来る。
The area indicated by ptr is released by free (ptr).
By describing the output control instruction (log_ctl) in the program to be verified as described above, it is possible to monitor the dynamically secured area.
図5Aは、仮想CPUの処理のフローチャートである。
仮想CPU311は、被検証対象プログラムに記述された命令をリードし、該命令を実行する(ステップS601)。命令としては、例えば、上述の出力制御指示、仮想メモリ361に対するデータの書き込み、仮想DMAコントローラ321または仮想デバイス331へ仮想メモリ361へのアクセス命令がある。尚、仮想CPU311は、仮想メモリ361に対して書き込みを行う場合、メモリアクセス情報を出力する。
FIG. 5A is a flowchart of processing of the virtual CPU.
The
仮想CPU311は、割り込み処理等を行い(ステップS602)、ディスパッチ処理(ステップS603)を行う。
The
図5Bは、仮想DMAコントローラの処理のフローチャートである。
仮想DMAコントローラ321は、仮想CPU311から仮想メモリ361へのアクセス命令を受信し、転送元の仮想メモリ361からデータをリードし、転送先の仮想メモリ361へデータを書き込む。尚、仮想DMAコントローラ321は、仮想メモリ361に対して書き込みを行う場合、メモリアクセス情報を出力する。仮想DMAコントローラ321は、割り込み処理等を行う(ステップS611)。
FIG. 5B is a flowchart of processing of the virtual DMA controller.
The
図5Cは、仮想デバイスの処理のフローチャートである。
仮想デバイス331は、仮想CPU311から仮想メモリ361へのアクセス命令を受信し、転送先の仮想メモリ361へデータを書き込み、割り込み処理等を行う(ステップS621)。尚、仮想デバイス331は、仮想メモリ361に対して書き込みを行う場合、メモリアクセス情報を出力する。
FIG. 5C is a flowchart of virtual device processing.
The
図6は、実施の形態に係るログ出力制御部の処理のフローチャートである。
ステップS501において、ログ出力制御回路356は、仮想CPU311、仮想DMAコントローラ321、または仮想デバイス311からメモリアクセス情報を受信する。
FIG. 6 is a flowchart of processing of the log output control unit according to the embodiment.
In step S <b> 501, the log
ステップS502において、ログ出力制御回路356は、ログ出力制御フラグ355に格納されている制御フラグが“1”であるか否かチェックする。制御フラグが“1”である場合、制御はステップS503に進み、制御フラグが“0”である場合、制御はステップS501に戻る。また、制御フラグが“0”である場合、ログ出力制御回路356は、受信したアクセス情報を破棄する。
In step S502, the log
ステップS503において、ログ出力制御回路356は、メモリアクセス情報に含まれるライトアドレスを参照する。
In step S503, the log
ステップS504において、ログ出力制御回路356は、監視アドレス先頭レジスタ353および監視サイズレジスタ354を参照し、監視先頭アドレスおよび監視サイズを取得する。そして、ログ出力制御回路356は、メモリアクセス情報に含まれるライトアドレスが監視先頭アドレスから監視アドレスに監視サイズを加算した値の範囲(監視領域)に含まれるか否か判定する。
In step S504, the log
ライトアドレスが監視領域に含まれている場合、制御はステップS505に進み、ライトアドレスが監視領域外の場合、制御はステップS501に戻る。また、監視先頭アドレスおよび監視サイズがNULLの場合、すなわち監視領域が指定されていない場合、制御はステップS505に進む。 If the write address is included in the monitoring area, control proceeds to step S505, and if the write address is outside the monitoring area, control returns to step S501. If the monitoring head address and the monitoring size are NULL, that is, if the monitoring area is not specified, the control proceeds to step S505.
ステップS505において、ログ出力制御回路356は、メモリアクセス情報をログ401として出力する。
In step S505, the log
実施の形態の情報処理装置によれば、メモリにアクセスする全てのデバイス(CPU、DMAコントローラ等)をトレースし、1つのログファイルに出力している。ユーザは、該ログファイルを検証することで破壊元を容易に判断することが出来、障害解析時間を短縮することが出来る。 According to the information processing apparatus of the embodiment, all devices (CPU, DMA controller, etc.) that access the memory are traced and output to one log file. The user can easily determine the destruction source by verifying the log file, and the failure analysis time can be shortened.
実施の形態の情報処理装置によれば、ログ出力制御部への制御情報で仮想メモリの監視領域を限定することで、ログ出力制御部が出力するログのサイズが小さくなる。また、ログ出力制御部の処理が限定化するので、情報処理装置101の負荷が小さくなり、エミュレーション時間が大きく増えないという効果がある。
According to the information processing apparatus of the embodiment, the size of the log output by the log output control unit is reduced by limiting the monitoring area of the virtual memory with the control information to the log output control unit. In addition, since the processing of the log output control unit is limited, there is an effect that the load on the
図7は、情報処理装置(コンピュータ)の構成図である。
実施の形態の情報処理装置101は、例えば、図7に示すような情報処理装置1によって実現される。
FIG. 7 is a configuration diagram of the information processing apparatus (computer).
The
情報処理装置1は、CPU2、メモリ3、入力部4、出力部5、記憶部6、記録媒体駆動部7、およびネットワーク接続部8を備え、それらはバス9により互いに接続されている。
The
CPU2は、情報処理装置1全体を制御する中央処理装置である。CPU2は、仮想CPU311、仮想DMAコントローラ321、仮想デバイス331、仮想アービター341、ログ出力制御部351に対応する。
The
メモリ3は、プログラム実行の際に、記憶部6(あるいは可搬記録媒体10)に記憶されているプログラムあるいはデータを一時的に格納するRead Only Memory(ROM)やRandom Access Memory(RAM)等のメモリである。CPU2は、メモリ3を利用してプログラムを実行することにより、上述した各種処理を実行する。
The memory 3 is a Read Only Memory (ROM) or Random Access Memory (RAM) that temporarily stores a program or data stored in the storage unit 6 (or the portable recording medium 10) during program execution. It is memory. The
この場合、可搬記録媒体10等から読み出されたプログラムコード自体が実施の形態の機能を実現する。
In this case, the program code itself read from the
入力部4は、例えば、キーボード、マウス、タッチパネル等である。
出力部5は、例えば、ディスプレイ、プリンタ等である。
記憶部6は、例えば、磁気ディスク装置、光ディスク装置、テープ装置等である。情報処理装置1は、記憶部6に、上述のプログラムとデータを保存しておき、必要に応じて、それらをメモリ3に読み出して使用する。
The
The
The
メモリ3は、仮想メモリ361の領域を含む。
記録媒体駆動部7は、可搬記録媒体10を駆動し、その記録内容にアクセスする。可搬記録媒体としては、メモリカード、フレキシブルディスク、Compact Disk Read Only Memory(CD-ROM)、光ディスク、光磁気ディスク等、任意のコンピュータ読み取り可能な記録媒体が用いられる。ユーザは、この可搬記録媒体10に上述のプログラムとデータを格納しておき、必要に応じて、それらをメモリ3に読み出して使用する。
The memory 3 includes an area of the
The recording
ネットワーク接続部8は、LAN等の任意の通信ネットワークに接続され、通信に伴うデータ変換を行う。 The network connection unit 8 is connected to an arbitrary communication network such as a LAN, and performs data conversion accompanying communication.
101 情報処理装置
201 ホストOS
301 仮想マシン
311 仮想CPU
321 仮想DMA
331 仮想デバイス
341 仮想アービター
351 ログ出力制御部
352 CPUインターフェース
353 監視アドレス先頭レジスタ
354 監視サイズレジスタ
355 ログ出力制御フラグレジスタ
356 ログ出力制御回路
361 仮想メモリ
371 仮想バス
101
301
321 Virtual DMA
331
Claims (6)
前記処理装置は、
プログラムを実行し、前記仮想メモリに対して書き込みを行い、前記仮想メモリに対する書き込みに関する第1のメモリアクセス情報を出力する仮想処理部と、
前記仮想処理部から書き込み命令を受信し、前記仮想メモリに対して書き込みを行い、前記仮想メモリに対する書き込みに関する第2のメモリアクセス情報を出力する仮想デバイス部と、
前記第1および前記第2のメモリアクセス情報を受信し、前記第1および前記第2のメモリアクセス情報をログとして出力するログ出力制御部と、
を備えることを特徴とする情報処理装置。 An information processing apparatus comprising: a processing device; and a memory including a virtual memory allocated to a virtual machine,
The processor is
A virtual processing unit that executes a program, writes to the virtual memory, and outputs first memory access information related to writing to the virtual memory;
A virtual device unit that receives a write command from the virtual processing unit, writes to the virtual memory, and outputs second memory access information related to writing to the virtual memory;
A log output control unit that receives the first and second memory access information and outputs the first and second memory access information as a log;
An information processing apparatus comprising:
前記仮想処理部は、前記ログ出力制御部が監視する仮想メモリの領域を示す領域情報を出力し、
前記ログ出力制御部は、前記領域情報を格納し、前記ライトアドレスが前記領域情報で示される領域内である場合に、前記1および前記第2のメモリアクセス情報を出力することを特徴とする請求項1記載の情報処理装置。 The first and second memory access information includes a write address for writing to the virtual memory,
The virtual processing unit outputs area information indicating a virtual memory area monitored by the log output control unit,
The log output control unit stores the area information, and outputs the first and second memory access information when the write address is within an area indicated by the area information. Item 6. The information processing apparatus according to Item 1.
前記第2のメモリアクセス情報は、ライトデータ、該ライトデータのサイズ、および前記仮想デバイスを示す情報をさらに含むことを特徴とする請求項2または3記載の情報処理装置。 The first memory access information further includes a program counter value, an instruction code, and write data,
The information processing apparatus according to claim 2, wherein the second memory access information further includes information indicating write data, a size of the write data, and the virtual device.
プログラムを実行し、前記仮想メモリに対して書き込みを行い、前記仮想メモリに対する書き込みに関する第1のメモリアクセス情報を出力し、
前記仮想メモリに対して書き込みを行い、前記仮想メモリに対する書き込みに関する第2のメモリアクセス情報を出力し、
前記第1および前記第2のメモリアクセス情報を受信し、前記第1および前記第2のメモリアクセス情報をログとして出力する
ことを特徴とするログ取得方法。 A log acquisition method executed by an information processing apparatus including a memory including a virtual memory allocated to a virtual machine,
Executing a program, writing to the virtual memory, outputting first memory access information relating to writing to the virtual memory;
Writing to the virtual memory, and outputting second memory access information related to writing to the virtual memory;
A log acquisition method comprising: receiving the first and second memory access information and outputting the first and second memory access information as a log.
前記第1および前記第2のメモリアクセス情報をログとして出力する処理において、監視する仮想メモリの領域を示す領域情報を参照し、前記ライトアドレスが前記領域情報で示される領域内である場合に、前記1および前記第2のメモリアクセス情報を出力することを特徴とする請求項5記載のログ取得方法。 The first and second memory access information includes a write address for writing to the virtual memory,
In the process of outputting the first and second memory access information as a log, referring to area information indicating a virtual memory area to be monitored, and when the write address is within the area indicated by the area information, 6. The log acquisition method according to claim 5, wherein the first and second memory access information are output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012061424A JP2013196241A (en) | 2012-03-19 | 2012-03-19 | Information processor and log acquisition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012061424A JP2013196241A (en) | 2012-03-19 | 2012-03-19 | Information processor and log acquisition method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013196241A true JP2013196241A (en) | 2013-09-30 |
Family
ID=49395144
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012061424A Pending JP2013196241A (en) | 2012-03-19 | 2012-03-19 | Information processor and log acquisition method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013196241A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105512010A (en) * | 2014-09-22 | 2016-04-20 | 苏宁云商集团股份有限公司 | Virtual machine user log information acquisition method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03252746A (en) * | 1990-03-02 | 1991-11-12 | Nippon Telegr & Teleph Corp <Ntt> | Memory access history preserving system |
JP2002132743A (en) * | 2000-10-27 | 2002-05-10 | Nec Corp | Device and method for monitoring memory access and recording medium recording program for memory access monitor |
JP2007199845A (en) * | 2006-01-24 | 2007-08-09 | Matsushita Electric Ind Co Ltd | Method and device for detecting memory c0rruption |
JP2007272303A (en) * | 2006-03-30 | 2007-10-18 | Matsushita Electric Ind Co Ltd | Simulator with memory breakage detecting function |
JP2009032197A (en) * | 2007-07-30 | 2009-02-12 | Fujitsu Microelectronics Ltd | Software simulation method, program for software simulation, and software simulation device |
-
2012
- 2012-03-19 JP JP2012061424A patent/JP2013196241A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03252746A (en) * | 1990-03-02 | 1991-11-12 | Nippon Telegr & Teleph Corp <Ntt> | Memory access history preserving system |
JP2002132743A (en) * | 2000-10-27 | 2002-05-10 | Nec Corp | Device and method for monitoring memory access and recording medium recording program for memory access monitor |
JP2007199845A (en) * | 2006-01-24 | 2007-08-09 | Matsushita Electric Ind Co Ltd | Method and device for detecting memory c0rruption |
JP2007272303A (en) * | 2006-03-30 | 2007-10-18 | Matsushita Electric Ind Co Ltd | Simulator with memory breakage detecting function |
JP2009032197A (en) * | 2007-07-30 | 2009-02-12 | Fujitsu Microelectronics Ltd | Software simulation method, program for software simulation, and software simulation device |
Non-Patent Citations (1)
Title |
---|
JPN6015034944; 近藤 拓也 外2名: '組込み計算機システム開発に向けたメモリ破壊系不具合検出機能の開発' 情報処理学会研究報告 第2007巻 第4号, 20070123, pp.87-92, 社団法人情報処理学会 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105512010A (en) * | 2014-09-22 | 2016-04-20 | 苏宁云商集团股份有限公司 | Virtual machine user log information acquisition method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10089212B2 (en) | Memory system, information processing system, and host device outputting debugging information through a host interface | |
US8612937B2 (en) | Synchronously debugging a software program using a plurality of virtual machines | |
TWI410864B (en) | Controlling instruction execution in a processing environment | |
EP2787444A2 (en) | Central processing unit, information processing apparatus, and intra-virtual-core register value acquisition method | |
US10067813B2 (en) | Method of analyzing a fault of an electronic system | |
US8607098B2 (en) | Generating appropriately sized core files used in diagnosing application crashes | |
US8166349B2 (en) | Communicating with USB devices after a computer system crash | |
KR102307364B1 (en) | A vulnerability driven hybrid test system for application programs | |
US8887139B2 (en) | Virtual system and method of analyzing operation of virtual system | |
CN107003828B (en) | Instrumentization of graphics instructions | |
US9699093B2 (en) | Migration of virtual machine based on proximity to peripheral device in NUMA environment | |
WO2014185165A1 (en) | Information processing device, and information processing method | |
US11010280B1 (en) | System and method for virtualization-assisted debugging | |
JP2009134565A (en) | Virtual machine system and method for controlling virtual machine system | |
JP6920286B2 (en) | Exception handling | |
US7302514B2 (en) | Device, system, and method of virtual machine memory mapping | |
JP5452336B2 (en) | Peripheral device failure simulation system, peripheral device failure simulation method, and peripheral device failure simulation program | |
US8312433B2 (en) | Operating system aided code coverage | |
JP2018531462A6 (en) | Exception handling | |
US11106478B2 (en) | Simulation device, simulation method, and computer readable medium | |
JP2013196241A (en) | Information processor and log acquisition method | |
US9384015B2 (en) | Techniques for dynamically redirecting device driver operations to user space | |
US10176112B2 (en) | Information processing device, method, and non-transitory computer-readable recording medium storing information processing program for loading code into reconfigurable integrated circuit | |
US20120216189A1 (en) | Methods, Devices and Computer Program Products for Emulating a Physical Hard Drive as Multiple Virtual Hard Drives | |
TWI417786B (en) | Method,system,and program product of facilitating instruction execution in a processing environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141204 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150825 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150901 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151102 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20160322 |