JP2004318469A - Program tracing system - Google Patents

Program tracing system Download PDF

Info

Publication number
JP2004318469A
JP2004318469A JP2003111186A JP2003111186A JP2004318469A JP 2004318469 A JP2004318469 A JP 2004318469A JP 2003111186 A JP2003111186 A JP 2003111186A JP 2003111186 A JP2003111186 A JP 2003111186A JP 2004318469 A JP2004318469 A JP 2004318469A
Authority
JP
Japan
Prior art keywords
resource
memory
state
program
task
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
JP2003111186A
Other languages
Japanese (ja)
Inventor
Akihisa Chiba
晃久 千葉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
MX Mobiling Ltd
Original Assignee
NEC Corp
MX Mobiling Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp, MX Mobiling Ltd filed Critical NEC Corp
Priority to JP2003111186A priority Critical patent/JP2004318469A/en
Publication of JP2004318469A publication Critical patent/JP2004318469A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program tracing system which does not take time in repairing destruction of a queue nor cause runaway. <P>SOLUTION: This system is provided with a trace buffer 20, a queue 30 and a resource check section 40, and detects a usage error of dynamic management of memory often used in the resource check section 40 when finishing interruption processing and the starting of task switch processing until execution of only self-task/self-interruption processing, and block the influence to other tasks. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はプログラムトレース装置に関し、例えば、複数のイベント(事象)を優先順位に基づいて処理順番を決めて実行するリアルタイムモニタ(OS:オペレーティングシステム)により制御されるプログラムのプログラムトレース装置に関する。
【0002】
【従来の技術】
プログラムトレース装置は、複数の実行単位が並列に動作可能である、例えばマルチプロセスやマルチスレッド等をサポートしている計算機システムにおいて、プログラムの実行動作の解析に供される。
【0003】
斯かるプログラムトレース装置に関する従来技術として、プロセストレース用テーブルを作成し、プロセスをトレースするプロセストレース装置が開示されている(例えば、特許文献1参照。)。図2を参照して、この従来のプロセストレース装置100を簡単に説明する。このプログラムトレース装置100は、キュー110、トレースバッファ120およびキュー登録チェック部130により構成される。キュー110は、メモリ資源(リソース)やタイマ資源を管理する。トレースバッファ120は、キュー110のチェーン構造の変更履歴を保存する。キュー登録チェック部130は、資源を使用したいとき(即ち、獲得又は削除したいとき)、キュー110のチェーン構造の変更履歴の異常の有無を調べる。
【0004】
このプログラムトレース装置100の動作は、次のとおりである。メモリ資源を使用したいときには、欲しいバイト数を指定して、タイマ資源ならタイマを1本使用したいことを指定して、メモリやタイマの獲得処理を呼び出す。呼ばれた側の獲得処理内では、キュー登録チェック部130を実行し、キュー110のチェーン構造の変更履歴を、保存しておいたトレースバッファ120から確認し、履歴とキュー110の現状との比較によりキュー110の破壊の有無をチェックする。キュー登録チェック部130は、異常があれば、プログラム実行をCPU(中央演算処理装置)のHALT命令により止め、無限ループにし又はリセットをかける等の異常検出処理を実行する。
【0005】
また、リアルタイムでのタスク処理の誤りを検出するプログラムトレース装置が開示されている(例えば、特許文献2参照。)。図3に示す如く、このプログラムトレース装置200は、キュー210、トレースバッファ220および資源チェック部230により構成される。ここで、キュー210は、メモリ資源やタイマ資源を管理する。トレースバッファ220は、キュー210により動的管理(使用する間だけ空いているメモリやタイマ等の資源を確保し、使用が終了すると返す)が行われているメモリやタイマ等の資源に対して獲得、書き込み、解放が行われた際の資源へのアクセス情報を保存する。割り込み処理を抜けるとき又はリアルタイムモニタ(OS)のタスク切換処理の最初に、現在の割り込み処理又は直前にRUN状態であったタスク処理があり得る範囲で、メモリやタイマ等の資源をアクセスしたか否かをチェックする。
【0006】
【特許文献1】
特開平10−301805号公報(第8頁、第17図)
【特許文献2】
特開2002−251299号公報(第3−4頁、第1図、第3図)
【0007】
【発明が解決しようとする課題】
上述の如き従来技術によると、資源を使用したいときにキュー破壊を検出しても、どのタスクが何時キュー破壊したか直ちに分からないので、修正に時間がかかってしまう。その理由は、複数の発生事象毎に優先順位に基づいて処理順番を決めて実行するリアルタイムモニタでは、キュー破壊は、以下に説明する如くあらゆる割り込み処理により発生する可能性がある。
【0008】
第1に、「資源解放忘れ」である。あらゆるタスクと割り込み処理のどこか1箇所でも、プログラムバグによりメモリやタイマ等の獲得した資源を返さないルートが生じた場合には、そのルートを通過する毎に、資源を確保し続け、最後に資源がなくなってしまう。その後、資源がないことを判断している場合には、異常処理等を実行する。しかし、資源がない処理を準備していない場合には、資源がないにも拘らず資源が確保されたルートを実行してしまい、0番地にデータを書き、又は過去に資源が確保されていたときのデータをそのまま使用してしまうため、他のタスクや割り込み処理が、使用中のメモリやタイマを上書きしてしまうことになる。その結果、この後は、暴走してしまう。
【0009】
第2に、「資源未獲得」である。資源を獲得する処理を、どこか1箇所でも獲得しないルートがあったり獲得した以上のメモリを使用してしまった場合には、正しく資源を獲得したタスクや割り込み処理のデータを上書きしたり、付近のデータを破壊するために、暴走を生じる。
【0010】
【発明の目的】
本発明は、従来技術の上述した課題に鑑みなされたものであり、上述した「資源解放忘れ」や「資源未獲得」を自動的に試験し、対処可能にする改良されたプログラムトレース装置を提供することを目的とする。
【0011】
【課題を解決するための手段】
上述の課題を解決するため、本発明によるプログラムトレース装置は、次のような特徴的な構成を採用している。
【0012】
(1)獲得、書き込み又は解放しようとした資源へのアクセス情報を保存しておくトレースバッファと、前記資源の始点から終点までを管理するキューと、前記資源をアクセスしたかをチェックする資源チェック部とを備え、該資源チェック部は、前記資源の使用誤りを自タスク処理だけの実行までで検出するプログラムトレース装置。
【0013】
(2)前記資源チェック部は、割り込み処理を抜けるとき又はタスク切替処理の最初に、その回の割り込み処理又は直前にRUN状態であったタスクが、ありえる範囲で前記チェックを実行する上記(1)のプログラムトレース装置。
【0014】
(3)前記資源はメモリであり、動的管理を行う上記(1)又は(2)のプログラムトレース装置。
【0015】
(4)前記資源チェック部は、前記動的管理されるメモリが獲得されている状態および使用終了して解放された状態に分けてチェックされる上記(1)、(2)又は(3)のプログラムトレース装置。
【0016】
(5)前記メモリが獲得されている状態は、更に獲得だけされた状態および使用中の状態に分けてチェックされる上記(4)のプログラムトレース装置。
【0017】
(6)前記使用終了して解放された状態は、更に電源投入後の初期状態および解放された状態に分けてチェックされる上記(4)又は(5)のプログラムトレース装置。
【0018】
【発明の実施の形態】
以下、本発明によるプログラムトレース装置の好適実施形態の構成および動作を、添付図面を参照して詳細に説明する。
【0019】
図1は、本発明によるプログラムトレース装置の好適実施形態のシステム構成図である。このプログラムトレース装置10は、複数のタスクや割り込み処理が動作可能な計算機を対象としている。図1のプログラムトレース装置10は、トレースバッファ20、キュー30および資源チェック部40により構成されている。
【0020】
キュー30は、メモリ資源を管理する。即ち、キュー30は、メモリ資源を使用したいとき、欲しいバイト数を指定して、メモリの獲得処理を呼ぶ。呼ばれた側の獲得処理内では、始点から空いている資源を捜し、空いていれば呼んだ側に獲得できた場所を伝える。獲得処理内では、多くの場合、メモリ資源はキュー30によってチェーン構造を取って管理している。この方法は以下のとおりである。
【0021】
メモリ資源を管理するキュー30の始点に、使っている1つのメモリ資源のアドレスを格納しておく。そこで示されたアドレスの先には、次に使用している1つのメモリ資源のアドレスを格納する。そのアドレスの先には、更に次に使用している1つのメモリ資源のアドレスを格納し、使用しているメモリ資源はここまでで終りということを示す終点まで、次のメモリ資源のアドレスを格納する。
【0022】
次に、トレースバッファ20は、キュー30により管理しているメモリ資源を獲得、書き込み又は解放する際に、メモリ資源へのアクセス情報を保存しておく。資源チェック部40は、割り込み処理を抜けるときと、タスク切替処理の最初に、あり得る範囲でメモリ資源をアクセスしたかをチェックする。
【0023】
次に、図1に示すプログラムトレース装置10の全体動作を詳細に説明する。先ず、各タスク・割り込み処理がキュー30で管理しているメモリ資源を獲得、書き込み又は解放したとき、トレースバッファ20に資源へのアクセス情報を保存する。保存するのは、次の値である。
【0024】
(1)獲得時
▲1▼資源の状態を「獲得だけされた状態」にする。
▲2▼獲得した資源のアドレス・範囲を格納する。
▲3▼獲得した処理番号、書き込みしてよい処理番号、解放してよい処理番号を格納する。
【0025】
(2)書き込み時
▲1▼資源の状態を「書き込み済状態」にする。
▲2▼書き込みした処理番号を格納する。
▲3▼書き込みした値を格納する(資源により現実的に格納できる量のみ)。
【0026】
(3)解放時
▲1▼資源の状態を「解放状態」にする。
▲2▼解放した処理番号を格納する。
【0027】
次に、割り込み処理を抜けるとき又はタスク内でタスク間通知・事象発生待ち等のタスク切替を伴うOSの処理を実行した後に、資源チェック部40で、後述する(A)、(B)、(C)および(D)の判断を行い、今回の割り込み処理又はRUN状態であったタスクが、資源に対し異常な処理を行ってしまったかを検出する。
【0028】
即ち、本発明は、よく使用されるプログラム構造である、多数の事象発生毎に優先順位に基づき処理順序を決めて実行するリアルタイムモニタにより制御するプログラムにおいて、よく使用されるメモリの動的管理(即ち、使用期間だけ空いているメモリを確保し、使用後に解放する)の使用誤りを自タスク・自割り込み処理だけの実行までで検出し、自タスク・自割り込み処理の誤りを他タスクへ影響させないOSを提供することを意図する。そこで、割り込み処理を抜けるときと、リアルタイムモニタ(OS)のタスク切り換え処理の最初に、その回の割り込み処理又は直前にRUN状態であったタスクが、予め宣言した範囲内でメモリをアクセスしたかチェックする処理を実行する。
【0029】
また、各タスクの状態が遷移したとき、各状態で設計どおりのメモリを解放しているか又は解放漏れがないかチェックする処理を実行する。メモリチェックは、以下の方法により行う。即ち、動的メモリは、タスク処理・割り込み処理が使用したいため獲得されている状態(第1状態)および装置の電源投入後の初期状態や、タスク処理・割り込み処理が獲得したメモリを使用し終わったため、解放している状態(第2状態)の2つの状態に大別される。この第1状態を(A)および(B)に、また第2状態を(C)および(D)に分けて、以下に詳細に説明する。
【0030】
(A)獲得だけされた状態
獲得だけして使用していなければ、メモリの内容値は、現在のタスク処理又は割り込み処理実行前と変わっていないはずである。割り込み処理を抜けるときと、OSのタスク切替処理の最初のタイミングで、獲得だけされたメモリ値を読み出し、その前の回の割り込み処理又は直前にRUN状態であったタスクのときの値から変わっていれば、今回の割り込み処理又はRUN状態であったタスクが、獲得したメモリに対して異常な処理を行ってしまったことになる。このとき、メモリが設計量の、例えば80%を使用してしまった等の使用量をチェックして異常を判断する又はそのタスクの状態で予め設計したメモリ獲得状態であるか判断する。
【0031】
(B)メモリ獲得済みで設計通りの正しい処理が獲得したメモリを書き換え、メモリを使用中の状態
このときは、メモリ値は設計どおりの正しい処理が書き換えた値と同一値のはずである。更に、獲得したアドレスに、獲得した範囲内で設計どおりの正しい処理が書き換えたことも、獲得だけしたときの情報と予め設計で決めている処理番号等を確認することでチェックできる。割り込み処理を抜けるときと、OSのタスク切替処理の最初のタイミングで同一値か、アドレス・範囲・書き込み処理番号のチェックを行い、異常を検出する。
【0032】
(C)電源投入後の初期状態
メモリの内容値は、初期値になっているはずである。特に初期値を設定しないメモリであれば、電源投入時の値から変化がないはずである。割り込み処理を抜けるときと、OSのタスク切替処理の最初のタイミングで同一値かチェックして検出する。
【0033】
(D)解放された状態
メモリの内容値は、解放されたときの値から変化がないはずである。割り込み処理を抜けるときと、OSのタスク切替処理の最初のタイミングで同一値かチェックして検出する。
【0034】
上述のようにして、動的管理をしているメモリの資源の使用誤りを自タスク・割り込み処理だけの実行までで検出可能である。
【0035】
以上、本発明のプログラムトレース装置の好適実施形態の構成および動作を詳述した。しかし、斯かる実施形態は、本発明の単なる例示に過ぎず、何ら本発明を限定するものではない。本発明の要旨を逸脱することなく、特定用途に応じて種々の変形変更が可能であること、当業者には容易に理解できよう。
【0036】
【発明の効果】
以上の説明から明らかな如く、本発明のプログラムトレース装置は、次の如き実用上の顕著な効果を有する。即ち、メモリの資源の使い方の誤りを自タスク・自割り込み処理だけの実行までで検出し、自タスク・自割り込み処理の誤りを他タスクへ影響させることがない。
【図面の簡単な説明】
【図1】本発明によるプログラムトレース装置の好適実施形態のブロック図である。
【図2】プログラムトレース装置の第1従来例のブロック図である。
【図3】プログラムトレース装置の第2従来例のブロック図である。
【符号の説明】
10 プログラムトレース装置
20 トレースバッファ
30 キュー
40 資源チェック部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a program tracing device, for example, a program tracing device for a program controlled by a real-time monitor (OS: Operating System) that executes a plurality of events in an order of processing based on priorities and executes the events.
[0002]
[Prior art]
The program tracing device is used for analyzing the execution operation of a program in a computer system in which a plurality of execution units can operate in parallel, for example, a computer system that supports multi-process, multi-thread, and the like.
[0003]
As a conventional technique relating to such a program trace device, a process trace device that creates a process trace table and traces a process is disclosed (for example, see Patent Document 1). Referring to FIG. 2, this conventional process trace apparatus 100 will be briefly described. The program tracing device 100 includes a queue 110, a trace buffer 120, and a queue registration check unit 130. The queue 110 manages memory resources (resources) and timer resources. The trace buffer 120 stores a change history of the chain structure of the queue 110. When the resource is to be used (that is, when the resource is to be acquired or deleted), the queue registration checking unit 130 checks whether there is an abnormality in the change history of the chain structure of the queue 110.
[0004]
The operation of the program tracing device 100 is as follows. When the user wants to use the memory resource, he specifies the number of bytes he wants, and if he wants to use the timer resource, he specifies that he wants to use one timer. In the called side acquisition processing, the queue registration check unit 130 is executed, the change history of the chain structure of the queue 110 is checked from the saved trace buffer 120, and the history is compared with the current state of the queue 110. To check whether the queue 110 has been destroyed. If there is an abnormality, the queue registration check unit 130 stops the program execution by the HALT instruction of the CPU (Central Processing Unit) and executes an abnormality detection process such as an infinite loop or resetting.
[0005]
Also, a program trace device that detects an error in task processing in real time has been disclosed (for example, see Patent Document 2). As shown in FIG. 3, the program trace device 200 includes a queue 210, a trace buffer 220, and a resource check unit 230. Here, the queue 210 manages memory resources and timer resources. The trace buffer 220 acquires the resources such as the memory and the timer which are dynamically managed by the queue 210 (the resources such as the memory and the timer which are vacant only during use and returned when the use is completed). , And saves access information to resources when writing and releasing are performed. When exiting the interrupt process or at the beginning of the task switching process of the real-time monitor (OS), whether resources such as a memory or a timer have been accessed within a range where there is a current interrupt process or a task process that was in the RUN state immediately before. Check if.
[0006]
[Patent Document 1]
JP-A-10-301805 (page 8, FIG. 17)
[Patent Document 2]
JP-A-2002-251299 (pages 3-4, FIG. 1, FIG. 3)
[0007]
[Problems to be solved by the invention]
According to the above-described prior art, even if queue destruction is detected when a resource is desired to be used, it is not immediately known which task and when the queue was destructed, so that it takes time to correct the task. The reason is that in a real-time monitor that determines and executes a processing order based on the priority for each of a plurality of occurrence events, queue destruction may occur due to any interrupt processing as described below.
[0008]
The first is "forget to release resources". If there is a route that does not return the acquired resources such as memory and timer due to a program bug at any one place of all tasks and interrupt processing, resources are kept secured every time the route is passed. Resources run out. Thereafter, when it is determined that there is no resource, an abnormal process is executed. However, if a process without resources is not prepared, a route in which resources are secured is executed despite the lack of resources, and data is written to address 0, or resources have been secured in the past. Since the data at that time is used as it is, another task or interrupt processing overwrites the used memory or timer. As a result, they run away after this.
[0009]
Second, "resource not acquired". If there is a route that does not acquire any resource in the process of acquiring resources, or if more memory is used, the data of the task or interrupt process that acquired the resources correctly is overwritten, Runaway occurs because of destroying the data.
[0010]
[Object of the invention]
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems of the related art, and provides an improved program trace device that automatically tests and can cope with the above-mentioned "forget resource release" and "resource not obtained". The purpose is to do.
[0011]
[Means for Solving the Problems]
In order to solve the above-described problem, the program trace device according to the present invention employs the following characteristic configuration.
[0012]
(1) A trace buffer for storing access information to a resource to be obtained, written, or released, a queue for managing a start point to an end point of the resource, and a resource check unit for checking whether the resource has been accessed And a resource tracing unit for detecting the use error of the resource up to the execution of only its own task processing.
[0013]
(2) The above-mentioned (1) wherein the resource check unit executes the check when exiting the interrupt processing or at the beginning of the task switching processing, to the extent possible for the current interrupt processing or the task in the RUN state immediately before. Program trace device.
[0014]
(3) The program trace device according to the above (1) or (2), wherein the resource is a memory and performs dynamic management.
[0015]
(4) The resource check unit according to (1), (2) or (3), wherein the dynamically managed memory is checked separately in a state where the memory is acquired and in a state where the memory has been used and released. Program trace device.
[0016]
(5) The program tracing device according to (4), wherein the state in which the memory is acquired is further checked separately in a state in which the memory is acquired and a state in use.
[0017]
(6) The program tracing apparatus according to (4) or (5), wherein the state of use and release after use is checked separately in an initial state after power-on and in a released state.
[0018]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the configuration and operation of a preferred embodiment of a program trace device according to the present invention will be described in detail with reference to the accompanying drawings.
[0019]
FIG. 1 is a system configuration diagram of a preferred embodiment of a program trace device according to the present invention. The program tracing device 10 is intended for a computer capable of operating a plurality of tasks and interrupt processing. The program trace device 10 of FIG. 1 includes a trace buffer 20, a queue 30, and a resource check unit 40.
[0020]
The queue 30 manages memory resources. That is, when the queue 30 wants to use a memory resource, it designates a desired number of bytes and calls a memory acquisition process. In the called party's acquisition process, a search is made for a free resource from the starting point, and if free, the called party is notified of the obtained location. In many cases, in the acquisition process, the memory resources are managed by the queue 30 in a chain structure. The method is as follows.
[0021]
The address of one used memory resource is stored at the starting point of the queue 30 for managing the memory resource. The address of one memory resource used next is stored after the address indicated there. After the address, the address of one memory resource used next is further stored, and the address of the next memory resource is stored until the end point indicating that the used memory resource ends here. I do.
[0022]
Next, when acquiring, writing, or releasing a memory resource managed by the queue 30, the trace buffer 20 stores access information to the memory resource. The resource check unit 40 checks whether the memory resources have been accessed within a possible range when exiting the interrupt process and at the beginning of the task switching process.
[0023]
Next, the overall operation of the program trace device 10 shown in FIG. 1 will be described in detail. First, when each task / interrupt process acquires, writes, or releases a memory resource managed in the queue 30, information on access to the resource is stored in the trace buffer 20. Save the following values:
[0024]
(1) At the time of acquisition {circle around (1)} The resource state is set to “the state in which only acquisition is performed”.
(2) Store the address and range of the acquired resource.
(3) Store the acquired process number, the process number that can be written, and the process number that can be released.
[0025]
(2) At the time of writing (1) The state of the resource is set to “written state”.
(2) Store the written process number.
{Circle around (3)} Store the written value (only the amount that can be actually stored by resources).
[0026]
(3) At the time of release (1) The state of the resource is set to the "released state".
(2) Store the released process number.
[0027]
Next, at the time of exiting the interrupt processing or after executing the processing of the OS involving task switching such as inter-task notification and event occurrence waiting within the task, the resource check unit 40 executes (A), (B), and ( By making the determinations in C) and (D), it is detected whether or not the current interrupt processing or the task in the RUN state has performed abnormal processing on resources.
[0028]
That is, the present invention provides a dynamic management of frequently used memory in a program which is controlled by a real-time monitor which determines a processing order based on a priority for each occurrence of a large number of events and has a frequently used program structure. In other words, a memory error that is vacant only for the usage period and released after use) is detected until the execution of only the own task / self interrupt processing, and errors in the own task / self interrupt processing are not affected by other tasks. It is intended to provide an OS. Therefore, when exiting the interrupt processing and at the beginning of the task switching processing of the real-time monitor (OS), it is checked whether the current interrupt processing or the task which was in the RUN state immediately before accessed the memory within the previously declared range. Execute the processing to be performed.
[0029]
Further, when the state of each task transits, a process is executed to check whether the memory is released as designed in each state or there is no omission of release. The memory check is performed by the following method. In other words, the dynamic memory is in a state (first state) acquired by the task processing / interrupt processing because it wants to use it, an initial state after the power of the apparatus is turned on, or the memory acquired by the task processing / interrupt processing is finished. Therefore, it is roughly classified into two states of a released state (second state). The first state is divided into (A) and (B), and the second state is divided into (C) and (D).
[0030]
(A) State of Acquired If only the acquired state is not used, the content value of the memory should not be different from that before execution of the current task processing or interrupt processing. At the time of exiting the interrupt process and at the first timing of the task switching process of the OS, the acquired memory value is read, and the value has changed from the value of the previous interrupt process or the value of the task in the RUN state immediately before. In this case, the task that has been in the interrupt processing or the RUN state has performed abnormal processing on the acquired memory. At this time, the amount of memory used, for example, 80% of the designed amount is checked to determine whether there is an abnormality or whether the task is in a memory acquisition state designed in advance in the state of the task.
[0031]
(B) A state in which the memory has been acquired and the memory acquired by correct processing as designed has been rewritten, and the memory is in use. At this time, the memory value should be the same as the value rewritten by the correct processing as designed. Further, it can be checked that the acquired address has been rewritten with the correct process within the acquired range as designed, by confirming the information obtained at the time of acquisition only and the process number determined in advance by design. At the time of exiting the interrupt process and at the first timing of the task switching process of the OS, the same value, the address, the range, and the write process number are checked to detect an abnormality.
[0032]
(C) The contents of the initial state memory after power-on should be the initial values. In particular, if the memory does not set an initial value, there should be no change from the value at power-on. The same value is checked and detected at the first timing of the task switching process of the OS when exiting the interrupt process.
[0033]
(D) The content value of the released state memory should not change from the value at the time of release. The same value is checked and detected at the first timing of the task switching process of the OS when exiting the interrupt process.
[0034]
As described above, it is possible to detect an erroneous use of the resources of the memory that is dynamically managed up to the execution of only the own task / interrupt processing.
[0035]
The configuration and operation of the preferred embodiment of the program trace device of the present invention have been described above in detail. However, such an embodiment is merely an example of the present invention, and does not limit the present invention in any way. It will be readily apparent to those skilled in the art that various modifications and changes can be made in accordance with the particular application without departing from the spirit of the invention.
[0036]
【The invention's effect】
As is apparent from the above description, the program tracing device of the present invention has the following practically significant effects. That is, an error in the usage of the memory resources is detected up to the execution of only the own task / self interrupt processing, and the error of the own task / self interrupt processing does not affect other tasks.
[Brief description of the drawings]
FIG. 1 is a block diagram of a preferred embodiment of a program trace device according to the present invention.
FIG. 2 is a block diagram of a first conventional example of a program trace device.
FIG. 3 is a block diagram of a second conventional example of a program trace device.
[Explanation of symbols]
10 Program Trace Device 20 Trace Buffer 30 Queue 40 Resource Check Unit

