JP2008310748A - Task execution time recording device, task execution time recording method, and task execution recording program - Google Patents

Task execution time recording device, task execution time recording method, and task execution recording program Download PDF

Info

Publication number
JP2008310748A
JP2008310748A JP2007160346A JP2007160346A JP2008310748A JP 2008310748 A JP2008310748 A JP 2008310748A JP 2007160346 A JP2007160346 A JP 2007160346A JP 2007160346 A JP2007160346 A JP 2007160346A JP 2008310748 A JP2008310748 A JP 2008310748A
Authority
JP
Japan
Prior art keywords
task
time
execution time
data
activation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2007160346A
Other languages
Japanese (ja)
Inventor
Kenji Iwasaki
顕司 岩崎
Daisuke Kondo
大介 近藤
Takeshi Yamamoto
剛 山本
Takashi Matsuura
隆 松浦
Yoshihito Kagawa
義仁 加川
Seijin Okamoto
星仁 岡本
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.)
Honda Motor Co Ltd
Keihin Corp
Original Assignee
Honda Motor Co Ltd
Keihin 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 Honda Motor Co Ltd, Keihin Corp filed Critical Honda Motor Co Ltd
Priority to JP2007160346A priority Critical patent/JP2008310748A/en
Publication of JP2008310748A publication Critical patent/JP2008310748A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a task execution time recording device capable of recording an actual execution time period of tasks with a simple configuration, low processing load, and a small amount of memory, in a software comprising a plurality of tasks; method; and program. <P>SOLUTION: The task execution time recording device includes: a timing storing part 300 which, when a start-up data or completion data of a task occurs, stores the occurrence time of the data generated just therebefore as a timing data; a first execution time calculating part 420 which, each time the start-up data occurs, calculates the execution time period of an interrupted task using the timing data and the start-up time of the started task; a second execution time calculating part 430 which, each time the completion data occurs, calculates the execution time period of the completed task using the timing data and the completion time period of the completed task; and an actual execution time calculating part 410 which calculates the actual execution time period of each task using calculation results of the first and second execution time calculating parts 420 and 430. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、複数のタスクを有するソフトウェアの各タスクの実行時間を記録する装置に関する。   The present invention relates to an apparatus for recording the execution time of each task of software having a plurality of tasks.

従来、複数のタスクを有するソフトウェアの検証において、不正動作の有無や処理完了要件の未達などの確認に、処理実行時間が使用されている。この処理実行時間を算出する手法としては、共通タイマを使用して測定対象タスクの処理の開始から終了までの処理実行時間を算出する手法や、個々のタスク毎に実際の実行時間(実実行時間)を算出する手段を設け、個々のタスク毎の実実行時間を算出する手法が挙げられる。   Conventionally, in the verification of software having a plurality of tasks, the processing execution time is used for checking whether or not there is an illegal operation and whether the processing completion requirement has not been met. As a method for calculating the processing execution time, a common timer is used to calculate the processing execution time from the start to the end of processing of the measurement target task, or the actual execution time (actual execution time for each task). ) For calculating the actual execution time for each task.

詳細には、共通タイマを使用して処理実行時間を算出する手法として、例えば、常時カウントを行なう共通時刻計測タイマの値を測定対象タスクによる処理の開始時と終了時に記録し、その差分を処理実行時間とする手法が挙げられる。この手法では、構成が簡便で計測のための処理負荷も小さいが、測定対象タスクの実行中に他のタスクが割り込んで実行された場合、他のタスクの実行時間も含まれた時間が測定対象とされてしまい、測定対象タスクが実際に実行されている時間が算出できない。   Specifically, as a method for calculating the processing execution time using the common timer, for example, the value of the common time measurement timer that always counts is recorded at the start and end of the processing by the measurement target task, and the difference is processed. There is a method of setting the execution time. In this method, the configuration is simple and the processing load for measurement is small. However, if another task is interrupted and executed during execution of the measurement target task, the time including the execution time of the other task is also measured. Therefore, the time during which the measurement target task is actually executed cannot be calculated.

一方、実実行時間を算出する手法として、例えば、個々のタスク毎にタイマを備え、タスクの中断時にはそのタイマを停止し、中断終了(復帰)時にはタイマを再起動することにより、個々のタスクの実行時間を計測する手法が挙げられる。この手法では、タスクが中断された時間を排除し、個々のタスクが実際に処理された時間のみを計測できるが、計測のための手段をタスク毎に備えねばならず、加えてタスクの中断・復帰を監視する必要があり、計測のための処理負荷が大きくなってしまう。   On the other hand, as a method for calculating the actual execution time, for example, a timer is provided for each individual task, the timer is stopped when the task is interrupted, and the timer is restarted when the interrupt is ended (returned). A method for measuring the execution time can be mentioned. This method eliminates the time at which the task was interrupted and can only measure the time at which each task was actually processed, but it must provide a means for measuring each task, and in addition, the task suspension / It is necessary to monitor the return, and the processing load for measurement increases.

そこで、1つの時刻計測タイマで個々のタスク毎の実実行時間を算出する技術が提案されている(例えば、特許文献1を参照)。この特許文献1の装置では、タスクの開始から終了まで、そのタスクの開始及び終了時刻と、そのタスクの中断をする他の高優先度タスクの切り替え時刻とを記録し、開始から終了までの時間から、高優先度タスクの実行時間を優先度の高い順に減じていくことにより、それぞれのタスクの実実行時間を算出する。
特開2002−323984号公報
Therefore, a technique for calculating the actual execution time for each task with one time measurement timer has been proposed (see, for example, Patent Document 1). In the apparatus of Patent Document 1, the start and end times of the task from the start to the end of the task and the switching time of other high priority tasks that interrupt the task are recorded, and the time from the start to the end Then, the actual execution time of each task is calculated by reducing the execution time of the high priority tasks in descending order of priority.
JP 2002-323984 A

しかしながら、特許文献1の装置では、タスクの開始から終了まで、そのタスクの開始及び終了時刻と、そのタスクに割り込む他の高優先度タスクの切り替え時刻を全て記録してから、高優先度タスクの処理時間を減じていく手法のため、タスクの開始から終了までに割り込まれるタスクの数が多くなる場合、時刻を記憶するメモリ量が大きくなってしまうという問題があった。   However, in the apparatus of Patent Document 1, from the start to the end of a task, the start and end times of the task and the switching time of other high priority tasks that interrupt the task are recorded, and then the high priority task Due to the technique of reducing the processing time, there is a problem that when the number of tasks interrupted from the start to the end of the task increases, the amount of memory for storing the time increases.

本発明は、上記事情に鑑み、複数のタスクを有するソフトウェアにおいて、各タスクの実実行時間を、簡便な構成、低処理負荷、少量のメモリで算出して記録することができるタスク実行時間記録装置、タスク実行時間記録方法、及びタスク実行時間記録用プログラムを提供することを目的とする。   In view of the above circumstances, the present invention is a task execution time recording device capable of calculating and recording the actual execution time of each task with a simple configuration, a low processing load, and a small amount of memory in software having a plurality of tasks. An object is to provide a task execution time recording method and a task execution time recording program.

かかる目的を達成するために、本発明のタスク実行時間記録装置は、複数のタスクを有するソフトウェアの各タスクの実行時間を記録するタスク実行時間記録装置であって、各タスクの起動データの発生時の時刻である起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する起動情報検出部と、各タスクの終了データの発生時の時刻である終了時刻を、終了情報としてそれぞれ検出する終了情報検出部と、タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶するタイミングデータ記憶部と、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、前記タイミングデータ記憶部に記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する第1の実行時間算出部と、タスクの終了データが発生する毎に、前記タイミングデータ記憶部に記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する第2の実行時間算出部と、前記第1及び第2の実行時間算出部による算出結果を用いて、各タスクの実実行時間を算出する実実行時間算出部とを備えることを特徴とする(第1発明)。   In order to achieve this object, a task execution time recording device of the present invention is a task execution time recording device that records the execution time of each task of software having a plurality of tasks, and when the activation data of each task is generated A startup information detecting unit that detects the startup time that is the start time and the type of the started task as startup information, and an end time that is the time when the end data of each task is generated, respectively, as end information An end information detection unit; a timing data storage unit that stores, as timing data, a generation time of data generated immediately before task activation data and end data when task activation data or termination data is generated; and a task Each time the activation data is generated, it is determined whether or not there is a task that is interrupted by the activation. A first execution time calculation unit that calculates the execution time of the suspended task using the timing data stored in the timing data storage unit and the activation time of the activated task; A second execution time calculation unit that calculates the execution time of the completed task using the timing data stored in the timing data storage unit and the end time of the completed task each time completion data is generated And an actual execution time calculation unit that calculates the actual execution time of each task using the calculation results of the first and second execution time calculation units (first invention).

第1発明のタスク実行時間記録装置において、複数のタスクを有するソフトウェアでは、タスクの割り込み(タスクが起動して実行中の他のタスクが中断される)・復帰(割り込んだタスクが終了して、中断されていた他のタスクの実行が再開される)によりタスクの切り替えが行なわれる。各タスクの起動の際には起動データが発生し、起動情報検出部により各タスクの起動時刻及び起動したタスクの種類が起動情報として検出される。また、各タスクの終了の際には終了データが発生し、終了情報検出部により各タスクの終了時刻が終了情報として検出される。このとき、ソフトウェアでは割り込みに対する復帰は一意に発生する。すなわち、測定対象のタスクが他のタスクの割り込みにより中断された場合(タスクの切り替えが行われた場合)、測定対象のタスクを中断した他のタスクの起動時刻が、測定対象のタスクの中断時刻となると共に、測定対象のタスクを中断した他のタスクの終了時刻が、測定対象のタスクの再開時刻となる。   In the task execution time recording device of the first invention, in software having a plurality of tasks, task interruption (the task is activated and other tasks being executed are interrupted) / return (the interrupted task is terminated, The execution of another task that has been suspended is resumed). When each task is activated, activation data is generated, and the activation information detection unit detects the activation time of each task and the type of the activated task as activation information. Further, when each task ends, end data is generated, and the end information detecting unit detects the end time of each task as the end information. At this time, the return to the interrupt uniquely occurs in the software. In other words, when a measurement target task is interrupted by another task interrupt (when a task is switched), the start time of the other task that interrupted the measurement target task is the measurement target task suspension time. At the same time, the end time of the other task that interrupts the task to be measured becomes the restart time of the task to be measured.

そこで、タイミングデータ記憶部により、タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶する。そして、第1の実行時間算出部は、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、タイミングデータと該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する。すなわち、この場合、タイミングデータは、中断されるタスクの起動時刻もしくは再開時刻を示している。よって、タイミングデータと起動したタスクの起動時刻(タスクの切り替え時刻)とを用いて、起動もしくは再開されてから中断されるまでの、該中断されるタスクの実行時間を逐次、容易に算出することができる。   Therefore, when the task start data or end data is generated by the timing data storage unit, the generation time of the data generated immediately before the task start data and end data is stored as timing data. Then, every time task activation data is generated, the first execution time calculation unit determines whether there is a task interrupted by the activation, and if there is an interrupted task, the timing data and the activation The execution time of the interrupted task is calculated using the start time of the task. That is, in this case, the timing data indicates the activation time or resumption time of the task to be interrupted. Therefore, using the timing data and the start time of the started task (task switching time), it is possible to easily and sequentially calculate the execution time of the interrupted task from the start or restart to the interrupt. Can do.

また、第2の実行時間算出部は、タスクの終了データが発生する毎に、タイミングデータと該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する。すなわち、この場合、タイミングデータは、終了したタスクの起動時刻もしくは再開時刻を示している。よって、タイミングデータと終了したタスクの終了時刻(タスクの切り替え時刻)とを用いて、起動もしくは再開されてから終了されるまでの、該終了したタスクの実行時間を逐次、容易に算出することができる。   The second execution time calculation unit calculates the execution time of the completed task by using the timing data and the end time of the completed task every time task completion data is generated. That is, in this case, the timing data indicates the start time or restart time of the finished task. Therefore, by using the timing data and the end time of the completed task (task switching time), it is possible to easily and sequentially calculate the execution time of the completed task from the start or restart to the end. it can.

すなわち、各タスクの起動時刻及び終了時刻を計測するだけで、第1及び第2の実行時間算出部により、各タスクの実行時間が逐次算出される。そして、第1及び第2の実行時間算出部の算出結果を用いて、実実行時間算出部により、他のタスクに中断された時間を排除した各タスクの実際の実行時間(実実行時間)が算出される。このとき、第1及び第2の実行時間算出部により、各タスクの実行時間が逐次算出されているので、各タスクの起動時刻及び終了時刻を全て記録しておくことなく、各タスクの実実行時間を算出することが可能である。   That is, the execution time of each task is sequentially calculated by the first and second execution time calculation units only by measuring the start time and end time of each task. Then, using the calculation results of the first and second execution time calculation units, the actual execution time (actual execution time) of each task excluding the time interrupted by other tasks by the actual execution time calculation unit is obtained. Calculated. At this time, since the execution time of each task is sequentially calculated by the first and second execution time calculation units, the actual execution of each task is recorded without recording all the start time and end time of each task. It is possible to calculate the time.

従って、各タスク毎にタイマを設けたり、各タスクの起動時刻及び終了時刻を全て記録しておくことなく、各タスクの実実行時間を、タスクの切り替え時刻とそのタイミングデータのみを用いて容易に算出することが可能である。よって、本発明によれば、複数のタスクを有するソフトウェアにおいて、各タスクの実実行時間を、簡便な構成、低処理負荷、少量のメモリで算出して記録することができる。   Therefore, without providing a timer for each task or recording all the start time and end time of each task, the actual execution time of each task can be easily determined using only the task switching time and its timing data. It is possible to calculate. Therefore, according to the present invention, in software having a plurality of tasks, the actual execution time of each task can be calculated and recorded with a simple configuration, a low processing load, and a small amount of memory.

また、第1発明のタスク実行時間記録装置において、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合は、該中断されるタスクの種類の上に該起動したタスクの種類を積み上げ、中断されるタスクがない場合は、該起動したタスクの種類を最下層とすることによって生成される、タスク種類階層を生成するタスク種類階層生成部と、タスクの終了データが発生する毎に、前記タスク種類階層生成部により生成されたタスク種類階層の最上位のタスクの種類を削除するタスク種類削除部とを備え、前記第2の実行時間算出部で、終了したタスクの種類を特定する際に、前記タスク種類削除部により削除されたタスクの種類を終了したタスクとして特定することが好ましい(第2発明)。   In the task execution time recording device of the first invention, every time task activation data is generated, it is determined whether or not there is a task interrupted by the activation. Task type hierarchy generated by stacking the activated task types on top of the activated task types and, when there is no task to be interrupted, the task type activated as the lowest layer A type hierarchy generation unit, and a task type deletion unit that deletes the highest task type of the task type hierarchy generated by the task type hierarchy generation unit each time task completion data is generated, In the execution time calculation unit, it is preferable that the task type deleted by the task type deletion unit is specified as a completed task when the type of the completed task is specified The second aspect of the present invention).

すなわち、割り込み・復帰によりタスクの切り替えが行なわれ、割り込みに対する復帰が一意に発生することから、起動されているタスクを、タスク種類階層として適切に表現し得る。そして、このタスク種類階層において、タスク種類削除部により削除されたタスクの種類から、終了したタスクが容易に特定される。   That is, tasks are switched by interrupt / return and a return to the interrupt occurs uniquely, so that the activated task can be appropriately expressed as a task type hierarchy. In the task type hierarchy, the completed task is easily identified from the type of task deleted by the task type deletion unit.

次に、本発明のタスク実行時間記録方法は、複数のタスクを有するソフトウェアの各タスクの実行時間を記録するタスク実行時間記録方法であって、各タスクの起動データの発生時の時刻である起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する起動情報検出ステップと、各タスクの終了データの発生時の時刻である終了時刻を、終了情報としてそれぞれ検出する終了情報検出ステップと、タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶するタイミング記憶ステップと、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、前記タイミングデータ記憶ステップで記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する第1の実行時間算出ステップと、タスクの終了データが発生する毎に、前記タイミングデータ記憶ステップで記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する第2の実行時間算出ステップと、前記第1及び第2の実行時間算出ステップによる算出結果を用いて、各タスクの実実行時間を算出する実実行時間算出ステップとを備えることを特徴とする(第3発明)。   Next, the task execution time recording method of the present invention is a task execution time recording method for recording the execution time of each task of software having a plurality of tasks, and the start time is the time when the start data of each task is generated An activation information detection step for detecting the time and the type of the activated task as activation information, and an end information detection step for detecting an end time, which is the time when the end data of each task is generated, as the termination information; When a task start data or end data is generated, a timing storage step for storing the generation time of the data generated immediately before the task start data and the end data as timing data, and task start data are generated. Each time, it is determined whether there is a task that is interrupted by the activation, and if there is a task that is interrupted, A first execution time calculating step for calculating an execution time of the interrupted task using the timing data stored in the timing data storage step and the start time of the started task; A second execution time calculating step of calculating the execution time of the completed task using the timing data stored in the timing data storage step and the end time of the completed task each time it occurs, An actual execution time calculating step of calculating the actual execution time of each task using the calculation results of the first and second execution time calculating steps (third invention).