Claims (6)

獲得、書き込み又は解放しようとした資源へのアクセス情報を保存しておくトレースバッファと、前記資源の始点から終点までを管理するキューと、前記資源をアクセスしたかをチェックする資源チェック部とを備え、該資源チェック部は、前記資源の使用誤りを自タスク処理だけの実行までで検出することを特徴とするプログラムトレース装置。The system includes a trace buffer for storing access information to a resource to be obtained, written, or released, a queue for managing a start point to an end point of the resource, and a resource check unit for checking whether the resource has been accessed. A program tracing device, wherein the resource check unit detects the use error of the resource until execution of only the own task process. 前記資源チェック部は、割り込み処理を抜けるとき又はタスク切替処理の最初に、その回の割り込み処理又は直前にRUN状態であったタスクが、ありえる範囲で前記チェックを実行することを特徴とする請求項1に記載のプログラムトレース装置。The resource check unit, when exiting an interrupt process or at the beginning of a task switching process, executes the check in the possible range of the current interrupt process or the task that was in the RUN state immediately before. 2. The program trace device according to 1. 前記資源はメモリであり、動的管理を行うことを特徴とする請求項1又は2に記載のプログラムトレース装置。3. The program trace apparatus according to claim 1, wherein the resource is a memory and performs dynamic management. 前記資源チェック部は、前記動的管理されるメモリが獲得されている状態および使用終了して解放された状態に分けてチェックされることを特徴とする請求項1、2又は3に記載のプログラムトレース装置。The program according to claim 1, wherein the resource check unit checks separately the state in which the dynamically managed memory has been acquired and the state in which the memory has been used and released. Trace device. 前記メモリが獲得されている状態は、更に獲得だけされた状態および使用中の状態に分けてチェックされることを特徴とする請求項4に記載のプログラムトレース装置。5. The program tracing apparatus according to claim 4, wherein the state in which the memory is acquired is further checked separately into a state in which the memory is acquired and a state in use. 前記使用終了して解放された状態は、更に電源投入後の初期状態および解放された状態に分けてチェックされることを特徴とする請求項4又は5に記載のプログラムトレース装置。6. The program tracing apparatus according to claim 4, wherein the released state after use is further checked separately in an initial state after power-on and a released state.
JP2003111186A 2003-04-16 2003-04-16 Program tracing system Pending JP2004318469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003111186A JP2004318469A (en) 2003-04-16 2003-04-16 Program tracing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003111186A JP2004318469A (en) 2003-04-16 2003-04-16 Program tracing system