第3発明のタスク実行時間記録方法によれば、第1発明のタスク実行時間記録装置に関して説明したように、各タスクの起動時刻及び終了時刻を計測するだけで、タスクの切り替え時刻とそのタイミングデータのみを用いて、第1及び第2の実行時間算出ステップにより、各タスクの実行時間が逐次算出される。そして、各タスクの起動時刻及び終了時刻を全て記録しておくことなく、第1及び第2の実行時間算出ステップの算出結果を用いて、実実行時間算出ステップにより、他のタスクに中断された時間を排除した各タスクの実実行時間が算出される。従って、各タスク毎にタイマを設けたり、各タスクの起動時刻及び終了時刻を全て記録しておくことなく、各タスクの実実行時間を、タスクの切り替え時刻とそのタイミングデータのみを用いて容易に算出することが可能である。よって、本発明によれば、複数のタスクを有するソフトウェアにおいて、各タスクの実実行時間を、簡便な構成、低処理負荷、少量のメモリで算出して記録することができる。   According to the task execution time recording method of the third invention, as described with respect to the task execution time recording device of the first invention, the task switching time and its timing data can be obtained only by measuring the start time and the end time of each task. The execution time of each task is sequentially calculated by the first and second execution time calculation steps. Then, without recording all the start time and end time of each task, the actual execution time calculation step was interrupted by another task using the calculation results of the first and second execution time calculation steps. The actual execution time of each task excluding the time is calculated. Therefore, without providing a timer for each task or recording all the start time and end time of each task, the actual execution time of each task can be easily determined using only the task switching time and its timing data. It is possible to calculate. Therefore, according to the present invention, in software having a plurality of tasks, the actual execution time of each task can be calculated and recorded with a simple configuration, a low processing load, and a small amount of memory.

次に、本発明のタスク実行時間記録用プログラムは、複数のタスクを有するソフトウェアの各タスクの実行時間を記録する処理をコンピュータに実行させるタスク実行時間記録用プログラムであって、各タスクの起動データの発生時刻である起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する起動情報検出処理と、各タスクの終了データの発生時刻である終了時刻を、終了情報としてそれぞれ検出する終了情報検出処理と、タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶するタイミング記憶処理と、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、前記タイミングデータ記憶処理により記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する第1の実行時間算出処理と、タスクの終了データが発生する毎に、前記タイミングデータ記憶処理により記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する第2の実行時間算出処理と、前記第1及び第2の実行時間算出処理による算出結果を用いて、各タスクの実実行時間を算出する実実行時間算出処理とを前記コンピュータに実行させる機能を有することを特徴とする(第4発明)。   Next, the task execution time recording program of the present invention is a task execution time recording program for causing a computer to execute a process for recording the execution time of each task of software having a plurality of tasks, and the startup data of each task The start time, which is the start time of the task, and the start information detection process for detecting the type of the started task as start information, and the end time, which is the end time of the end data for each task, is detected as the end information. Information detection processing, timing storage processing for storing, as timing data, the generation time of the data generated immediately before task activation data and completion data when task activation data or termination data occurs, and task activation Each time data is generated, it is determined whether there is a task that is interrupted by the activation. When there is a task to be executed, a first execution time calculation process for calculating an execution time of the suspended task using the timing data stored by the timing data storage process and the start time of the started task And the execution time of the completed task is calculated using the timing data stored by the timing data storage process and the end time of the completed task each time task completion data is generated. A function of causing the computer to execute an execution time calculation process and an actual execution time calculation process for calculating an actual execution time of each task using the calculation results of the first and second execution time calculation processes; Features (fourth invention).

第4発明のタスク実行時間記録用プログラムによれば、第1発明のタスク実行時間記録装置に関して説明した効果を奏し得る処理をコンピュータに実行させることができる。   According to the task execution time recording program of the fourth aspect of the invention, it is possible to cause the computer to execute processing that can achieve the effects described with respect to the task execution time recording apparatus of the first aspect of the invention.

本発明のタスク実行時間記録装置の一実施形態について、図1〜図4を用いて説明する。図1は、本実施形態のタスク実行時間記録装置の機能ブロック図であり、図2は、図1のタスク実行時間記録装置の測定対象であるソフトウェアにおけるタスク切り替えを示す説明図であり、図3,図4は、図2のタスク切り替えにおけるタスク種類階層データの例を示す説明図である。   An embodiment of the task execution time recording apparatus of the present invention will be described with reference to FIGS. FIG. 1 is a functional block diagram of the task execution time recording apparatus of the present embodiment, and FIG. 2 is an explanatory diagram showing task switching in software that is a measurement target of the task execution time recording apparatus of FIG. FIG. 4 is an explanatory diagram showing an example of task type hierarchy data in the task switching of FIG.

図1に示すように、本実施形態のタスク実行時間記録装置は、測定対象となるソフトウェアが搭載されているコンピュータ(CPU,ROM,RAM,I/O等からなる)1により構成されている。なお、タスク実行時間記録装置は、ソフトウェアが搭載されているコンピュータ1と通信可能に接続された他のコンピュータにより構成されていてもよい。コンピュータ1は、例えば車両(図示せず)に搭載され、当該車両の動作を制御するECUや、ナビゲーション装置等を構成する。   As shown in FIG. 1, the task execution time recording apparatus of this embodiment is configured by a computer (comprising a CPU, ROM, RAM, I / O, etc.) 1 on which software to be measured is mounted. Note that the task execution time recording device may be configured by another computer that is communicably connected to the computer 1 on which the software is installed. The computer 1 is mounted on, for example, a vehicle (not shown), and constitutes an ECU that controls the operation of the vehicle, a navigation device, and the like.

タスク実行時間記録装置は、マルチタスクソフトウェア(複数のタスクを有するソフトウェア)の各タスクの実実行時間を記録する。このタスク実行時間記録装置は、その機能として、タスク切り替え部10、時刻計測タイマ110、起動情報検出部120、終了情報検出部130、タスク種類階層生成部220、タスク種類階層記憶部210、タスク種類削除部230、タイミングデータ記憶部300、実実行時間算出部410、第1の実行時間算出部420、第2の実行時換算出部430、測定結果データ記憶部500、及び読み出し器600を備えている。これらの各機能は、1つのコンピュータにより構成されていてもよく、複数の独立したコンピュータにより構成されていてもよい。   The task execution time recording device records the actual execution time of each task of multitask software (software having a plurality of tasks). This task execution time recording device includes, as its functions, a task switching unit 10, a time measurement timer 110, a startup information detection unit 120, an end information detection unit 130, a task type hierarchy generation unit 220, a task type hierarchy storage unit 210, and a task type. A deletion unit 230, a timing data storage unit 300, an actual execution time calculation unit 410, a first execution time calculation unit 420, a second execution time conversion output unit 430, a measurement result data storage unit 500, and a reader 600 are provided. Yes. Each of these functions may be constituted by one computer or may be constituted by a plurality of independent computers.

また、これらの各機能は、コンピュータ1のメモリに予め実装されたプログラムをコンピュータ1により実行することにより実現される。このプログラムは、本発明のタスク実行時間記録用プログラムを含んでいる。なお、当該プログラムはCD−ROM等の記録媒体を介してメモリに格納されてもよい。或いは、当該プログラムは外部のサーバからネットワークや人工衛星を介して配信または放送され、車両等に搭載された通信機器により受信された上でメモリに格納されてもよい。   Each of these functions is realized by causing the computer 1 to execute a program previously installed in the memory of the computer 1. This program includes the task execution time recording program of the present invention. The program may be stored in the memory via a recording medium such as a CD-ROM. Alternatively, the program may be distributed or broadcast from an external server via a network or an artificial satellite, received by a communication device mounted on a vehicle or the like, and stored in a memory.

タスク切り替え部10は、ソフトウェアの有する複数のタスクの起動や終了を行い、各タスクを切り替える。タスクの起動や終了の際に、タスクの起動データや終了データがそれぞれ発生される。このタスク切り替え部10は、測定対象であるソフトウェア内に組み込まれている。   The task switching unit 10 starts and ends a plurality of tasks included in the software, and switches each task. When starting and ending a task, task start data and end data are generated, respectively. The task switching unit 10 is incorporated in software that is a measurement target.

時刻計測タイマ110は、タスク切り替え部10により行われる各タスクの起動時刻や終了時刻を計測する。起動時刻は、タスク切り替え部10によりタスクが起動された際に発生される各タスクの起動データの発生時の時刻である。また、終了時刻は、タスク切り替え部10によりタスクが終了された際に発生される各タスクの終了データの発生時の時刻である。   The time measurement timer 110 measures the start time and end time of each task performed by the task switching unit 10. The activation time is the time when the activation data of each task generated when the task is activated by the task switching unit 10 is generated. The end time is the time when the end data of each task generated when the task is ended by the task switching unit 10 is generated.

起動情報検出部120は、タスクの起動データが発生する毎に、時刻計測タイマ110により計測されるタスクの起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する。具体的には、起動情報検出部120は、タスクの起動タイミングで時刻計測タイマ110から得られる時刻とその起動タスクの種類を識別する記号からなる起動情報を起動信号として出力する。   The activation information detection unit 120 detects the activation time of a task measured by the time measurement timer 110 and the type of the activated task as activation information each time task activation data is generated. Specifically, the activation information detection unit 120 outputs, as an activation signal, activation information including a time obtained from the time measurement timer 110 at a task activation timing and a symbol for identifying the type of the activation task.

終了情報検出部130は、タスクの終了データが発生する毎に、時刻計測タイマ110により計測されるタスクの終了時刻を終了情報としてそれぞれ検出する。具体的には、終了情報検出部130は、タスクの終了タイミングで時刻計測タイマ110から得られる時刻とその終了したタスクの種類を識別する記号からなる終了情報を終了信号として出力する。   The end information detection unit 130 detects the end time of the task measured by the time measurement timer 110 as end information each time task end data is generated. Specifically, the end information detection unit 130 outputs, as an end signal, end information including a time obtained from the time measurement timer 110 at a task end timing and a symbol for identifying the type of the task that has ended.

タスク種類階層生成部220は、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがない場合は、該起動したタスクの種類を最下層とし、中断されるタスクがある場合は、該中断するタスクの種類の上に該起動したタスクの種類を積み上げることによって生成される、タスク種類階層を生成する。具体的には、タスク階層生成部220は、起動情報検出部120から入力される起動信号に基づいて、タスク種類階層データを生成し、該生成したデータをタスク種類階層記憶部210に記憶させる。これと共に、タスク種類階層生成部220は、生成したデータを該起動信号に含まれる起動時刻と併せて第1の実行時間算出部420に出力する。   Each time task activation data is generated, the task type hierarchy generation unit 220 determines whether there is a task interrupted by the activation, and if there is no task interrupted, the task type hierarchy generation unit 220 determines the type of the activated task. When there is a task to be interrupted at the lowest level, a task type hierarchy is generated that is generated by stacking the activated task types on the interrupted task types. Specifically, the task hierarchy generation unit 220 generates task type hierarchy data based on the activation signal input from the activation information detection unit 120, and stores the generated data in the task type hierarchy storage unit 210. At the same time, the task type hierarchy generation unit 220 outputs the generated data to the first execution time calculation unit 420 together with the activation time included in the activation signal.

タスク種類削除部230は、タスクの終了データが発生する毎に、タスク種類階層生成部220により生成されたタスク種類階層の最上位のタスクの種類を削除する。具体的には、タスク種類削除部230は、終了情報検出部130から入力される終了信号に基づいて、タスク種類階層記憶部210からタスク種類階層データを読み出し、タスク種類階層データの最上位のタスクの種類を削除対象データとして、これを削除したデータを生成し、該生成したデータをタスク種類階層記憶部210に記憶させる。これと共に、タスク種類削除部230は、削除対象データ(削除されたタスクの種類)を該終了信号に含まれる終了時刻と併せて第2の実行時間算出部430に出力する。   The task type deletion unit 230 deletes the task type at the top of the task type hierarchy generated by the task type hierarchy generation unit 220 every time task completion data is generated. Specifically, the task type deletion unit 230 reads out the task type hierarchy data from the task type hierarchy storage unit 210 based on the end signal input from the end information detection unit 130, and the highest task of the task type hierarchy data As a deletion target data, data that is deleted is generated, and the generated data is stored in the task type hierarchy storage unit 210. At the same time, the task type deletion unit 230 outputs the deletion target data (the type of the deleted task) together with the end time included in the end signal to the second execution time calculation unit 430.

タイミングデータ記憶部300は、タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶する。すなわち、タイミングデータ記憶部300は、直前に発生したデータがタスクの起動データであれば該起動データの発生時刻(起動時刻)をタイミングデータとして記憶し、直前に発生したデータがタスクの終了データであれば該終了データの発生時刻(終了時刻)をタイミングデータとして記憶する。具体的には、タイミングデータ記憶部300には、起動情報検出部110及び終了情報検出部120から出力される信号が、信号発生タイミングに応じて入力される。タイミングデータ記憶部300は、この入力信号を用い、データ入力タイミングの直前の入力データの時刻情報をタイミングデータとし、第1及び第2の実行時間算出部420,430に出力する。   The timing data storage unit 300 stores, as timing data, the generation time of data generated immediately before task activation data and completion data when task activation data or termination data is generated. That is, if the data generated immediately before is the task activation data, the timing data storage unit 300 stores the generation time (activation time) of the activation data as timing data, and the data generated immediately before is the task end data. If there is, the generation time (end time) of the end data is stored as timing data. Specifically, signals output from the activation information detection unit 110 and the end information detection unit 120 are input to the timing data storage unit 300 according to the signal generation timing. The timing data storage unit 300 uses this input signal, uses the time information of the input data immediately before the data input timing as timing data, and outputs the timing data to the first and second execution time calculation units 420 and 430.

第1の実行時間算出部420は、タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、タイミングデータ記憶部300に記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、中断されるタスクの実行時間を算出する。このとき、第1の実行時間算出部420は、タスク種類階層生成部220から出力されるタスク種類階層データから、中断されるタスクがあるか否かを判断すると共に、中断されるタスクの種類を特定する。   Each time task activation data is generated, the first execution time calculation unit 420 determines whether there is a task interrupted by the activation, and if there is an interrupted task, the first execution time calculation unit 420 stores the task in the timing data storage unit 300. The execution time of the suspended task is calculated using the stored timing data and the activation time of the activated task. At this time, the first execution time calculation unit 420 determines from the task type hierarchy data output from the task type hierarchy generation unit 220 whether there is a task to be interrupted and determines the type of task to be interrupted. Identify.

第2の実行時間算出部430は、タスクの終了データが発生する毎に、タイミングデータ記憶部300に記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する。このとき、第2の実行時間算出部430は、タスク種類削除部230により削除されたタスクの種類を終了したタスクとして特定する。   Each time task completion data is generated, the second execution time calculation unit 430 uses the timing data stored in the timing data storage unit 300 and the completion time of the completed task to determine the completed task. Calculate the execution time. At this time, the second execution time calculation unit 430 identifies the task type deleted by the task type deletion unit 230 as a completed task.

実実行時間算出部410は、第1実行時間算出部420による算出結果と、第2の実行時間算出部430とによる算出結果を用いて、各タスクの実実行時間を算出する。実実行時間算出部410により算出された実実行時間は、各タスクの実実行時間の測定結果データとして、測定結果データ記憶部500に記憶される。そして、測定結果データ記憶部500に記憶された測定結果データは、読み出し器600を介して読み出される。   The actual execution time calculation unit 410 calculates the actual execution time of each task using the calculation result by the first execution time calculation unit 420 and the calculation result by the second execution time calculation unit 430. The actual execution time calculated by the actual execution time calculation unit 410 is stored in the measurement result data storage unit 500 as measurement result data of the actual execution time of each task. Then, the measurement result data stored in the measurement result data storage unit 500 is read out via the reader 600.

なお、タスク種類階層記憶部210、タイミングデータ記憶部300、及び測定結果データ記憶部500は、RAM,HDD等の記憶装置である。   The task type hierarchy storage unit 210, the timing data storage unit 300, and the measurement result data storage unit 500 are storage devices such as a RAM and an HDD.