Publications (1)

Publication Number Publication Date
JP2004318469A true JP2004318469A (en) 2004-11-11

Family

ID=33471809

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003111186A Pending JP2004318469A (en) 2003-04-16 2003-04-16 Program tracing system

Country Status (1)

Country Link
JP (1) JP2004318469A (en)

Similar Documents

Publication Publication Date Title
US7950001B2 (en) Method and apparatus for instrumentation in a multiprocessing environment
JP4222370B2 (en) Program for causing a computer to execute a debugging support apparatus and a debugging processing method
US9268666B2 (en) System and method for debugging of computer programs
US10331545B2 (en) Debugging system
US10761966B2 (en) Generating program analysis data for analysing the operation of a computer program
JP4476193B2 (en) Information processing method and information processing apparatus
JP5523872B2 (en) Program dynamic analysis method and apparatus
US8495344B2 (en) Simultaneous execution resumption of multiple processor cores after core state information dump to facilitate debugging via multi-core processor simulator using the state information
KR20070109432A (en) Apparatus and method for kernel aware debugging
JP2004086910A (en) Method, system, and software product for debugging computer program
US7793160B1 (en) Systems and methods for tracing errors
US20160188441A1 (en) Testing multi-threaded applications
US20120151267A1 (en) System for extending use of a data address break point register to implement multiple watch points
JP3206641B2 (en) Microcomputer system debugging method, debugging device, and recording medium recording debug program
US20080196013A1 (en) System and method for implementing data breakpoints
EP1125199B1 (en) Method of debugging a program thread
JP2009175960A (en) Virtual multiprocessor system
JP2004318469A (en) Program tracing system
EP2600252B1 (en) System and method for debugging of computer programs
CN112740187A (en) Method and system for debugging program
JP2000339189A (en) Method for detecting illegal memory access debugging device and storage medium
JP2002251299A (en) Program tracing device
JP2002055851A (en) Monitoring method for detecting unauthorized memory access in computer system, its program and recording medium therefor
CN110955546B (en) Memory address monitoring method and device and electronic equipment
JP2006185365A (en) Semiconductor device and debugging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060313

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20060406

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20080228

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080704

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080711

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080908

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090227

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090703