次に、本実施形態のタスク実行時間記録装置の作動(タスク実行時間記録処理)について説明する。以下では、測定対象であるマルチタスクソフトウェアにおいて、タスク切り替え部10により図2のようにタスクの切り替えが発生した場合を例にして説明する。図2の例において、測定対象であるマルチタスクソフトウェアは、タスクA,B,Cの3種類のタスクを有しており、これらのタスクの優先順位は高い順にタスクC,B,Aである。そして、図2において、横軸は時間を示し、図2の下段から順に、タスクAの実行状態、タスクBの実行状態、タスクCの実行状態が示されている。なお、図2において、各タスクが実際に実行されている時間をハッチングを付して示している。   Next, the operation (task execution time recording process) of the task execution time recording device of this embodiment will be described. Hereinafter, in the multitask software to be measured, a case where task switching occurs as shown in FIG. 2 by the task switching unit 10 will be described as an example. In the example of FIG. 2, the multitask software that is the measurement target has three types of tasks A, B, and C, and the priority of these tasks is tasks C, B, and A in descending order. In FIG. 2, the horizontal axis indicates time, and the task A execution state, task B execution state, and task C execution state are shown in order from the bottom of FIG. 2. In FIG. 2, the time during which each task is actually executed is indicated by hatching.

まず、図2に示すタスクの切り替えの例について説明する。このタスクの切り替え例では、アイドル状態からタスクAが実行され、このタスクAは実行途中にタスクBにより2回中断されている。また、タスクAを1回目に中断したタスクBは、さらにタスクCにより中断されている。タスクAの終了後は、アイドル状態からタスクBが実行され、このタスクBは実行途中にタスクCにより中断されている。   First, an example of task switching shown in FIG. 2 will be described. In this task switching example, task A is executed from the idle state, and task A is interrupted twice by task B during execution. In addition, task B that interrupted task A for the first time is further interrupted by task C. After task A ends, task B is executed from the idle state, and task B is interrupted by task C during execution.

このタスクの切り替えの例では、タスクAの開始から終了までの時間はt8-t1 であるが、タスクAを実際に処理している時間(実実行時間)は、(t2-t1)+(t6-t5)+(t8-t7) である。同様に、タスクBの実実行時間は、(t3-t2)+(t5-t4) 及びt7-t6 及び(t10-t9)+(t12-t11) である。また、タスクCの実実行時間は、t4-t3 及びt11-t10 である。   In this task switching example, the time from the start to the end of task A is t8-t1, but the time during which task A is actually processed (actual execution time) is (t2-t1) + (t6 -t5) + (t8-t7). Similarly, the actual execution time of task B is (t3-t2) + (t5-t4) and t7-t6 and (t10-t9) + (t12-t11). The actual execution time of task C is t4-t3 and t11-t10.

ここで、本実施形態では、起動情報検出部120は、起動信号として、起動を示すS、タスクの名前、起動時刻を連続して出力する。また、終了情報検出部130は、終了信号として、終了を示すE、タスクの名前、終了時刻を連続して出力する。そして、タイミングデータ記憶部300には、起動情報検出部120及び終了情報検出部130から出力される信号が、信号発生タイミングに応じて入力される。   Here, in the present embodiment, the activation information detection unit 120 continuously outputs S indicating activation, the name of the task, and the activation time as activation signals. Further, the end information detection unit 130 continuously outputs E indicating the end, the name of the task, and the end time as an end signal. Then, signals output from the activation information detection unit 120 and the end information detection unit 130 are input to the timing data storage unit 300 according to the signal generation timing.

例えば、起動情報検出部120が、図2のタスク切り替えに応じて出力する起動信号は、
{SA,t1,SB,t2,SC,t3,SB,t6,SB,t9,SC,t10}
となる。また、終了情報検出部130が、図2のタスク切り替えに応じて出力する終了信号は、
{EC,t4,EB,t5,EB,t7,EA,t8,EC,t11,EB,t12}
となる。そして、タイミングデータ記憶部300に、図2のタスク切り替えに応じて入力される信号は、
{SA,t1,SB,t2,SC,t3,EC,t4,EB,t5,SB,t6,EB,t7,EA,t8,SB,t9,SC,t10,EC,t11,EB,t12}
となる。
For example, the activation information output by the activation information detection unit 120 in response to task switching in FIG.
{SA, t1, SB, t2, SC, t3, SB, t6, SB, t9, SC, t10}
It becomes. Also, the end signal output by the end information detection unit 130 in response to the task switching in FIG.
{EC, t4, EB, t5, EB, t7, EA, t8, EC, t11, EB, t12}
It becomes. A signal input to the timing data storage unit 300 in response to the task switching in FIG.
{SA, t1, SB, t2, SC, t3, EC, t4, EB, t5, SB, t6, EB, t7, EA, t8, SB, t9, SC, t10, EC, t11, EB, t12}
It becomes.

次に、タスク実行時間記録処理について、図2の例を用いて具体的に説明する。まず、時刻t1で、タスク切り替え部10によりタスクAが起動されて起動データが発生し、起動情報検出部120は、タスクAの起動時刻として時刻計測タイマ110から時刻情報t1を取得する。そして、起動情報検出部120は、タスクの種類が識別できる信号とその起動時刻{SA,t1}を起動信号として出力する。この出力される起動信号は、タスク種類階層生成部220とタイミングデータ記憶部300に入力される。タスク階層生成部220は、タスクAにより中断されるタスクがないため、タスクAを最下層とした階層構造を生成し、タスク種類階層記憶部210に記憶させる。また、タイミングデータ記憶部300は、直前に発生したデータがないためタイミングデータを記憶しない。なお、タスクAにより中断されるタスクがないため、第1の実行時間算出部420により実行時間算出は行なわれない。   Next, the task execution time recording process will be specifically described with reference to the example of FIG. First, at time t1, task A is activated by task switching unit 10 to generate activation data, and activation information detection unit 120 acquires time information t1 from time measurement timer 110 as the activation time of task A. Then, activation information detection section 120 outputs a signal that can identify the type of task and its activation time {SA, t1} as an activation signal. The output activation signal is input to the task type hierarchy generation unit 220 and the timing data storage unit 300. Since there is no task interrupted by task A, task hierarchy generation unit 220 generates a hierarchical structure with task A as the lowest layer and stores it in task type hierarchy storage unit 210. Further, the timing data storage unit 300 does not store timing data because there is no data generated immediately before. Since there is no task interrupted by task A, the first execution time calculation unit 420 does not calculate the execution time.

次に、時刻t2で、タスク切り替え部10によりタスクBが起動され起動データが発生してタスクAが中断され、起動情報検出部120は、タスクBの起動時刻として時刻計測タイマ110から時刻情報t2を取得する。そして、起動情報検出部120は、タスクの種類が識別できる信号とその起動時刻{SB,t2}を起動信号として出力する。この出力される起動信号は、タスク種類階層生成部220とタイミングデータ記憶部300に入力される。   Next, at time t2, task B is activated by task switching unit 10 to generate activation data, task A is interrupted, and activation information detection unit 120 receives time information t2 from time measurement timer 110 as the activation time of task B. To get. Then, the activation information detection unit 120 outputs a signal that can identify the type of task and its activation time {SB, t2} as an activation signal. The output activation signal is input to the task type hierarchy generation unit 220 and the timing data storage unit 300.

タスク階層生成部220は、タスク種類階層記憶部210からタスク種類階層データを読み出し、タスクBの起動により中断されるタスクとしてタスクAがあることを判断し、タスクAの上位にタスクBを積み上げたタスク種類階層データを生成する。このタスク種類階層データにより、起動しているタスクA,Bが適切に表現される。このタスク種類階層データはタスク種類階層記憶部210に記憶されると共に、第1の実行時間算出部420に起動時刻t2と併せて出力される。また、タイミングデータ記憶部300は、タイミングデータとして直前の起動データの発生時刻t1を記憶する。   The task hierarchy generation unit 220 reads the task type hierarchy data from the task type hierarchy storage unit 210, determines that there is a task A as a task interrupted by the activation of task B, and stacks task B on top of task A. Generate task type hierarchy data. The task types A and B are appropriately represented by the task type hierarchy data. The task type hierarchy data is stored in the task type hierarchy storage unit 210 and output to the first execution time calculation unit 420 together with the activation time t2. Further, the timing data storage unit 300 stores the generation time t1 of the immediately preceding activation data as timing data.

第1の実行時間算出部420は、タスク種類階層生成部220から出力されるタスク種類階層データから、タスクBの起動により中断されるタスクとしてタスクAがあることを判断する。そして、第1の実行時間算出部420は、タイミングデータ記憶部300に記憶されたタイミングデータt1と、起動したタスクBの起動時刻t2とを用いて、中断されるタスクAの実行時間t2−t1 を算出する。これにより、タイミングデータとタスクの切り替え時刻のみを用いて、起動してから中断されるまでの、該中断されるタスクAの実行時間が容易に算出される。そして、第1の実行時間算出部420は、タスクAの実行時間としてt2-t1 を実実行時間算出部410に出力する。   The first execution time calculation unit 420 determines from the task type hierarchy data output from the task type hierarchy generation unit 220 that there is a task A as a task interrupted by the activation of the task B. Then, the first execution time calculation unit 420 uses the timing data t1 stored in the timing data storage unit 300 and the activation time t2 of the activated task B to execute the suspended task A execution time t2-t1. Is calculated. Thereby, using only the timing data and task switching time, the execution time of the interrupted task A from the start to the interrupt is easily calculated. Then, the first execution time calculation unit 420 outputs t2−t1 as the execution time of task A to the actual execution time calculation unit 410.

次に、時刻t3で、タスク切り替え部10によりタスクCが起動され起動データが発生してタスクBが中断され、時刻t2と同様の処理が行われる。すなわち、起動情報検出部120は、{SC,t3}を起動信号として出力する。タスク階層生成部220は、タスクCの起動により中断されるタスクとしてタスクBがあることを判断し、タスクBの上位にタスクCを積み上げたタスク種類階層データを生成する。このとき、図3に例示するようなタスク種類階層データが生成される。また、タイミングデータ記憶部300は、タイミングデータとして直前の起動データの発生時刻t2を記憶する。第1の実行時間算出部420は、タイミングデータt2と、起動したタスクCの起動時刻t3とを用いて、中断されるタスクBの実行時間t3-t2 を算出する。これにより、タイミングデータとタスクの切り替え時刻のみを用いて、起動してから中断されるまでの、該中断されるタスクBの実行時間が容易に算出される。そして、第1の実行時間算出部420は、タスクBの実行時間としてt3-t2 を実実行時間算出部410に出力する。   Next, at time t3, task switching unit 10 activates task C, generates activation data, interrupts task B, and performs the same processing as at time t2. That is, the activation information detection unit 120 outputs {SC, t3} as an activation signal. The task hierarchy generation unit 220 determines that there is a task B as a task interrupted by the activation of the task C, and generates task type hierarchy data in which the task C is stacked above the task B. At this time, task type hierarchy data as illustrated in FIG. 3 is generated. Further, the timing data storage unit 300 stores the generation time t2 of the immediately preceding activation data as timing data. The first execution time calculation unit 420 calculates the execution time t3-t2 of the suspended task B using the timing data t2 and the activation time t3 of the activated task C. Thus, using only the timing data and the task switching time, the execution time of the interrupted task B from the start to the interrupt is easily calculated. Then, the first execution time calculation unit 420 outputs t3-t2 as the execution time of task B to the actual execution time calculation unit 410.

次に、時刻t4で、タスク切り替え部10によりタスクCが終了されて終了データが発生し、終了情報検出部130は、タスクCの終了時刻として時刻計測タイマ110から時刻情報t4を取得する。そして、終了情報検出部130は、タスクの種類が識別できる信号とその終了時刻を終了信号{EC,t4}として出力する。この出力される終了信号は、タスク種類削除部230とタイミングデータ記憶部300に入力される。   Next, at time t4, task C is ended by task switching unit 10 to generate end data, and end information detection unit 130 acquires time information t4 from time measurement timer 110 as the end time of task C. Then, the end information detection unit 130 outputs a signal that can identify the type of task and its end time as an end signal {EC, t4}. The output end signal is input to the task type deletion unit 230 and the timing data storage unit 300.

タスク種類削除部230は、タスク種類階層記憶部210からタスク種類階層データを読み出し、その最上位タスクであるタスクCを削除したデータを、タスク種類階層データとしてタスク種類階層記憶部300に記憶させる。このとき、図4に例示するようなタスク種類階層データがタスク種類階層記憶部300に記憶される。削除されたタスクCを表す削除対象データは、第2の実行時間算出部430に終了時刻t4と併せて出力される。また、タイミングデータ記憶部300は、直前の起動データの発生時刻t3をタイミングデータとして出力する。   The task type deletion unit 230 reads the task type hierarchy data from the task type hierarchy storage unit 210, and stores the data obtained by deleting the task C, which is the highest-level task, in the task type hierarchy storage unit 300 as task type hierarchy data. At this time, the task type hierarchy data as illustrated in FIG. 4 is stored in the task type hierarchy storage unit 300. The deletion target data representing the deleted task C is output to the second execution time calculation unit 430 together with the end time t4. Further, the timing data storage unit 300 outputs the generation time t3 of the immediately preceding activation data as timing data.

第2の実行時間算出部430は、タスクの終了時刻t4及びタイミングデータt3より実行時間t4-t3を算出する。これにより、タイミングデータとタスクの切り替え時刻のみを用いて、起動してから終了されるまでの、該終了されるタスクCの実行時間が容易に算出される。そして、第2の実行時間算出部430は、この値をタスク種類削除部230が削除したタスクCの実行時間として実実行時間算出部410に出力する。実実行時間算出部410は、第2の実行時間算出部430の算出結果から、タスクCの実実行時間t3-t2を算出する。これにより、各タスクの起動時刻及び終了時刻を全て記録しておくことなく、タスクCの実実行時間が容易に算出される。   The second execution time calculation unit 430 calculates an execution time t4-t3 from the task end time t4 and the timing data t3. Thereby, using only the timing data and the task switching time, the execution time of the task C to be ended from the start to the end is easily calculated. Then, the second execution time calculation unit 430 outputs this value to the actual execution time calculation unit 410 as the execution time of the task C deleted by the task type deletion unit 230. The actual execution time calculation unit 410 calculates the actual execution time t3-t2 of the task C from the calculation result of the second execution time calculation unit 430. As a result, the actual execution time of task C can be easily calculated without recording all of the start time and end time of each task.

次に、時刻t5で、タスク切り替え部10によりタスクBが終了されて終了データが発生し、時刻t4と同様の処理が行われる。すなわち、終了情報検出部130は、終了信号{EB,t5}を出力する。タスク種類削除部230は、タスク種類階層記憶部210よりタスク種類階層データを読み出し、その最上位タスクであるタスクBを削除したデータを、タスク種類階層データとしてタスク種類階層記憶部210に記憶させる。タイミングデータ記憶部300は、直前の終了データの発生時刻t4をタイミングデータとして記憶する。そして、第2の実行時間算出部430は、タスクの終了時刻t5及びタイミングデータt4より実行時間t5-t4を算出する。これにより、タイミングデータとタスクの切り替え時刻のみを用いて、再開してから終了されるまでの、該終了されるタスクBの実行時間が容易に算出される。そして、第2の実行時間算出部430は、この値をタスク種類削除部230が削除したタスクBの実行時間として実実行時間算出部410に出力する。実実行時間算出部410は、タスクCの起動により算出されたタスクBの起動から中断までの実行時間t3-t2 と、タスクBの終了により算出された再開から終了までの実行時間t5-t4 から、タスクBの実実行時間(t3-t2)+(t5-t4) を算出する。これにより、各タスクの起動時刻及び終了時刻を全て記録しておくことなく、タスクBの実実行時間が容易に算出される。   Next, at time t5, task switching unit 10 ends task B and generates end data, and processing similar to that at time t4 is performed. That is, the end information detection unit 130 outputs an end signal {EB, t5}. The task type deletion unit 230 reads the task type hierarchy data from the task type hierarchy storage unit 210, and stores the data obtained by deleting the task B, which is the highest-level task, in the task type hierarchy storage unit 210 as task type hierarchy data. The timing data storage unit 300 stores the generation time t4 of the last end data as timing data. Then, the second execution time calculation unit 430 calculates an execution time t5-t4 from the task end time t5 and the timing data t4. Thereby, using only the timing data and the task switching time, the execution time of the task B to be ended from the restart to the end is easily calculated. Then, the second execution time calculation unit 430 outputs this value to the actual execution time calculation unit 410 as the execution time of the task B deleted by the task type deletion unit 230. The actual execution time calculation unit 410 is based on the execution time t3-t2 from the start to the end of task B calculated by the start of the task C and the execution time t5-t4 from the restart to the end calculated by the end of the task B. Then, the actual execution time of task B (t3-t2) + (t5-t4) is calculated. As a result, the actual execution time of task B can be easily calculated without recording all the start time and end time of each task.

以下、時刻t6〜t12で、同様な処理によりタスク切り替えの信号(起動信号・終了信号)とタイミングデータのみから、それぞれのタスクの実実行時間を算出することができる。そして、算出された実実行時間は、測定結果データとして測定結果データ記憶部500に記憶され、読み出し器200を介して読み出すことが可能となる。   Thereafter, at times t6 to t12, the actual execution time of each task can be calculated from only the task switching signal (start signal / end signal) and timing data by the same processing. The calculated actual execution time is stored in the measurement result data storage unit 500 as measurement result data and can be read out via the reader 200.

以上の処理により、1つの時刻計測タイマ110を用いて、各タスクA,B,Cの起動時刻および終了時刻を全て記録しておくことなく、各タスクA,B,Cの実実行時間を、タスクの切り替え時刻とそのタイミングデータのみを用いて容易に算出することができる。従って、本発明によれば、複数のタスクを有するソフトウェアの各タスクの実実行時間を、簡便な構成、低処理負荷、少量のメモリで算出して記録することができる。   With the above processing, the actual execution time of each task A, B, C can be obtained without recording all the start time and end time of each task A, B, C using one time measurement timer 110. It can be easily calculated using only the task switching time and its timing data. Therefore, according to the present invention, the actual execution time of each task of software having a plurality of tasks can be calculated and recorded with a simple configuration, a low processing load, and a small amount of memory.

なお、本実施形態では、第1の実行時間算出部420は、中断されるタスクの種類を、タスク種類階層生成部220から出力されるタスク種類階層データから特定しているが、他の実施形態として、タイミングデータ記憶部300に、タイミングデータとして、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻に加えて、該タスクの種類を記憶させ、この記憶されたタスクの種類から、中断されるタスクの種類を特定してもよい。   In the present embodiment, the first execution time calculation unit 420 identifies the type of task to be interrupted from the task type hierarchy data output from the task type hierarchy generation unit 220, but other embodiments The timing data storage unit 300 stores the task type as timing data in addition to the generation time of the data generated immediately before the task start data and end data, and from the stored task type The type of task to be interrupted may be specified.

本発明の実施形態であるタスク実行時間記録装置の機能ブロック図。The functional block diagram of the task execution time recording device which is embodiment of this invention. 図1のタスク実行時間記録装置の測定対象であるソフトウェアにおけるタスク切り替えを示す説明図。Explanatory drawing which shows the task switching in the software which is a measuring object of the task execution time recording device of FIG. 図2のタスク切り替えにおけるタスク種類階層データの例を示す説明図。Explanatory drawing which shows the example of the task kind hierarchy data in the task switching of FIG. 図2のタスク切り替えにおけるタスク種類階層データの他の例を示す説明図。Explanatory drawing which shows the other example of the task kind hierarchy data in the task switching of FIG.

符号の説明Explanation of symbols

10…タスク切り替え部、110…時刻計測タイマ、120…起動情報検出部、130…終了情報検出部、210…タスク種類階層記憶部、220…タスク種類階層生成部、230…タスク種類削除部、300…タイミングデータ記憶部、410…実実行時間算出部、420…第1の実行時間算出部、430…第2の実行時間算出部、500…測定結果データ記憶部、600…読み出し器。   DESCRIPTION OF SYMBOLS 10 ... Task switching part, 110 ... Time measurement timer, 120 ... Activation information detection part, 130 ... End information detection part, 210 ... Task type hierarchy memory | storage part, 220 ... Task type hierarchy production | generation part, 230 ... Task type deletion part, 300 ... timing data storage unit, 410 ... actual execution time calculation unit, 420 ... first execution time calculation unit, 430 ... second execution time calculation unit, 500 ... measurement result data storage unit, 600 ... reader.

Claims (4)

複数のタスクを有するソフトウェアの各タスクの実行時間を記録するタスク実行時間記録装置であって、
各タスクの起動データの発生時の時刻である起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する起動情報検出部と、
各タスクの終了データの発生時の時刻である終了時刻を、終了情報としてそれぞれ検出する終了情報検出部と、
タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶するタイミングデータ記憶部と、
タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、前記タイミングデータ記憶部に記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する第1の実行時間算出部と、
タスクの終了データが発生する毎に、前記タイミングデータ記憶部に記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する第2の実行時間算出部と、
前記第1及び第2の実行時間算出部による算出結果を用いて、各タスクの実実行時間を算出する実実行時間算出部と
を備えることを特徴とするタスク実行時間記録装置。
A task execution time recording device for recording the execution time of each task of software having a plurality of tasks,
An activation information detector that detects the activation time, which is the time when the activation data of each task is generated, and the type of the activated task, as activation information;
An end information detection unit for detecting an end time, which is a time when the end data of each task is generated, as end information;
A timing data storage unit that stores, as timing data, an occurrence time of data generated immediately before task activation data or end data when task activation data or termination data occurs;
Each time task activation data is generated, it is determined whether there is a task interrupted by the activation. If there is a task interrupted, the timing data stored in the timing data storage unit and the activated A first execution time calculation unit that calculates the execution time of the suspended task using the task activation time;
The second execution time for calculating the execution time of the completed task using the timing data stored in the timing data storage unit and the completion time of the completed task each time task completion data is generated A calculation unit;
A task execution time recording apparatus, comprising: an actual execution time calculation unit that calculates an actual execution time of each task using the calculation results of the first and second execution time calculation units.
請求項1記載のタスク実行時間記録装置において、
タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがない場合は、該起動したタスクの種類を最下層とし、中断されるタスクがある場合は、該中断されるタスクの種類の上に該起動したタスクの種類を積み上げることによって生成される、タスク種類階層を生成するタスク種類階層生成部と、
タスクの終了データが発生する毎に、前記タスク種類階層生成部により生成されたタスク種類階層の最上位のタスクの種類を削除するタスク種類削除部とを備え、
前記第2の実行時間算出部で、終了したタスクの種類を特定する際に、前記タスク種類削除部により削除されたタスクの種類を終了したタスクとして特定することを特徴とするタスク実行時間記録装置。
In the task execution time recording device according to claim 1,
Each time task activation data is generated, it is determined whether or not there is a task to be interrupted by the activation. A task type hierarchy generation unit that generates a task type hierarchy generated by stacking the activated task types on the interrupted task types,
A task type deletion unit that deletes the task type at the top of the task type hierarchy generated by the task type hierarchy generation unit each time task end data is generated;
The task execution time recording device characterized in that when the second execution time calculation unit specifies the type of the completed task, the task type deleted by the task type deletion unit is specified as a completed task. .
複数のタスクを有するソフトウェアの各タスクの実行時間を記録するタスク実行時間記録方法であって、
各タスクの起動データの発生時の時刻である起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する起動情報検出ステップと、
各タスクの終了データの発生時の時刻である終了時刻を、終了情報としてそれぞれ検出する終了情報検出ステップと、
タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶するタイミング記憶ステップと、
タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、前記タイミングデータ記憶ステップで記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する第1の実行時間算出ステップと、
タスクの終了データが発生する毎に、前記タイミングデータ記憶ステップで記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する第2の実行時間算出ステップと、
前記第1及び第2の実行時間算出ステップによる算出結果を用いて、各タスクの実実行時間を算出する実実行時間算出ステップと
を備えることを特徴とするタスク実行時間記録方法。
A task execution time recording method for recording the execution time of each task of software having a plurality of tasks,
An activation information detection step of detecting the activation time, which is the time when the activation data of each task is generated, and the type of the activated task as activation information;
An end information detection step for detecting an end time, which is a time when the end data of each task is generated, as end information;
A timing storage step for storing, as timing data, the generation time of the data generated immediately before the task start data or the end data when task start data or end data is generated;
Each time task activation data is generated, it is determined whether there is a task interrupted by the activation. If there is a task interrupted, the timing data stored in the timing data storage step and the activated A first execution time calculating step of calculating an execution time of the suspended task using the task activation time;
The second execution time for calculating the execution time of the completed task using the timing data stored in the timing data storage step and the end time of the completed task each time task completion data is generated A calculation step;
A task execution time recording method comprising: an actual execution time calculation step of calculating an actual execution time of each task using the calculation results of the first and second execution time calculation steps.
複数のタスクを有するソフトウェアの各タスクの実行時間を記録する処理をコンピュータに実行させるタスク実行時間記録用プログラムであって、
各タスクの起動データの発生時の時刻である起動時刻、及び該起動したタスクの種類を、起動情報としてそれぞれ検出する起動情報検出処理と、
各タスクの終了データの発生時の時刻である終了時刻を、終了情報としてそれぞれ検出する終了情報検出処理と、
タスクの起動データもしくは終了データが発生した際に、タスクの起動データ及び終了データのうち直前に発生したデータの発生時刻を、タイミングデータとして記憶するタイミング記憶処理と、
タスクの起動データが発生する毎に、該起動により中断されるタスクがあるか否かを判断し、中断されるタスクがある場合、前記タイミングデータ記憶処理により記憶されたタイミングデータと、該起動したタスクの起動時刻とを用いて、該中断されるタスクの実行時間を算出する第1の実行時間算出処理と、
タスクの終了データが発生する毎に、前記タイミングデータ記憶処理により記憶されたタイミングデータと、該終了したタスクの終了時刻とを用いて、該終了したタスクの実行時間を算出する第2の実行時間算出処理と、
前記第1及び第2の実行時間算出処理による算出結果を用いて、各タスクの実実行時間を算出する実実行時間算出処理と
を前記コンピュータに実行させる機能を備えることを特徴とするタスク実行時間記録用プログラム。
A task execution time recording program for causing a computer to execute a process of recording the execution time of each task of software having a plurality of tasks,
An activation information detection process for detecting the activation time, which is the time when the activation data of each task is generated, and the type of the activated task, as activation information;
An end information detection process for detecting an end time, which is a time when the end data of each task is generated, as end information;
A timing storage process for storing, as timing data, the generation time of the data generated immediately before task activation data or completion data when task activation data or termination data occurs;
Each time task activation data is generated, it is determined whether there is a task interrupted by the activation. If there is an interrupted task, the timing data stored by the timing data storage process and the activated A first execution time calculation process for calculating the execution time of the suspended task using the task activation time;
The second execution time for calculating the execution time of the completed task using the timing data stored by the timing data storage process and the end time of the completed task every time task completion data is generated Calculation process,
A task execution time having a function of causing the computer to execute an actual execution time calculation process for calculating an actual execution time of each task using the calculation results obtained by the first and second execution time calculation processes. Recording program.
JP2007160346A 2007-06-18 2007-06-18 Task execution time recording device, task execution time recording method, and task execution recording program Withdrawn JP2008310748A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007160346A JP2008310748A (en) 2007-06-18 2007-06-18 Task execution time recording device, task execution time recording method, and task execution recording program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007160346A JP2008310748A (en) 2007-06-18 2007-06-18 Task execution time recording device, task execution time recording method, and task execution recording program

Publications (1)

Publication Number Publication Date
JP2008310748A true JP2008310748A (en) 2008-12-25

Family

ID=40238266

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007160346A Withdrawn JP2008310748A (en) 2007-06-18 2007-06-18 Task execution time recording device, task execution time recording method, and task execution recording program

Country Status (1)

Country Link
JP (1) JP2008310748A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4905597B1 (en) * 2011-03-15 2012-03-28 オムロン株式会社 Controller support device, controller support program to be executed in the device, and recording medium storing the program
CN102591206A (en) * 2011-01-13 2012-07-18 西门子公司 Method and system for analyzing temporal flow characteristics
KR101203099B1 (en) 2010-12-27 2012-11-20 재단법인대구경북과학기술원 Method for monitoring running time of OS task framework and apparatus thereof
US8700956B2 (en) 2010-11-29 2014-04-15 Denso Corporation Microcomputer
KR101390267B1 (en) * 2012-11-09 2014-04-30 재단법인대구경북과학기술원 Method for monitoring of os task and apparatus thereof
JP2015018475A (en) * 2013-07-12 2015-01-29 富士電機株式会社 Measurement method and computer device
CN108196995A (en) * 2016-12-08 2018-06-22 成都华为技术有限公司 A kind of determining processing task is averaged the method and apparatus of duration
CN108345494A (en) * 2017-01-23 2018-07-31 武汉斗鱼网络科技有限公司 A kind of timing executes the method and device of code
KR20200080045A (en) * 2018-12-26 2020-07-06 한국항공우주연구원 Satellite and the method for analyzing its software time
JP2022021528A (en) * 2020-07-22 2022-02-03 株式会社日立製作所 Electronic computer, reproduction test method and program

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8700956B2 (en) 2010-11-29 2014-04-15 Denso Corporation Microcomputer
KR101203099B1 (en) 2010-12-27 2012-11-20 재단법인대구경북과학기술원 Method for monitoring running time of OS task framework and apparatus thereof
CN102591206A (en) * 2011-01-13 2012-07-18 西门子公司 Method and system for analyzing temporal flow characteristics
CN102591206B (en) * 2011-01-13 2016-03-30 西门子公司 For the method and system of flow characteristic analysis time
CN103477290A (en) * 2011-03-15 2013-12-25 欧姆龙株式会社 Controller support device, controller support program to be executed in said device, and recording medium storing said program
WO2012124138A1 (en) * 2011-03-15 2012-09-20 オムロン株式会社 Controller support device, controller support program to be executed in said device, and recording medium storing said program
CN103477290B (en) * 2011-03-15 2016-06-29 欧姆龙株式会社 Controller auxiliary device
JP4905597B1 (en) * 2011-03-15 2012-03-28 オムロン株式会社 Controller support device, controller support program to be executed in the device, and recording medium storing the program
US10061281B2 (en) 2011-03-15 2018-08-28 Omron Corporation Controller support device, method, and recording medium
KR101390267B1 (en) * 2012-11-09 2014-04-30 재단법인대구경북과학기술원 Method for monitoring of os task and apparatus thereof
JP2015018475A (en) * 2013-07-12 2015-01-29 富士電機株式会社 Measurement method and computer device
CN108196995B (en) * 2016-12-08 2021-06-01 成都华为技术有限公司 Method and equipment for determining average duration of processing tasks
CN108196995A (en) * 2016-12-08 2018-06-22 成都华为技术有限公司 A kind of determining processing task is averaged the method and apparatus of duration
CN108345494A (en) * 2017-01-23 2018-07-31 武汉斗鱼网络科技有限公司 A kind of timing executes the method and device of code
CN108345494B (en) * 2017-01-23 2022-02-08 武汉斗鱼网络科技有限公司 Method and device for executing code at fixed time
KR102154246B1 (en) * 2018-12-26 2020-09-21 한국항공우주연구원 Satellite and the method for analyzing its software time
KR20200080045A (en) * 2018-12-26 2020-07-06 한국항공우주연구원 Satellite and the method for analyzing its software time
JP2022021528A (en) * 2020-07-22 2022-02-03 株式会社日立製作所 Electronic computer, reproduction test method and program
JP7291107B2 (en) 2020-07-22 2023-06-14 株式会社日立製作所 Electronic computer, reproduction test method and program

Similar Documents

Publication Publication Date Title
JP2008310748A (en) Task execution time recording device, task execution time recording method, and task execution recording program
JP5598235B2 (en) Composite event processing apparatus and composite event processing method
JP5532150B2 (en) Operation management apparatus, operation management method, and program
WO2010061735A1 (en) System for assisting with execution of actions in response to detected events, method for assisting with execution of actions in response to detected events, assisting device, and computer program
JP2006031109A (en) Management system and management method
JP2007334716A (en) Operation management system, monitoring device, device to be monitored, operation management method, and program
US9727394B2 (en) Establishing causality order of computer trace records
CN105630653A (en) CPU vacancy rate determination method and device for Docker container
JP4992740B2 (en) Multiprocessor system, failure detection method, and failure detection program
JP4449929B2 (en) Transaction apparatus, delay fault detection apparatus and method, and program
JP7243207B2 (en) Information processing system, information processing device and program
JP5365273B2 (en) Information processing system, monitoring method, and monitoring program
JP2006277280A (en) Computer system, its date time change method and date change method
JP5531670B2 (en) Data processing apparatus and program
JP6497278B2 (en) Log management program, log management method, and log management apparatus
JP4562641B2 (en) Computer system, operation state determination program, and operation state determination method
JP2008090699A (en) Method, apparatus and program of trace logging
CN113613063B (en) Application anomaly reduction method, device and storage medium
JP2007034864A (en) Diagnostic method for i/o device
JP2007272581A (en) Monitoring program, method and device
JP2022133094A (en) Anomaly factor determination method and anomaly factor determination program
JP6497234B2 (en) Control program, control method, and information processing apparatus
JP2004295508A (en) Business job execution monitoring method and computer program
JP5469357B2 (en) File system state change detection device and file system state change detection program
CN114138433A (en) Method, device and medium for task timing strategy

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20100907