JP6666216B2 - Electronic control unit, analysis system - Google Patents

Electronic control unit, analysis system Download PDF

Info

Publication number
JP6666216B2
JP6666216B2 JP2016169607A JP2016169607A JP6666216B2 JP 6666216 B2 JP6666216 B2 JP 6666216B2 JP 2016169607 A JP2016169607 A JP 2016169607A JP 2016169607 A JP2016169607 A JP 2016169607A JP 6666216 B2 JP6666216 B2 JP 6666216B2
Authority
JP
Japan
Prior art keywords
unit
cpu
electronic control
time
log
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.)
Active
Application number
JP2016169607A
Other languages
Japanese (ja)
Other versions
JP2018036864A (en
Inventor
拓 下沢
拓 下沢
朋仁 蛯名
朋仁 蛯名
博史 峯
博史 峯
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.)
Hitachi Astemo Ltd
Original Assignee
Hitachi Automotive Systems 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 Hitachi Automotive Systems Ltd filed Critical Hitachi Automotive Systems Ltd
Priority to JP2016169607A priority Critical patent/JP6666216B2/en
Priority to PCT/JP2017/026375 priority patent/WO2018042935A1/en
Publication of JP2018036864A publication Critical patent/JP2018036864A/en
Application granted granted Critical
Publication of JP6666216B2 publication Critical patent/JP6666216B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60RVEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
    • B60R16/00Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
    • B60R16/02Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Description

本発明は、電子制御装置、および解析システムに関する。   The present invention relates to an electronic control device and an analysis system.

複数のCPUが協調して動作する電子制御装置においては、複数のCPUが共有する資源へのアクセスの排他制御が必要になる。あるCPUが共有資源を使用している場合は、他のCPUは先のCPUの使用が完了するまでは共有資源を使用できず、待ち時間が生じる。この待ち時間の発生は、電子制御装置の処理能力を低下させるため、待ち時間を生じさせないことが望ましい。そのためには待ち時間の原因の解析が必要であり、解析のために待ち時間をログとして記録することが求められる。
特許文献1には、時刻レジスタにアクセスし、現在時刻と取得した時刻との差分として待ち時間を算出する手法が開示されている。
In an electronic control device in which a plurality of CPUs operate in cooperation, exclusive control of access to resources shared by the plurality of CPUs is required. When a certain CPU is using the shared resource, the other CPU cannot use the shared resource until the use of the previous CPU is completed, which causes a waiting time. Since the occurrence of the waiting time lowers the processing capacity of the electronic control unit, it is desirable that the waiting time does not occur. For that purpose, it is necessary to analyze the cause of the waiting time, and it is required to record the waiting time as a log for the analysis.
Patent Document 1 discloses a method of accessing a time register and calculating a waiting time as a difference between the current time and the acquired time.

国際公開第2012/132017号International Publication No. 2012/132017

特許文献1に記載されている発明では、待ち時間の記録のためのオーバーヘッドが大きい。   In the invention described in Patent Document 1, the overhead for recording the waiting time is large.

本発明の第1の態様による電子制御装置は、複数のCPUコアと、共有資源とを備える電子制御装置であって、前記CPUコアのそれぞれは排他制御により前記共有資源を独占して使用可能であり、カウンタ値が格納される更新カウンタ格納部と、前記CPUコアが実行したプログラムのログが格納されるログ格納部と、前記CPUコアが前記共有資源にアクセスしたときに、前記カウンタ値を変化させるカウンタ更新部と、前記CPUコアが前記共有資源にアクセスしたときに、前記共有資源が他のCPUコアにより排他制御されていない場合には、前記カウンタ値を含む前記ログを前記ログ格納部に記録するカウンタ記録部とをさらに備える。
本発明の第2の態様による解析システムは、第1の態様の電子制御装置と、解析装置と、を備え、前記解析装置は、前記電子制御装置の前記ログ格納部に格納された前記ログが入力されるログ収集部と、前記カウント値を実時間に換算するための換算情報を格納する記憶部と、前記換算情報を用いて、前記ログ収集部に入力された前記カウンタ値を実時間に換算する解析部と、を備える。
An electronic control device according to a first aspect of the present invention is an electronic control device including a plurality of CPU cores and a shared resource, wherein each of the CPU cores can exclusively use the shared resource by exclusive control. An update counter storage unit for storing a counter value, a log storage unit for storing a log of a program executed by the CPU core, and changing the counter value when the CPU core accesses the shared resource. A counter updating unit that causes the log including the counter value to be stored in the log storage unit when the shared resource is not exclusively controlled by another CPU core when the CPU core accesses the shared resource. And a counter recording unit for recording.
An analysis system according to a second aspect of the present invention includes the electronic control device according to the first aspect and an analysis device, wherein the analysis device stores the log stored in the log storage unit of the electronic control device. An input log collection unit, a storage unit that stores conversion information for converting the count value to real time, and using the conversion information, the counter value input to the log collection unit is converted to real time. And an analysis unit for conversion.

本発明によれば、待ち時間の記録のためのオーバーヘッドを減らすことができる。   According to the present invention, it is possible to reduce overhead for recording a waiting time.

解析システムの構成を示す図Diagram showing the configuration of the analysis system 電子制御装置の動作例を示す図Diagram showing an operation example of the electronic control device 第1バッファの一例を示す図The figure which shows an example of a 1st buffer. 第2バッファの一例を示す図The figure which shows an example of a 2nd buffer 時間変換テーブルの一例を示す図Diagram showing an example of a time conversion table 解析結果の一例を示す図Diagram showing an example of analysis results 電子制御装置の動作を表すフローチャートFlow chart showing the operation of the electronic control unit ログ解析の動作を表すフローチャートFlow chart showing log analysis operation 第2の実施の形態における電子制御装置の構成を示す図FIG. 3 is a diagram illustrating a configuration of an electronic control device according to a second embodiment. 第2の実施の形態における電子制御装置の動作を表すフローチャート9 is a flowchart illustrating the operation of the electronic control device according to the second embodiment. 第3の実施の形態における第1バッファの一例を示す図FIG. 14 is a diagram illustrating an example of a first buffer according to the third embodiment. 第3の実施の形態における時間変換テーブルの一例を示す図The figure which shows an example of the time conversion table in 3rd Embodiment. 第3の実施の形態における電子制御装置の動作を表すフローチャート10 is a flowchart illustrating the operation of the electronic control device according to the third embodiment.

(第1の実施の形態)
以下、図1〜図8を参照して、電子制御装置の第1の実施の形態を説明する。
図1は、本発明に係る電子制御装置100、および解析システム1の構成を示す図である。解析システム1は、電子制御装置100と、解析装置200とから構成される。
(First Embodiment)
Hereinafter, a first embodiment of an electronic control unit will be described with reference to FIGS.
FIG. 1 is a diagram showing a configuration of an electronic control device 100 and an analysis system 1 according to the present invention. The analysis system 1 includes an electronic control device 100 and an analysis device 200.

電子制御装置100は、たとえばECU(ElectronicControl Unit)である。電子制御装置100は、第1CPU160と、第2CPU170と、これら2つのCPUが使用可能な共有資源110と、主記憶装置であるメモリ130と、現在時刻の情報を有するタイマ120と、ログ出力部180とを備える。以下では、第1CPU160と第2CPU170とをまとめて、「CPU」とも呼ぶ。   The electronic control unit 100 is, for example, an ECU (Electronic Control Unit). The electronic control unit 100 includes a first CPU 160, a second CPU 170, a shared resource 110 usable by these two CPUs, a memory 130 as a main storage device, a timer 120 having current time information, and a log output unit 180. And Hereinafter, the first CPU 160 and the second CPU 170 will be collectively referred to as “CPU”.

共有資源110は、メモリ130の一部の領域、メモリ130とは独立した物理メモリ、またはいずれかのCPUのハードウエアレジスタである。共有資源110は、第1CPU160および第2CPU170からアクセスが可能であり、後述する排他制御によりいずれかのCPUにより共有資源110が専有される。共有資源110は、ロック変数111、およびタスク情報112が格納される記憶部を備える。   The shared resource 110 is a partial area of the memory 130, a physical memory independent of the memory 130, or a hardware register of any CPU. The shared resource 110 can be accessed by the first CPU 160 and the second CPU 170, and the shared resource 110 is occupied by any one of the CPUs through exclusive control described later. The shared resource 110 includes a storage unit in which a lock variable 111 and task information 112 are stored.

ロック変数111は、排他制御の状態を示す変数であり、たとえば「ゼロ」と「1」の値をとる本実施の形態では、ロック変数111が「0」の状態とは、共有資源110がいずれのCPUによっても排他制御されていない、すなわち専有されていない状態である。また、ロック変数111が「1」の状態とは、共有資源110がいずれかのCPUによって排他制御されている、すなわち専有されている状態である。   The lock variable 111 is a variable indicating the state of the exclusive control. For example, in the present embodiment that takes values of “zero” and “1”, the state of the lock variable 111 of “0” means that the shared resource 110 Is not exclusively controlled by the CPU, that is, the CPU is not exclusively used. The state in which the lock variable 111 is “1” is a state in which the shared resource 110 is exclusively controlled by any one of the CPUs, that is, a state in which the shared resource 110 is exclusively used.

タスク情報112は、共有資源110を専有した最新のタスクの識別子を示す変数である。換言すると、ロック変数111が最後に「1」に設定された際に、共有資源110を占有したCPUにおいて実行されていたタスクの識別子がタスク情報112として保存される。なお、タスクの識別子だけではそのタスクを実行したCPUを特定できない場合は、そのタスクを実行したCPUを特定する情報も識別情報としてタスク情報112に含まれる。なお上述したタスクとは、CPUが実行する処理を意味しており、処理系によってジョブ、プロセス、スレッドなどと呼ばれる。   The task information 112 is a variable indicating the identifier of the latest task that has occupied the shared resource 110. In other words, when the lock variable 111 is finally set to “1”, the identifier of the task executed in the CPU occupying the shared resource 110 is stored as the task information 112. When the CPU that has executed the task cannot be identified only by the identifier of the task, information that identifies the CPU that executed the task is also included in the task information 112 as identification information. The above-described task means a process executed by the CPU, and is called a job, a process, a thread, or the like depending on the processing system.

第1CPU160および第2CPU170のそれぞれは、個別のCPUであり、それぞれがCPUコアを有する。すなわち電子制御装置100は、複数の物理CPUを備えるいわゆるマルチプロセッサ構成を有する装置である。第1CPU160は、不図示のプログラムをメモリ130に展開して実行することにより、第1ロック取得部161および第1カウンタ記録部162として動作する。第2CPU170は、不図示のプログラムをメモリ130に展開して実行することにより、第2ロック取得部171および第2カウンタ記録部172として動作する。第1CPU160および第2CPU170は、以下のように共有資源110を一時的に専有して使用する。   Each of first CPU 160 and second CPU 170 is an individual CPU, and each has a CPU core. That is, the electronic control device 100 is a device having a so-called multiprocessor configuration including a plurality of physical CPUs. The first CPU 160 operates as a first lock acquisition unit 161 and a first counter recording unit 162 by expanding a program (not shown) in the memory 130 and executing the program. The second CPU 170 operates as a second lock acquisition unit 171 and a second counter recording unit 172 by loading and executing a program (not shown) in the memory 130. The first CPU 160 and the second CPU 170 temporarily occupy and use the shared resource 110 as described below.

CPU,すなわち第1CPU160および第2CPU170は、共有資源110を使用する必要が生じると、まずロック変数111の値を確認する。CPUが確認した際にロック変数111が「ゼロ」であれば、CPUはロック変数111を「1」に書き換えて共有資源110を専有して使用し、使用が終了するとロック変数111を「1」から「ゼロ」に書き換える。CPUが確認した際にロック変数111が「1」であった場合は、そのCPUは所定時間ごとにロック変数111にアクセスし、ロック変数111が「ゼロ」に変更されるまでアクセスを続ける。なお、CPUがロック変数111にアクセスする時間間隔は既知であり、この時間間隔に基づき後述する時間変換テーブル212があらかじめ作成されている。   When the CPUs, that is, the first CPU 160 and the second CPU 170 need to use the shared resource 110, the CPU first checks the value of the lock variable 111. If the lock variable 111 is “zero” when the CPU confirms, the CPU rewrites the lock variable 111 to “1” and uses the shared resource 110 exclusively, and when the use ends, sets the lock variable 111 to “1”. From "to zero". If the lock variable 111 is “1” when the CPU confirms, the CPU accesses the lock variable 111 at predetermined time intervals, and keeps accessing until the lock variable 111 is changed to “zero”. The time interval at which the CPU accesses the lock variable 111 is known, and a time conversion table 212 described later is created in advance based on this time interval.

このように、共有資源110の専有に成功するまで、上記の例ではロック変数111が「ゼロ」になるまで、アクセスを繰り返す排他制御方式は「スピンロック」と呼ばれる。本実施の形態では、スピンロックにおける共有資源110の専有を試みた回数、すなわちロック変数111の値を確認した2回目以降の回数を「スピン回数」と呼ぶ。たとえば、ロック変数111を確認した初回で「ゼロ」であった場合はスピン回数はゼロであり、ロック変数111を確認した3回目で初めて「ゼロ」であった場合はスピン回数は2である。また、共有資源110を使用するために、初回にロック変数111の値を確認してからロック変数111に「1」を代入できるまでの時間を「ロック待ち時間」と呼ぶ。さらに、ロック変数111を「ゼロ」から「1」に書き換えて共有資源110を排他制御することを「ロック取得」とも呼ぶ。   As described above, the exclusive control method that repeats the access until the shared resource 110 is successfully occupied and the lock variable 111 becomes “zero” in the above example is called “spin lock”. In the present embodiment, the number of attempts to occupy the shared resource 110 in the spin lock, that is, the number of times after the second check of the value of the lock variable 111 is referred to as “spin count”. For example, the number of spins is zero when the lock variable 111 is checked for the first time and the number of spins is zero when the lock variable 111 is checked for the first time and the number of spins is two. Further, the time from when the value of the lock variable 111 is checked for the first time to when the value “1” can be assigned to the lock variable 111 to use the shared resource 110 is referred to as “lock wait time”. Further, the exclusive control of the shared resource 110 by rewriting the lock variable 111 from “zero” to “1” is also referred to as “lock acquisition”.

このロック取得を行うのが、第1ロック取得部161および第2ロック取得部171である。第1ロック取得部161は第1CPU160が共有資源110を使用する場合に動作し、第2ロック取得部171は第2CPU170が共有資源110を使用する場合に動作する。第1ロック取得部161および第2ロック取得部171による、ロック変数111の確認、およびロック変数111が「ゼロ」であった場合の「1」の代入は、TEST−and−SET命令としてアトミックに実行される。すなわち、変数の確認と変数への代入は他のCPUからは一連の動作として割り込まれることなく実行される。   The first lock acquisition unit 161 and the second lock acquisition unit 171 perform this lock acquisition. The first lock acquisition unit 161 operates when the first CPU 160 uses the shared resource 110, and the second lock acquisition unit 171 operates when the second CPU 170 uses the shared resource 110. Confirmation of the lock variable 111 and substitution of “1” when the lock variable 111 is “zero” by the first lock acquisition unit 161 and the second lock acquisition unit 171 are performed atomically as a TEST-and-SET instruction. Be executed. That is, the confirmation of the variable and the assignment to the variable are executed without interruption from the other CPUs as a series of operations.

第1カウンタ記録部162、および第2カウンタ記録部172は、第1ロック取得部161および第2ロック取得部171によるロック取得後に、ロック変数111の値などを第1バッファ151および第2バッファ152に格納する。第1カウンタ記録部162、および第2カウンタ記録部172の動作は後に詳述する。
タイマ120は、時刻を管理するハードウェアである。タイマ120は、時刻情報を示す時刻レジスタ121を備える。時刻情報は、絶対時刻であってもよいし、電子制御装置100の電源がオンにされた時点など所定の時刻を基準、たとえばゼロとする相対時刻であってもよい。
The first counter recording unit 162 and the second counter recording unit 172 store the value of the lock variable 111 and the like after the first lock acquisition unit 161 and the second lock acquisition unit 171 acquire the lock, respectively. To be stored. The operations of the first counter recording unit 162 and the second counter recording unit 172 will be described later in detail.
The timer 120 is hardware for managing time. The timer 120 includes a time register 121 indicating time information. The time information may be an absolute time, or may be a relative time with reference to a predetermined time such as the time when the power of the electronic control device 100 is turned on, for example, zero.

メモリ130は、記憶装置であり、CPUによって実行されるプログラム及びデータが保持される。メモリ130は、その機能として更新カウンタ格納部140と、ログ格納部150とを備える。なお、共有資源110、メモリ130、およびタイマ120は、それぞれ電子制御装置100上のCPUと独立したハードウェアであってもよいし、SoC(System−on−Chip)のように一つの半導体チップ上に統合されていてもよい。   The memory 130 is a storage device and stores programs and data executed by the CPU. The memory 130 includes an update counter storage unit 140 and a log storage unit 150 as its functions. The shared resource 110, the memory 130, and the timer 120 may each be hardware independent of the CPU on the electronic control unit 100, or may be on a single semiconductor chip such as an SoC (System-on-Chip). It may be integrated into.

更新カウンタ格納部140には、第1カウンタ141、および第2カウンタ142が格納される。第1カウンタ141は、第1CPU160により更新されるカウンタ値であり、第1CPU160のスピン回数を示す。第2カウンタ142は、第2CPU170により更新されるカウンタ値であり、第2CPU170のスピン回数を示す。第1カウンタ141、および第2カウンタ142の初期値はゼロであり、更新によりそれぞれ1ずつ増加される。   The update counter storage section 140 stores a first counter 141 and a second counter 142. The first counter 141 is a counter value updated by the first CPU 160, and indicates the number of spins of the first CPU 160. The second counter 142 is a counter value updated by the second CPU 170 and indicates the number of spins of the second CPU 170. The initial values of the first counter 141 and the second counter 142 are zero, and each is incremented by one by updating.

ログ格納部150は、第1バッファ151、および第2バッファ152を備える。第1バッファ151には第1CPU160が実行したプログラムのログが格納される。第2バッファ152には第2CPU170が実行したプログラムのログが格納される。ログ格納部150に格納されたログは、後述するログ出力部180を経由して解析装置200に出力される。
ログ出力部180は、解析装置200のログ収集部270と通信を行うインタフェースである。ログ出力部180はたとえば、JTAGなどのデバッグ用インタフェース、またはCAN(CarAreaNetwork)やIEEE802.3に対応する通信インタフェースである。ログ出力部180は、解析装置200からの要求に応じて、または一定時間ごとに解析装置200にログを出力する。
The log storage unit 150 includes a first buffer 151 and a second buffer 152. The log of the program executed by the first CPU 160 is stored in the first buffer 151. The log of the program executed by the second CPU 170 is stored in the second buffer 152. The log stored in the log storage unit 150 is output to the analysis device 200 via a log output unit 180 described later.
The log output unit 180 is an interface that communicates with the log collection unit 270 of the analysis device 200. The log output unit 180 is, for example, a debug interface such as JTAG, or a communication interface corresponding to CAN (CarAreaNetwork) or IEEE802.3. The log output unit 180 outputs a log to the analysis device 200 in response to a request from the analysis device 200 or at regular intervals.

(解析装置の構成)
解析装置200は、メモリ210と、ログ解析部220と、表示部230と、CPU260と、ログ収集部270とを備える、たとえばコンピュータである。メモリ210には、電子制御装置100の各CPUのログが集約される収集バッファ211、スピン回数と時間の関係を示す時間変換テーブル212、およびログ解析部220により出力される解析結果213が格納される。
ログ解析部220は、収集バッファ211に格納されるログを時間変換テーブル212を用いて解析する。換言するとログ解析部220は、スピン回数として記録されているロック待ち時間を実時間に変換する。ログ解析部220が解析した結果は、解析結果213としてメモリ210に格納されるとともに表示部230に表示される。
(Configuration of analyzer)
The analysis device 200 is, for example, a computer including a memory 210, a log analysis unit 220, a display unit 230, a CPU 260, and a log collection unit 270. The memory 210 stores a collection buffer 211 in which logs of the CPUs of the electronic control device 100 are collected, a time conversion table 212 indicating the relationship between the number of spins and time, and an analysis result 213 output by the log analysis unit 220. You.
The log analysis unit 220 analyzes the log stored in the collection buffer 211 using the time conversion table 212. In other words, the log analysis unit 220 converts the lock waiting time recorded as the number of spins into real time. The result analyzed by the log analysis unit 220 is stored in the memory 210 as the analysis result 213 and displayed on the display unit 230.

表示部230は、収集バッファ211に格納されるログ、およびログ解析部220により出力された解析結果213を表示する。ただし表示部230は、解析装置200に接続された表示装置に表示すべき情報を出力する装置であってもよい。CPU260は、解析装置200を動作させる演算装置である。CPU260のアーキテクチャ、コア数、ソケット数、動作速度等は特に限定されない。
ログ収集部270は、電子制御装置100のログ出力部180と通信を行うインタフェースである。ログ収集部270はたとえば、JTAGなどのデバッグ用インタフェース、またはCANやIEEE802.3に対応する通信インタフェースである。ログ収集部270は、電子制御装置100から受信するログを収集バッファ211に格納する。
The display unit 230 displays the log stored in the collection buffer 211 and the analysis result 213 output by the log analysis unit 220. However, the display unit 230 may be a device that outputs information to be displayed on a display device connected to the analysis device 200. The CPU 260 is an arithmetic device that operates the analysis device 200. The architecture, the number of cores, the number of sockets, the operation speed, and the like of the CPU 260 are not particularly limited.
The log collection unit 270 is an interface that communicates with the log output unit 180 of the electronic control device 100. The log collection unit 270 is, for example, a debugging interface such as JTAG, or a communication interface corresponding to CAN or IEEE802.3. The log collection unit 270 stores the log received from the electronic control device 100 in the collection buffer 211.

(動作例)
図2を用いて第1CPU160および第2CPU170の動作例を説明する。図2に示すタイムチャートは、第1CPU160および第2CPU170が実行するタスク、およびロック取得を示している。図示左から右に向かって時間が経過している。図2の上部に示す数字は時刻レジスタ121から得られる時刻を示している。後に図3、図4を用いて説明する、第1バッファ151、および第2バッファ152に格納されるログは図2に示す動作により得られたログである。なお以下では、複数回実行される共有資源110の排他制御、すなわちロック取得のそれぞれを便宜的に区別するために、実行される順番に、ロックL,ロックM,ロックN、・・・と呼ぶ。
(Operation example)
An operation example of the first CPU 160 and the second CPU 170 will be described with reference to FIG. The time chart illustrated in FIG. 2 illustrates tasks executed by the first CPU 160 and the second CPU 170, and lock acquisition. Time elapses from left to right in the figure. The numbers at the top of FIG. 2 indicate the time obtained from the time register 121. The logs stored in the first buffer 151 and the second buffer 152, which will be described later with reference to FIGS. 3 and 4, are logs obtained by the operation shown in FIG. In the following, in order to conveniently discriminate the exclusive control of the shared resource 110 that is executed a plurality of times, that is, lock acquisition, for convenience, they are referred to as lock L, lock M, lock N,. .

第1CPU160は、時刻850から時刻910までの間タスクAを実行しており、時刻880に割り込みRが発生し、時刻900まで割り込みRが継続する。第1CPU160は、時刻860にロックLの取得を開始し、時刻885にロックNの取得を開始し、時刻900の少し前にロックOの取得を開始している。第2CPU170は、時刻840から時刻920までの間タスクBを実行しており、時刻870に割り込みQが発生し、時刻890まで割り込みQが継続する。第2CPU170は、時刻880にロックMの取得を開始し、ロックMの取得後は共有資源110を使用して時刻885を経過した後に共有資源110の使用を終了した。また、第1CPU160のロックNの取得に関して、その時のスピン回数は300であり、その前に共有資源110を使用していたタスクは割り込みQである。それ以外のロック取得、すなわちロックL,ロックM,ロックOのスピン回数はゼロである。スピン回数がゼロの場合はロックの取得は即座に行われる。   The first CPU 160 is executing the task A from the time 850 to the time 910, the interrupt R occurs at the time 880, and the interrupt R continues until the time 900. The first CPU 160 starts acquisition of the lock L at time 860, starts acquisition of the lock N at time 885, and starts acquisition of the lock O shortly before time 900. The second CPU 170 is executing the task B from the time 840 to the time 920, the interrupt Q occurs at the time 870, and the interrupt Q continues until the time 890. The second CPU 170 started acquiring the lock M at time 880, and after acquiring the lock M, uses the shared resource 110 and ends the use of the shared resource 110 after the time 885 has elapsed. Regarding the acquisition of the lock N by the first CPU 160, the number of spins at that time is 300, and the task using the shared resource 110 before that is the interrupt Q. Other lock acquisitions, that is, the number of spins of lock L, lock M, and lock O are zero. If the number of spins is zero, the lock is acquired immediately.

(バッファの構成)
図3、および図4は、第1バッファ151、および第2バッファ152に格納される情報の一例を示す図である。ここでは、図2に示す動作が行われた際に、第1バッファ151、および第2バッファ152に格納される情報を示している。第1バッファ151、および第2バッファ152の構成は同一なので、代表して第1バッファ151を説明する。第1バッファ151には、1または複数のレコードから構成されるログが格納される。第1バッファ151の各レコードは、イベント種類311、イベント内容312、タイムスタンプ313、待ち時間314、タスク情報315の5つのフィールドを備える。第1バッファ151の各レコードが、第1CPU160において実行されるプログラムの各イベントに対応する。
(Structure of buffer)
FIG. 3 and FIG. 4 are diagrams illustrating an example of information stored in the first buffer 151 and the second buffer 152. Here, the information stored in the first buffer 151 and the second buffer 152 when the operation shown in FIG. 2 is performed is shown. Since the configurations of the first buffer 151 and the second buffer 152 are the same, the first buffer 151 will be described as a representative. The first buffer 151 stores a log including one or a plurality of records. Each record of the first buffer 151 includes five fields of an event type 311, an event content 312, a time stamp 313, a waiting time 314, and task information 315. Each record of the first buffer 151 corresponds to each event of the program executed by the first CPU 160.

イベント種類311のフィールドには、発生したイベントの種類、たとえば「タスク開始」、「ロック取得」などが格納される。イベント内容312のフィールドには、発生したイベントの対象、たとえば「タスクA」「割り込みR」などが格納される。たとえばイベント種類が「タスク開始」、イベント内容312が「タスクA」であれば、そのログは、そのCPUにおいてタスクAの実行が開始された、というイベントを表している。   The field of the event type 311 stores the type of event that has occurred, for example, “task start”, “lock acquisition”, and the like. The field of the event content 312 stores the target of the generated event, for example, “task A”, “interrupt R”, and the like. For example, if the event type is “task start” and the event content 312 is “task A”, the log indicates an event that the execution of task A has been started in the CPU.

タイムスタンプ313のフィールドには、イベントが発生した時刻の情報が格納される。時刻情報は、タイマ120の時刻レジスタ121から得られる。待ち時間314のフィールドには、第1カウンタ141から得られるロック待ち時間を示す情報、すなわちスピン回数が格納される。タスク情報315のフィールドには、スピン回数が1以上であるときにロック取得に成功した際のタスク情報112の値が格納される。以下では、あるフィールドに格納された値をフィールドの名称で呼ぶことがある。たとえば「イベント種類311のフィールドに格納された値がxx」であることを、「イベント種類311がxx」と記載することがある。
各レコードのフィールドには、特定の条件で記録される、または特定の条件で記録されないものがある。
In the field of the time stamp 313, information on the time when the event occurs is stored. The time information is obtained from the time register 121 of the timer 120. In the field of the waiting time 314, information indicating the lock waiting time obtained from the first counter 141, that is, the number of spins is stored. In the field of the task information 315, the value of the task information 112 when the lock acquisition is successful when the spin count is 1 or more is stored. Hereinafter, a value stored in a certain field may be referred to by a field name. For example, "the value stored in the field of the event type 311 is xx" may be described as "event type 311 is xx".
Some fields of each record are recorded under specific conditions or are not recorded under specific conditions.

タイムスタンプ313のフィールドには、以下の条件で記録がされない。すなわち、イベント種類311が「ロック取得」であり待ち時間314がゼロ(0)の場合は、タイムスタンプ313のフィールドには値が記録されない。それ以外の場合、すなわち第1CPU160が二回目以降のアクセスでロック取得できた場合に、タイムスタンプ313のフィールドには値が記録される。ロック取得の待ち時間がゼロの場合は時刻を記録する必要性に乏しく、さらに時刻の記録に要するオーバーヘッドが大きいからである。図3、および図4に示す例では、待ち時間314がゼロであるロックL,M,Oのイベントではタイムスタンプ313が記録されていない。   The field of the time stamp 313 is not recorded under the following conditions. That is, when the event type 311 is “lock acquisition” and the waiting time 314 is zero (0), no value is recorded in the field of the time stamp 313. In other cases, that is, when the first CPU 160 can acquire the lock in the second and subsequent accesses, a value is recorded in the field of the time stamp 313. If the waiting time for lock acquisition is zero, it is not necessary to record the time, and the overhead required for recording the time is large. In the examples shown in FIG. 3 and FIG. 4, the time stamp 313 is not recorded in the event of the lock L, M, O where the waiting time 314 is zero.

待ち時間314のフィールドには、イベント種類311が「ロック取得」である場合に記録される。すなわち、イベント種類311が「ロック取得」以外の場合は、待ち時間314のフィールドには値が記録されない。前述のとおり、待ち時間314のフィールドにはスピン回数が格納されるので、スピンが発生しえない「ロック取得」以外のイベントでは記録が不可能だからである。図3および図4に示す例では、待ち時間314がゼロではないロックNのイベントのみタスク情報315が記録される。   The field of the waiting time 314 is recorded when the event type 311 is “lock acquisition”. That is, when the event type 311 is other than “lock acquisition”, no value is recorded in the field of the waiting time 314. As described above, since the number of spins is stored in the field of the waiting time 314, recording is not possible in an event other than "lock acquisition" in which spin cannot occur. In the example shown in FIGS. 3 and 4, the task information 315 is recorded only for the event of the lock N whose waiting time 314 is not zero.

タスク情報315のフィールドには、イベント種類311が「ロック取得」であり待ち時間314がゼロ以外である場合、すなわち第1CPU160が二回目以降のアクセスでロック取得できた場合に、値が記録される。それ以外の場合はタスク情報315のフィールドには値が記録されない。ロック取得の待ち時間がゼロの場合は、直前に共有資源110を使用していたタスクを特定する必要性が乏しいからである。
なお、図2と図3においては、第1バッファ151および第2バッファを単純な表として記載しているが、リングバッファのような構造であってもよく、また実際のデータ格納には、可変長のレコードを用いてもよい。
In the field of the task information 315, a value is recorded when the event type 311 is "lock acquisition" and the waiting time 314 is other than zero, that is, when the first CPU 160 can acquire the lock by the second or subsequent access. . In other cases, no value is recorded in the field of the task information 315. If the waiting time for lock acquisition is zero, it is not necessary to identify the task that has used the shared resource 110 immediately before.
In FIGS. 2 and 3, the first buffer 151 and the second buffer are described as simple tables, but may have a structure such as a ring buffer. A long record may be used.

(時間変換テーブル)
図5は、時間変換テーブル212の一例を示す図である。時間変換テーブル212は、第1バッファ151や第2バッファ152における待ち時間のフィールドに格納されたスピン回数と実時間の対応表であり、待ち時間321、実時間322のフィールドを備える。待ち時間321のフィールドには、待ち時間すなわちスピン回数が格納され、実時間322のフィールドには、待ち時間321に格納された待ち時間(スピン回数)の値に対応する実時間の値が格納される。図5には、待ち時間がゼロであれば実時間もゼロであり、待ち時間が「1」であれば実時間は「5マイクロ秒」であり、待ち時間が「1+n」であれば実時間は「5+4*nマイクロ秒」であることが示されている。
(Time conversion table)
FIG. 5 is a diagram illustrating an example of the time conversion table 212. The time conversion table 212 is a correspondence table between the number of spins stored in the field of the waiting time in the first buffer 151 and the second buffer 152 and the real time, and includes fields of the waiting time 321 and the real time 322. The field of the waiting time 321 stores the waiting time, that is, the number of spins, and the field of the real time 322 stores the value of the real time corresponding to the value of the waiting time (number of spins) stored in the waiting time 321. You. In FIG. 5, if the waiting time is zero, the real time is also zero, if the waiting time is “1”, the real time is “5 microseconds”, and if the waiting time is “1 + n”, the real time is real time. Is "5 + 4 * n microseconds".

たとえば図2および図3に示したロックNについて、時間変換テーブル212を用いることで以下のことがわかる。ロックNは、図3の待ち時間314に格納されている待ち時間の値が300、すなわち1+299であるため、ロックNを取得するのに要した実時間は5+4*299=1201マイクロ秒である。さらに、ロックNの取得を開始したのが時刻885なので、時刻885から1201マイクロ秒経過したときにロックNが取得されたことがわかる。
なお、時間変換テーブル212に格納される情報は、図5に示したようなテーブル形式以外の情報であってもよい。すなわち、スピン回数と実時間の関係を適切に表す情報であれば、どのような形式の情報を時間変換テーブル212に格納してもよい。
For example, the following can be understood by using the time conversion table 212 for the lock N shown in FIGS. For lock N, the value of the waiting time stored in the waiting time 314 in FIG. 3 is 300, that is, 1 + 299, so the actual time required to acquire lock N is 5 + 4 * 299 = 11201 microseconds. Furthermore, since acquisition of lock N was started at time 885, it can be seen that lock N was acquired when 1201 microseconds had elapsed from time 885.
The information stored in the time conversion table 212 may be information other than the table format shown in FIG. That is, any type of information may be stored in the time conversion table 212 as long as the information appropriately represents the relationship between the number of spins and real time.

(解析結果)
図6は、解析装置200のログ解析部220が出力する解析結果213の一例を示す図である。解析結果213には、収集バッファ211に格納されたログを解析して得られた情報であって、待ち時間の発生したロック取得イベントの詳細が記される。解析結果213を構成するレコードのそれぞれはロック取得イベントにそれぞれ対応する。解析結果213は、処理CPU331と、発生処理332と、ロック333と、タイムスタンプ334と、実待ち時間335と、原因CPU336と、原因処理337との7つのフィールドから構成される。
(Analysis result)
FIG. 6 is a diagram illustrating an example of the analysis result 213 output by the log analysis unit 220 of the analysis device 200. The analysis result 213 is information obtained by analyzing the log stored in the collection buffer 211, and details the lock acquisition event in which the waiting time has occurred. Each of the records constituting the analysis result 213 corresponds to a lock acquisition event. The analysis result 213 includes seven fields of a processing CPU 331, a generation processing 332, a lock 333, a time stamp 334, an actual waiting time 335, a cause CPU 336, and a cause processing 337.

処理CPU331のフィールドには、そのロック取得イベントが発生したCPUの識別子、または名称が格納される。発生処理332のフィールドには、そのロック取得イベントを発生させたタスクもしくは割り込み処理の名称が格納される。ロック333のフィールドには、便宜的に設定したロックの名称が格納される。タイムスタンプ334のフィールドには、そのロック取得イベントが発生した時刻の情報が格納される。実待ち時間335のフィールドには、時間変換テーブル212を用いて変換されたロック取得までの待ち時間が格納される。原因CPU336のフィールドには、ロック取得において待ちの原因となったCPUの識別子または名称が格納される。原因処理337のフィールドには、ロック取得において待ちの原因となったタスクの識別子が格納される。待ちの原因となったCPU及びタスクとは、そのイベントにおいてロック取得を試みた際に、そのロックを保持していたCPUとそのCPUが実行していたタスクである。待ちの原因となったCPU及びタスクは、タスク情報112から特定される。   The field of the processing CPU 331 stores the identifier or name of the CPU in which the lock acquisition event has occurred. The field of the occurrence process 332 stores the name of the task or interrupt process that caused the lock acquisition event. The field of the lock 333 stores the name of the lock set for convenience. In the field of the time stamp 334, information on the time when the lock acquisition event occurs is stored. In the field of the actual waiting time 335, the waiting time until the lock obtained by using the time conversion table 212 is stored. The field of the cause CPU 336 stores the identifier or name of the CPU that caused the wait in lock acquisition. The field of the cause process 337 stores the identifier of the task that caused the wait in lock acquisition. The CPU and the task that caused the wait are the CPU holding the lock and the task being executed by the CPU when the lock acquisition was attempted in the event. The CPU and the task that caused the wait are specified from the task information 112.

図6の1レコード目を具体的に説明する。このレコードは、図3における4レコード目のログに基づき生成されている。第1CPU160が時刻185にロックNを取得するために、スピン回数300の待ちが発生した。そのため解析結果213では、処理CPU331に「第1CPU」、発生処理332に「割り込みR」、ロック333に「ロックN」、タイムスタンプ334に「185」が格納される。また、300回のスピンは、時間変換テーブル212によると1201マイクロ秒に相当するので、実待ち時間335のフィールドには「1201マイクロ秒」が格納される。直前に共有資源110を使用したタスクは割り込みQであり、そのタスクは第2CPU170により実行されたので、原因CPU336のフィールドには「第2CPU」、原因処理337のフィールドには「割り込みQ」が格納される。   The first record in FIG. 6 will be specifically described. This record is generated based on the log of the fourth record in FIG. In order for the first CPU 160 to acquire the lock N at the time 185, a wait of the number of spins 300 occurred. Therefore, in the analysis result 213, “first CPU” is stored in the processing CPU 331, “interrupt R” is generated in the generation processing 332, “lock N” is stored in the lock 333, and “185” is stored in the time stamp 334. Further, since 300 spins correspond to 1201 microseconds according to the time conversion table 212, "1201 microseconds" is stored in the field of the actual waiting time 335. The task that used the shared resource 110 immediately before was interrupt Q, and since the task was executed by the second CPU 170, “second CPU” is stored in the field of the cause CPU 336 and “interrupt Q” is stored in the field of the cause process 337. Is done.

(解析システム1の動作概要)
解析システム1の動作概要を説明する。解析システム1の動作は、ログの収集と解析に大別される。ログの収集は電子制御装置100により実行され、ログの解析は解析装置200により実行される。
電子制御装置100の第1CPU160および第2CPU170は、不図示のプログラムを実行することによりそれぞれソフトウエアを動作させる。これらのソフトウエアは、共有資源110の使用を必要とする。第1CPU160および第2CPU170は、ソフトウエアのイベントのログをログ格納部150に格納する。格納されるログは、タスクの実行開始と終了、割り込み処理の開始と終了、そして共有資源110を使用するためのロックの取得処理などである。本実施の形態では、ロックの取得処理のログに注目しているので、それ以外のログの記録処理の説明は省略する。
(Overview of operation of analysis system 1)
An outline of the operation of the analysis system 1 will be described. The operation of the analysis system 1 is roughly divided into log collection and analysis. The collection of logs is executed by the electronic control unit 100, and the analysis of logs is executed by the analysis unit 200.
The first CPU 160 and the second CPU 170 of the electronic control unit 100 operate software by executing programs (not shown). These software require the use of shared resources 110. The first CPU 160 and the second CPU 170 store a log of a software event in the log storage unit 150. The stored logs include the start and end of task execution, the start and end of interrupt processing, and the lock acquisition processing for using the shared resource 110. In the present embodiment, since the log of the lock acquisition processing is focused on, the description of the other log recording processing is omitted.

第1CPU160は、第1ロック取得部161を用いてロックを取得し、取得したロックに関するログを第1カウンタ記録部162を用いて第1バッファ151に記録する。第2CPU170は、第2ロック取得部171を用いてロックを取得し、取得したロックに関するログを第2カウンタ記録部172を用いて第2バッファ152に記録する。ログ出力部180は、ログ格納部150に格納されたログを解析装置200に出力する。   The first CPU 160 acquires a lock using the first lock acquisition unit 161 and records a log related to the acquired lock in the first buffer 151 using the first counter recording unit 162. The second CPU 170 acquires a lock using the second lock acquisition unit 171 and records a log related to the acquired lock in the second buffer 152 using the second counter recording unit 172. The log output unit 180 outputs the log stored in the log storage unit 150 to the analysis device 200.

解析装置200のCPU260は、電子制御装置100から出力されたログをログ解析部220に解析させる。ログ解析部220が解析した結果は、解析結果213としてメモリ210に格納されるとともに表示部230に表示される。
以下では、図7を用いて第1CPU160におけるロック取得の動作、およびロックに関するログの格納の動作を説明し、図8を用いてログ解析部220の動作を説明する。なお、第2CPU170におけるロック取得の動作、およびロックに関するログの格納の動作は、第1CPU160の動作と同様なので説明を省略する。
The CPU 260 of the analysis device 200 causes the log analysis unit 220 to analyze the log output from the electronic control device 100. The result analyzed by the log analysis unit 220 is stored in the memory 210 as the analysis result 213 and displayed on the display unit 230.
Hereinafter, an operation of acquiring a lock and an operation of storing a log related to the lock in the first CPU 160 will be described with reference to FIG. 7, and an operation of the log analysis unit 220 will be described with reference to FIG. The operation of the second CPU 170 for acquiring the lock and the operation of storing the log related to the lock are the same as the operations of the first CPU 160, and thus description thereof will be omitted.

(ロック取得と記録のフローチャート)
図7を用いて、第1CPU160による、ロック取得動作およびロック取得に関するログ記録動作を説明する。以下に説明する各ステップの実行主体は、第1CPU160である。
ステップS400では、第1カウンタ141のカウンタ値をゼロにリセットする。続くステップS401では共有資源110を使用するために、前述のTEST−and−SET命令を用いてロックの取得を試みる。続くステップS402ではステップS401におけるロック取得が成功したか否かを判断し、成功したと判断する場合はステップS406に進み、失敗したと判断する場合はステップS403に進む。
(Flowchart for lock acquisition and recording)
A lock acquisition operation and a log recording operation related to lock acquisition by the first CPU 160 will be described with reference to FIG. The subject of execution of each step described below is the first CPU 160.
In step S400, the counter value of the first counter 141 is reset to zero. In the following step S401, in order to use the shared resource 110, an attempt is made to acquire a lock using the TEST-and-SET instruction described above. In subsequent step S402, it is determined whether or not the lock acquisition in step S401 is successful. If it is determined that the lock acquisition is successful, the process proceeds to step S406, and if it is determined that the lock acquisition is failed, the process proceeds to step S403.

ステップS403では第1カウンタ141のカウンタ値をインクリメント、すなわち1増加させる。続くステップS404では、第1カウンタ141のカウンタ値が「1」であるか否かを判断する。カウンタ値が「1」であると判断する場合、すなわちステップS400が実行された後にステップS402で初めて否定判断された場合はステップS405に進む。カウンタ値が「1」以外であると判断する場合、すなわちステップS400が実行された後にステップS402で否定判断されたのが2回目以降である場合はステップS401に戻る。ステップS405では、時刻レジスタ121からタイムスタンプを取得し、ステップS401に戻る。
ロックの取得に成功すると実行されるステップS406では、第1カウンタ141のカウンタ値がゼロであるか否かを判断する。ゼロであると判断する場合はステップS407に進み、ゼロ以外であると判断する場合はステップS408に進む。
In step S403, the counter value of the first counter 141 is incremented, that is, increased by one. In a succeeding step S404, it is determined whether or not the counter value of the first counter 141 is "1". If it is determined that the counter value is “1”, that is, if a negative determination is made for the first time in step S402 after execution of step S400, the process proceeds to step S405. When it is determined that the counter value is other than “1”, that is, when the negative determination is made in step S402 after the execution of step S400 for the second time or later, the process returns to step S401. In step S405, a time stamp is obtained from the time register 121, and the process returns to step S401.
In step S406 executed when the lock is successfully acquired, it is determined whether or not the counter value of the first counter 141 is zero. If it is determined to be zero, the process proceeds to step S407, and if it is determined to be other than zero, the process proceeds to step S408.

ステップS407では、第1バッファ151を記録対象として、以下の情報を第1カウンタ記録部162に記録させる。すなわち、第1CPU160において現在実行されているイベントの種類、すなわち「ロック取得」、イベントの内容、および第1カウンタ141のカウンタ値を記録させる。ステップS408では、第1バッファ151を記録対象として、以下の情報を第1カウンタ記録部162に記録させる。すなわち、第1CPU160において現在実行されているイベントの種類、イベントの内容、第1カウンタ141のカウンタ値、ステップS405において取得したタイムスタンプ、およびタスク情報112を記録させる。
ステップS407またはステップS408の実行が終了すると実行されるステップS409では、タスク情報112に第1CPU160において現在実行されているタスクの情報を格納し、図7に示すフローチャートを終了する。
In step S407, the following information is recorded in the first counter recording unit 162 with the first buffer 151 as a recording target. That is, the type of the event currently being executed in the first CPU 160, that is, “lock acquisition”, the content of the event, and the counter value of the first counter 141 are recorded. In step S408, the following information is recorded in the first counter recording unit 162 with the first buffer 151 as a recording target. That is, the type of the event currently being executed in the first CPU 160, the content of the event, the counter value of the first counter 141, the time stamp acquired in step S405, and the task information 112 are recorded.
In step S409, which is executed when the execution of step S407 or step S408 is completed, information of the task currently being executed in the first CPU 160 is stored in the task information 112, and the flowchart shown in FIG. 7 ends.

(ログ解析のフローチャート)
図8は、収集バッファ211に収集されたログを解析し、解析結果213を出力するログ解析部220の動作を表すフローチャートである。以下に説明する各ステップの実行主体は解析装置200のCPU260である。
ステップS501では、収集バッファ211にログが収納されているいずれかのCPUを処理対象として選択してステップS502に進む。後述するように、ステップS501とステップS509の間、すなわちステップS502〜ステップS508の処理を、収集バッファ211にログが収納されている全てのCPUについて実行する。
(Flowchart of log analysis)
FIG. 8 is a flowchart illustrating the operation of the log analysis unit 220 that analyzes the log collected in the collection buffer 211 and outputs the analysis result 213. The execution subject of each step described below is the CPU 260 of the analyzer 200.
In step S501, one of the CPUs whose logs are stored in the collection buffer 211 is selected as a processing target, and the process proceeds to step S502. As described later, the processing between step S501 and step S509, that is, the processing from step S502 to step S508 is executed for all CPUs whose logs are stored in the collection buffer 211.

ステップS502では、処理対象に選択されたCPUのいずれかのログを処理対象として選択してステップS503に進む。後述するように、ステップS502とステップS508の間、すなわちステップS503〜ステップS507の処理を、処理対象のCPUの全てのログについて実行する。
ステップS503では、処理対象のログのイベント種類311が「ロック取得」であるか否かを判断し、「ロック取得」であると判断する場合はステップS504に進み、それ以外であると判断する場合はステップS508に進む。
In step S502, one of the logs of the CPU selected as the processing target is selected as the processing target, and the process proceeds to step S503. As described later, the processing between step S502 and step S508, that is, the processing from step S503 to step S507 is executed for all logs of the CPU to be processed.
In step S503, it is determined whether or not the event type 311 of the log to be processed is “lock acquisition”. If it is determined that the event type 311 is “lock acquisition”, the process proceeds to step S504. Goes to step S508.

ステップS504では、処理対象のログの待ち時間が「1」以上であるか否かを判断し、「1」以上であると判断する場合はステップS505に進み、それ以外、すなわちゼロであると判断する場合はステップS508に進む。
ステップS505では、処理対象のログのタスク情報315のフィールドの値に基づきそのタスクを実行していたCPUを特定する。続くステップS506では、処理対象のログの待ち時間314のフィールドの値を、時間変換テーブル212を用いて実時間に変換してステップS507に進む。
In step S504, it is determined whether or not the waiting time of the log to be processed is “1” or more. If it is determined that it is “1” or more, the process proceeds to step S505. If so, the process proceeds to step S508.
In step S505, the CPU executing the task is specified based on the value of the field of the task information 315 of the log to be processed. In the following step S506, the value of the field of the waiting time 314 of the log to be processed is converted into real time using the time conversion table 212, and the process proceeds to step S507.

ステップS507では、処理対象のログの情報を解析結果213に記録する。このとき解析結果213の各フィールドに記録する値は、以下のとおりである。処理CPU331は、ステップS502〜S508のループにおいて現在処理対象のCPUの名称である。発生処理332の値は、処理対象のログの直前のログにおけるイベント内容312の値である。ロック333の値は、処理対象のログにおけるイベント内容312の値である。タイムスタンプ334の値は、処理対象のログにおけるタイムスタンプ331の値である。実待ち時間335の値は、ステップS506において算出された実時間である。原因CPU336の値は、ステップS505において特定されたCPUの名称である。原因処理337の値は、処理対象のログにおけるタスク情報315の値である。   In step S507, the information of the log to be processed is recorded in the analysis result 213. At this time, the values recorded in each field of the analysis result 213 are as follows. The processing CPU 331 is the name of the CPU currently being processed in the loop of steps S502 to S508. The value of the occurrence process 332 is the value of the event content 312 in the log immediately before the log to be processed. The value of the lock 333 is the value of the event content 312 in the log to be processed. The value of the time stamp 334 is the value of the time stamp 331 in the log to be processed. The value of the actual waiting time 335 is the actual time calculated in step S506. The value of the cause CPU 336 is the name of the CPU identified in step S505. The value of the cause process 337 is the value of the task information 315 in the log to be processed.

続くステップS508では、処理対象のCPUの全てのログを処理対象としたか否かを判断する。未処理のログがあると判断する場合は未処理のログのいずれかを処理対象としてステップS503に戻り、全てのログを処理したと判断する場合はステップS509に進む。
ステップS509では、収集バッファ211にログが格納されている全てのCPUを処理対象としたか否かを判断する。未処理のCPUがあると判断する場合は未処理のCPUのいずれかを処理対象としてステップS502に戻り、全てのCPUを処理したと判断する場合は図8のフローチャートを終了する。
In a succeeding step S508, it is determined whether or not all logs of the CPU to be processed have been processed. If it is determined that there is an unprocessed log, the process returns to step S503 with one of the unprocessed logs as a processing target. If it is determined that all logs have been processed, the process proceeds to step S509.
In step S509, it is determined whether all CPUs whose logs are stored in the collection buffer 211 have been processed. If it is determined that there is an unprocessed CPU, the process returns to step S502 with one of the unprocessed CPUs as a processing target. If it is determined that all the CPUs have been processed, the flowchart of FIG. 8 ends.

上述した第1の実施の形態によれば、次の作用効果が得られる。
(1)電子制御装置100は、複数のCPU、すなわち第1CPU160および第2CPU170と、共有資源110とを備える。CPUのそれぞれは、排他制御により共有資源110を独占して使用可能である。CPUのそれぞれは、カウンタ値が格納される更新カウンタ格納部140と、カウントが完了したカウント値を含む、第1CPU160および第2CPU170が実行したプログラムのログが格納されるログ格納部150とを備える。CPUは、CPUが共有資源110にアクセスしたときに、更新カウンタ格納部140に格納されたカウンタ値を更新させるカウンタ更新部、すなわち第1ロック取得部161および第2ロック取得部171と、CPUが共有資源110にアクセスしたときに、共有資源110が他のCPUにより排他制御されていない場合には、更新カウンタ格納部140に格納されたカウンタ値を含むログをログ格納部150に記録するカウンタ記録部、すなわち第1カウンタ記録部162および第2カウンタ記録部172とを備える。
According to the first embodiment, the following operation and effect can be obtained.
(1) The electronic control unit 100 includes a plurality of CPUs, that is, a first CPU 160 and a second CPU 170, and a shared resource 110. Each of the CPUs can exclusively use the shared resource 110 by exclusive control. Each of the CPUs includes an update counter storage unit 140 for storing a counter value, and a log storage unit 150 for storing a log of a program executed by the first CPU 160 and the second CPU 170, including a count value for which counting has been completed. When the CPU accesses the shared resource 110, the CPU updates the counter value stored in the update counter storage unit 140, that is, the first lock acquisition unit 161 and the second lock acquisition unit 171; When the shared resource 110 is not exclusively controlled by another CPU when the shared resource 110 is accessed, a counter record for recording a log including the counter value stored in the update counter storage unit 140 in the log storage unit 150 , Ie, a first counter recording unit 162 and a second counter recording unit 172.

電子制御装置100は、CPUが共有資源110にアクセスしたときに、共有資源110が他のCPUにより排他制御されている場合、すなわちロック変数111が「1」の場合にはカウンタの値を更新する。そのため、タイマ120へのアクセスによるオーバーヘッドを生じさせることなく、アクセスが生じたことをカウンタ値の更新として更新カウンタ格納部140に記録することができる。なお、更新カウンタ格納部140に格納されるカウンタ値は、ロック取得を試みた2回目以降の回数、すなわちスピン回数を表す。   When the CPU accesses the shared resource 110 and the shared resource 110 is exclusively controlled by another CPU, that is, when the lock variable 111 is “1”, the electronic control device 100 updates the counter value. . Therefore, the occurrence of the access can be recorded as an update of the counter value in the update counter storage unit 140 without causing overhead due to the access to the timer 120. Note that the counter value stored in the update counter storage unit 140 represents the number of times the lock acquisition has been attempted after the second time, that is, the number of spins.

また電子制御装置100は、共有資源110が他のCPUにより排他制御されていない場合、すなわちロック変数111がゼロの場合には、オーバーヘッドの大きいタイマ120へのアクセスを行うことなく、更新カウンタ格納部140に格納されたカウント値をログ格納部150に格納する。そのため、ログを記録するためのオーバーヘッドが小さい。この利点は特に、待ち時間がゼロであった場合に顕著である。たとえば待ち時間の算出は、待ち時間の開始時と終了時にそれぞれタイマから時刻を取得し、2つの時刻の差を待ち時間として算出する手法が広く行われているが、この手法ではタイマ120へのアクセスが2回行われる。時刻の取得に要する時間はロックの取得に要する時間よりも長く、さらに時刻の取得が2回も行われるため、待ち時間の算出のオーバーヘッドが大きくなってしまう問題がある。しかし本発明によればこのような問題を生じさせることなく、待ち時間を記録することができる。   When the shared resource 110 is not exclusively controlled by another CPU, that is, when the lock variable 111 is zero, the electronic control unit 100 does not access the timer 120 having a large overhead and updates the update counter storage unit. The count value stored in 140 is stored in log storage unit 150. Therefore, the overhead for recording the log is small. This advantage is particularly noticeable when the waiting time is zero. For example, in the calculation of the waiting time, a method of obtaining the time from the timer at the start and end of the waiting time and calculating the difference between the two times as the waiting time is widely performed. Access is performed twice. The time required to acquire the time is longer than the time required to acquire the lock, and the acquisition of the time is performed twice, which causes a problem that the overhead of calculating the waiting time increases. However, according to the present invention, the waiting time can be recorded without causing such a problem.

(2)電子制御装置100のCPUは、CPUが共有資源110にアクセスして所定の処理単位を実行する毎に、すなわちスピンロックが実行されるごとに更新カウンタ格納部140に格納されたカウンタの値を変化させる。
そのため、実行間隔および実行時間が既知であるスピンロックの実行回数を記録することで、オーバーヘッドの大きいタイマへのアクセスを行うことなく、待ち時間を記録することができる。
(2) Each time the CPU accesses the shared resource 110 and executes a predetermined processing unit, that is, every time the spin lock is executed, the CPU of the electronic control unit 100 checks the counter stored in the update counter storage unit 140. Change the value.
Therefore, by recording the number of times of execution of the spin lock whose execution interval and execution time are known, it is possible to record the waiting time without accessing a timer having a large overhead.

(3)電子制御装置100は、時刻情報を保持するタイマ120を備える。CPUが共有資源110に一回目にアクセスしたときに、共有資源110が他のCPUにより排他制御されている場合は、時刻情報をタイマ120から取得し、時刻情報をさらに含むログをログ格納部150に格納する。
そのため、タイマ120へのアクセスのオーバーヘッドを隠蔽しつつ、待ち時間が生じた時刻を記録することができる。カウンタが更新されたことは、共有資源110が他のCPUにより使用されており、ロック取得を試みたCPUは所定時間の経過後に再度ロック取得を試みることを意味する。そのため、ロック取得を試みたCPUがタイマ120へアクセスしても、そのオーバーヘッドは少なくとも一部が隠蔽されることになる。この効果は、第1CPU160および第2CPU170の少なくとも一方が、以下の特徴を有する場合に顕著である。すなわち、CPUが、スピン時にバス占有を防ぐためにCPUを一定時間停止する命令を発行する特徴を有する場合に効果が顕著である。
(3) The electronic control unit 100 includes a timer 120 that holds time information. When the CPU accesses the shared resource 110 for the first time, if the shared resource 110 is exclusively controlled by another CPU, time information is acquired from the timer 120 and a log further including the time information is stored in the log storage unit 150. To be stored.
Therefore, the time at which the waiting time occurs can be recorded while concealing the overhead of accessing the timer 120. Updating the counter means that the shared resource 110 is being used by another CPU, and the CPU that has attempted to acquire the lock attempts to acquire the lock again after a predetermined time has elapsed. Therefore, even if the CPU that has tried to acquire the lock accesses the timer 120, at least a part of the overhead is hidden. This effect is remarkable when at least one of the first CPU 160 and the second CPU 170 has the following features. That is, the effect is remarkable when the CPU has a feature of issuing an instruction to stop the CPU for a certain period of time in order to prevent bus occupation during spinning.

(4)共有資源110は、CPUが実行している処理を識別する識別情報を格納する識別情報格納部、すなわちタスク情報112を記憶する領域を備える。カウンタ記録部、すなわち第1カウンタ記録部162および第2カウンタ記録部172は、CPUが2回目以降のアクセスで共有資源110を排他制御した場合に、識別情報格納部から識別情報、すなわちタスク情報112を取得し、タスク情報112をさらに含むログをログ格納部150に格納する。
そのため、待ち時間を発生させた処理、すなわち従前に共有資源110を使用していた処理の識別情報をログ格納部150に記録することができる。
(4) The shared resource 110 includes an identification information storage unit for storing identification information for identifying a process executed by the CPU, that is, an area for storing task information 112. The counter recording unit, that is, the first counter recording unit 162 and the second counter recording unit 172 store the identification information, that is, the task information 112 from the identification information storage unit when the CPU exclusively controls the shared resource 110 in the second and subsequent accesses. And stores a log further including the task information 112 in the log storage unit 150.
Therefore, the identification information of the process that caused the waiting time, that is, the process that previously used the shared resource 110 can be recorded in the log storage unit 150.

(5)カウンタ更新部、すなわち第1ロック取得部161および第2ロック取得部171は、共有資源110を排他制御した場合に、CPUが実行している処理に基づき識別情報格納部の識別情報を更新する。
タスク情報112に共有資源110を使用しているタスクの情報を格納するので、あるCPUが共有資源110を使用できなかった場合に、その原因となっていた処理、すなわち従前に共有資源110を使用していた処理を特定させることが可能となる。
(5) When the exclusive update control of the shared resource 110 is performed, the counter update unit, that is, the first lock acquisition unit 161 and the second lock acquisition unit 171 update the identification information of the identification information storage unit based on the processing executed by the CPU. Update.
Since information on tasks using the shared resource 110 is stored in the task information 112, when a certain CPU cannot use the shared resource 110, the processing that caused the problem, that is, using the shared resource 110 before It is possible to specify the processing that was being performed.

(6)解析システム1は、電子制御装置100と、解析装置200とを備える。解析装置200は、電子制御装置100のログ格納部150に格納された情報が入力されるログ収集部270と、カウンタ値を実時間に換算するための換算情報、たとえば時間変換テーブル212を格納する記憶部、すなわちメモリ210と、換算情報を用いて、ログ収集部270に入力されたカウンタ値を実時間に換算するログ解析部220と、を備える。
そのため解析装置200は、電子制御装置100が記録したカウンタ値を実時間に変換できる。すなわち解析システム1は、共有資源110の排他制御による待ち時間をスピン回数として記録することで記録時のオーバーヘッドを低減しつつ、その記録したスピン回数を解析装置200を用いて実時間に変換することができる。
(6) The analysis system 1 includes an electronic control device 100 and an analysis device 200. The analysis device 200 stores a log collection unit 270 to which information stored in the log storage unit 150 of the electronic control device 100 is input, and conversion information for converting a counter value into real time, for example, a time conversion table 212. It includes a storage unit, that is, a memory 210, and a log analysis unit 220 that converts the counter value input to the log collection unit 270 into real time using the conversion information.
Therefore, the analysis device 200 can convert the counter value recorded by the electronic control device 100 into real time. That is, the analysis system 1 converts the recorded spin count into real time using the analysis device 200 while recording the waiting time due to the exclusive control of the shared resource 110 as the spin count to reduce the recording overhead. Can be.

(変形例1)
第1バッファ151および第2バッファ152の待ち時間314には、タイマ120から取得した時刻を格納してもよい。すなわち図7のステップS408において、時刻レジスタ121からタイムスタンプを取得して格納してもよい。この場合は、解析装置200は、タイムスタンプ313に格納された時刻と待ち時間314に格納された時刻との差を演算することによりロック取得のために待機した実時間を算出する。
この変形例1によれば、解析装置200は時間変換テーブル212を備える必要がないという第1の利点、およびより正確な待ち時間算出を行うことができるという第2の利点を有する。なお、待ち時間がゼロとなる場合以外は、時刻レジスタ121にアクセスして時刻を取得してもそのオーバーヘッドの影響は相対的に小さく、デメリットは小さい。
(Modification 1)
The time acquired from the timer 120 may be stored in the waiting time 314 of the first buffer 151 and the second buffer 152. That is, in step S408 of FIG. 7, a time stamp may be obtained from the time register 121 and stored. In this case, the analysis device 200 calculates the actual time spent waiting for lock acquisition by calculating the difference between the time stored in the time stamp 313 and the time stored in the waiting time 314.
According to the first modification, the analysis device 200 has a first advantage that there is no need to include the time conversion table 212 and a second advantage that it is possible to perform more accurate waiting time calculation. Except when the waiting time becomes zero, even if the time is acquired by accessing the time register 121, the influence of the overhead is relatively small and the disadvantage is small.

(変形例2)
第1カウンタ141は、第1CPU160のレジスタや第1CPU160が備える不図示のメモリに格納されてもよい。同様に第2カウンタ142は、第2CPU170のレジスタや第2CPU170が備える不図示のメモリに格納されてもよい。
この変形例2によれば、高速なアクセスが可能な同一CPU内で書き換えが行われるので、カウンタ値の初期化および更新のオーバーヘッドを低減することができる。
(Modification 2)
The first counter 141 may be stored in a register of the first CPU 160 or a memory (not shown) included in the first CPU 160. Similarly, the second counter 142 may be stored in a register of the second CPU 170 or a memory (not shown) included in the second CPU 170.
According to the second modification, rewriting is performed in the same CPU that can be accessed at high speed, so that overhead for initializing and updating the counter value can be reduced.

(変形例3)
第1カウンタ141が独立して設けられず、第1バッファ151が第1カウンタ141の役割も兼ねてよい。この場合は第1ロック取得部161は、第1カウンタ141に格納されるカウンタ値を初期化および更新する代わりに、第1バッファ151の待ち時間314のフィールドにカウンタの初期値であるゼロを書き込み、更新する。同様に第2カウンタ142が独立して設けられず、第2バッファ152が第2カウンタ142の役割も兼ねてよい。
(Modification 3)
The first counter 141 may not be provided independently, and the first buffer 151 may also serve as the first counter 141. In this case, instead of initializing and updating the counter value stored in the first counter 141, the first lock acquiring unit 161 writes zero, which is the initial value of the counter, in the field of the waiting time 314 of the first buffer 151. ,Update. Similarly, the second counter 142 is not provided independently, and the second buffer 152 may also serve as the second counter 142.

(変形例4)
電子制御装置100は、3つ以上のCPUを備えてもよい。また電子制御装置100は、単一のパッケージに収められ複数のコアを有するCPUを1つ備えてもよい。単一のパッケージに収められ複数のコアは、同一であってもよいし異なっていてもよい。さらに、各CPUコアのアーキテクチャ及び動作速度は同一であってもよいし、異なっていてもよい。
(Modification 4)
The electronic control unit 100 may include three or more CPUs. Further, the electronic control unit 100 may include one CPU that is housed in a single package and has a plurality of cores. The multiple cores contained in a single package may be the same or different. Further, the architecture and operation speed of each CPU core may be the same or different.

(変形例5)
メモリ130は、CPUごとに独立していてもよい。この場合には、ログ格納部150および更新カウンタ格納部140には、それぞれのCPUごとのメモリ130に存在する。さらに、プログラムを保持する不揮発性メモリとデータを保持する揮発性メモリに分かれている構成であってもよい。
(Modification 5)
The memory 130 may be independent for each CPU. In this case, the log storage unit 150 and the update counter storage unit 140 exist in the memory 130 for each CPU. Further, the configuration may be divided into a nonvolatile memory for holding a program and a volatile memory for holding data.

(変形例6)
電子制御装置100が第3のCPUを備え、その第3のCPUが第1ロック取得部161、第1カウンタ記録部162、第2ロック取得部171、および第2カウンタ記録部172の少なくとも1つを実行してもよい。また、第1ロック取得部161、第1カウンタ記録部162、第2ロック取得部171、および第2カウンタ記録部172の少なくとも1つが、ハードウエア回路により実行されてもよい。
(Modification 6)
The electronic control unit 100 includes a third CPU, and the third CPU includes at least one of a first lock acquisition unit 161, a first counter recording unit 162, a second lock acquisition unit 171, and a second counter recording unit 172. May be executed. Further, at least one of the first lock acquisition unit 161, the first counter recording unit 162, the second lock acquisition unit 171, and the second counter recording unit 172 may be executed by a hardware circuit.

(その他の変形例)
上述した第1の実施の形態をさらに以下のように変形してもよい。
(1)電子制御装置100がタイマを複数備え、CPUごとに異なるタイマを参照してもよい。この場合は、各CPUの用いている時刻レジスタ121の値の差を記録するなど、補正処理を行う。
(2)第1カウンタ記録部162および第2カウンタ記録部172は、図7のステップS408においてタスク情報112を記録しなくてもよい。この場合は、第1ロック取得部161および第2ロック取得部171は、図7のステップS409におけるタスク情報112の更新を実行しなくてよく、第1バッファ151および第2バッファ152がタスク情報315のフィールドを備えなくてもよい。
(Other modifications)
The above-described first embodiment may be further modified as follows.
(1) The electronic control unit 100 may include a plurality of timers, and refer to a different timer for each CPU. In this case, a correction process is performed, such as recording the difference between the values of the time registers 121 used by the respective CPUs.
(2) The first counter recording unit 162 and the second counter recording unit 172 need not record the task information 112 in step S408 of FIG. In this case, the first lock acquisition unit 161 and the second lock acquisition unit 171 do not need to update the task information 112 in step S409 of FIG. 7, and the first buffer 151 and the second buffer 152 store the task information 315 Field need not be provided.

(3)第1ロック取得部161および第2ロック取得部171は、カウンタ値にかかわらずタイムスタンプを取得しなくてもよい。すなわち、図7のステップS403を実行したらカウンタ値を評価することなくステップS401に戻ってもよい。
(4)電子制御装置100は、共有資源110を複数備えてもよい。この場合、それぞれの共有資源110はロック変数111およびタスク情報112を独立して備える。
(3) The first lock acquisition unit 161 and the second lock acquisition unit 171 need not acquire the time stamp regardless of the counter value. That is, after executing step S403 in FIG. 7, the process may return to step S401 without evaluating the counter value.
(4) The electronic control unit 100 may include a plurality of shared resources 110. In this case, each shared resource 110 independently includes a lock variable 111 and task information 112.

(第2の実施の形態)
図9〜図10を参照して、電子制御装置の第2の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、電子制御装置がカウント値から実時間への換算を行う診断部を備える点で、第1の実施の形態と異なる。
(Second embodiment)
A second embodiment of the electronic control unit will be described with reference to FIGS. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and the differences will be mainly described. The points that are not particularly described are the same as in the first embodiment. The present embodiment differs from the first embodiment mainly in that the electronic control device includes a diagnostic unit that converts the count value into real time.

図9は、第2の実施の形態における電子制御装置100Aの構成を示す図である。電子制御装置100Aは、第1の実施の形態における電子制御装置100の構成からログ出力部180が削除され、診断部900が追加される。また、メモリ130には時間変換テーブル212および解析結果213がさらに格納される。特に説明しない構成、および動作は第1の実施の形態と同様である。   FIG. 9 is a diagram illustrating a configuration of an electronic control device 100A according to the second embodiment. In the electronic control unit 100A, the log output unit 180 is deleted from the configuration of the electronic control unit 100 in the first embodiment, and a diagnostic unit 900 is added. Further, the memory 130 further stores a time conversion table 212 and an analysis result 213. The configuration and operation that are not particularly described are the same as those of the first embodiment.

診断部900は、第1CPU160および第2CPU170のいずれかが不図示のROMに格納されたプログラムを実行することにより実現される機能を機能ブロックとして表したものである。診断部900は、ログ格納部150に格納されたログを解析する。診断部900は、解析により異常を検出すると、たとえば待ち時間が所定の時間よりも長い場合は、所定の異常時処理を実行する。診断部900は、一定の時間が経過すると、または診断を要するような所定の事象が発生すると動作する。   The diagnosis unit 900 represents, as a functional block, a function realized by one of the first CPU 160 and the second CPU 170 executing a program stored in a ROM (not shown). The diagnosis unit 900 analyzes the log stored in the log storage unit 150. When detecting an abnormality by the analysis, for example, when the waiting time is longer than a predetermined time, the diagnosis unit 900 executes a predetermined abnormality processing. The diagnosing unit 900 operates when a predetermined time has elapsed or when a predetermined event that requires diagnosis has occurred.

(診断部のフローチャート)
図10は第2の実施の形態における診断部900の動作を表すフローチャートである。以下では、図8に示したログ解析部220の動作を表したフローチャートとの差異を説明する。以下に説明する各ステップの実行主体は、第1CPU160および第2CPU170のいずれかである。以下ではこの実行主体を「CPU」とする。
ステップS507までの処理はログ解析部220と同様なので説明を省略する。ステップS507の実行が完了すると、ステップS521を実行する。
(Flowchart of diagnosis unit)
FIG. 10 is a flowchart illustrating the operation of the diagnosis unit 900 according to the second embodiment. Hereinafter, differences from the flowchart illustrating the operation of the log analysis unit 220 illustrated in FIG. 8 will be described. The execution subject of each step described below is one of the first CPU 160 and the second CPU 170. Hereinafter, this execution subject is referred to as “CPU”.
Since the processing up to step S507 is the same as that of the log analysis unit 220, the description is omitted. When the execution of step S507 is completed, step S521 is executed.

ステップS521では、ステップS506において変換した実時間が所定値以上であるか否かを判断する。所定値以上であると判断する場合はステップS522に進み、所定値未満であると判断する場合はステップS508に進む。
ステップS522では所定の異常時処理を実行してステップS508に進む。異常時処理とはたとえば、最小構成の実行状態への移行、または異常検出した回数をカウントし所定の閾値に達した場合の電子制御装置100の再起動などである。
In step S521, it is determined whether the actual time converted in step S506 is equal to or greater than a predetermined value. When it is determined that the value is equal to or more than the predetermined value, the process proceeds to step S522, and when it is determined that the value is less than the predetermined value, the process proceeds to step S508.
In step S522, a predetermined abnormal time process is executed, and the process proceeds to step S508. The abnormal-time process is, for example, a transition to the execution state of the minimum configuration, or a restart of the electronic control device 100 when the number of times of detecting the abnormality reaches a predetermined threshold.

上述した第2の実施の形態によれば、次の作用効果が得られる。
(1)電子制御装置100Aは、カウント値を時間に換算するための換算情報、たとえば時間変換テーブル212を格納する記憶部、すなわちメモリ130と、時間変換テーブル212を用いてカウンタ値を実時間に換算する解析部、すなわち診断部900と、を備える。
そのため電子制御装置100Aは、解析装置200を用いることなくカウンタ値を実時間に換算することができる。これにより、図10のステップS521に示したように、換算した実時間を用いた診断を実行できる。
According to the above-described second embodiment, the following operation and effect can be obtained.
(1) The electronic control unit 100A converts the counter value into real time using the conversion information for converting the count value into time, for example, a storage unit storing the time conversion table 212, that is, the memory 130, and the time conversion table 212. An analysis unit for conversion, that is, a diagnosis unit 900 is provided.
Therefore, the electronic control device 100A can convert the counter value into real time without using the analysis device 200. Thus, the diagnosis using the converted real time can be executed as shown in step S521 in FIG.

(第2の実施の形態の変形例)
第2の実施の形態を以下のように変形してもよい。
(1)診断部900は、算出した待ち時間以外を診断に利用してもよい。たとえば、待ちの原因となったタスクが所定のものでなかった場合に、何らかの実行順序の異常が起きたと判定して、これを異常として診断してもよい。
(2)診断部900は、解析結果をメモリ130に記録しなくてもよい。
(3)電子制御装置100Aは、ログ出力部180をさらに備えてもよい。
(Modification of Second Embodiment)
The second embodiment may be modified as follows.
(1) The diagnosis unit 900 may use a time other than the calculated waiting time for diagnosis. For example, when the task that caused the waiting is not a predetermined task, it may be determined that some abnormality in the execution order has occurred, and this may be diagnosed as an abnormality.
(2) The diagnosis unit 900 need not record the analysis result in the memory 130.
(3) The electronic control unit 100A may further include a log output unit 180.

(第3の実施の形態)
図11〜図13を参照して、電子制御装置の第3の実施の形態を説明する。以下の説明では、第1の実施の形態と同じ構成要素には同じ符号を付して相違点を主に説明する。特に説明しない点については、第1の実施の形態と同じである。本実施の形態では、主に、スピン回数ではなくベーシックブロックの実行回数をカウントする点で、第1の実施の形態と異なる。
(Third embodiment)
A third embodiment of the electronic control unit will be described with reference to FIGS. In the following description, the same components as those in the first embodiment are denoted by the same reference numerals, and the differences will be mainly described. The points that are not particularly described are the same as in the first embodiment. This embodiment is different from the first embodiment mainly in that the number of executions of the basic block is counted instead of the number of spins.

(ベーシックブロック)
ベーシックブロックとは、プログラムの実行単位であって、その単位中に分岐もしくは合流を含まないものである。ベーシックブロックは分岐や合流を含まないので、実行する環境、すなわちCPUやメモリ等が同一であれば、ベーシックブロックの実行時間は一定である。本実施の形態では3つのベーシックブロック(A,B,C)を用いて説明する。それぞれのベーシックブロックの電子制御装置100における実行時間は既知である。
(Basic block)
A basic block is a unit of execution of a program and does not include a branch or a merge in the unit. Since the basic block does not include a branch or a merge, the execution time of the basic block is constant if the execution environment, that is, the CPU and the memory are the same. The present embodiment will be described using three basic blocks (A, B, C). The execution time of each basic block in the electronic control unit 100 is known.

(構成)
解析システム1のハードウエア構成は第1の実施の形態と同様である。ただし第1カウンタ141と第2カウンタ142のそれぞれは、ベーシックブロックA,B,Cにそれぞれ対応する3つのカウンタ(A,B,C)を備える。また時間変換テーブル212として格納される情報が第1の実施の形態と異なる。さらに電子制御装置100の不図示のROMに格納されるプログラムが第1の実施の形態と異なり、第1ロック取得部161および第2ロック取得部171の動作が第1の実施の形態と異なる。
(Constitution)
The hardware configuration of the analysis system 1 is the same as that of the first embodiment. However, each of the first counter 141 and the second counter 142 has three counters (A, B, C) corresponding to the basic blocks A, B, C, respectively. The information stored as the time conversion table 212 is different from that of the first embodiment. Further, a program stored in a ROM (not shown) of the electronic control device 100 is different from that of the first embodiment, and the operations of the first lock acquisition unit 161 and the second lock acquisition unit 171 are different from those of the first embodiment.

図11は、本実施の形態における第1バッファ151の構造の一例を示した図である。第1バッファ151を構成するフィールドの構成は第1の実施の形態と同様であり、待ち時間314のフィールドに格納される値が異なる。すなわち待ち時間314のフィールドには、第1カウンタ141に格納されるカウンタA,カウンタB,カウンタCの値が格納される。これ以外の点は第1の実施の形態と同様である。図11に示す例では、ロックMの取得時に、ベーシックブロックAが3回、ベーシックブロックBが1回、ベーシックブロックCが2回実行されたことを示している。第2バッファ152の構成、および第2バッファ152に格納される情報は第1バッファ151と同様である。   FIG. 11 is a diagram illustrating an example of the structure of the first buffer 151 according to the present embodiment. The configuration of the fields constituting the first buffer 151 is the same as that of the first embodiment, and the value stored in the field of the waiting time 314 is different. That is, in the field of the waiting time 314, the values of the counters A, B, and C stored in the first counter 141 are stored. Other points are the same as in the first embodiment. In the example shown in FIG. 11, the basic block A is executed three times, the basic block B is executed once, and the basic block C is executed twice when the lock M is acquired. The configuration of the second buffer 152 and the information stored in the second buffer 152 are the same as those of the first buffer 151.

図12は、時間変換テーブル212Aの一例を示す図である。時間変換テーブル212Aには、それぞれのベーシックブロックに対応する時間が記録される。具体的には時間変換テーブル212Aは、ベーシックブロック番号323のフィールドと、時間324のフィールドとを備える。ベーシックブロック番号323のフィールドには、ベーシックブロックの識別子またはベーシックブロックの名称が格納される。時間324のフィールドには、ベーシックブロックの1回の実行に要する時間が格納される。
なお、図11と図12に示す例によれば、各ベーシックブロックの実行時間から、ロックMの取得のための待ち時間は、3*20+1*38+2*19=136マイクロ秒と算出される。
FIG. 12 is a diagram illustrating an example of the time conversion table 212A. The time corresponding to each basic block is recorded in the time conversion table 212A. Specifically, the time conversion table 212A includes a field of a basic block number 323 and a field of a time 324. The field of the basic block number 323 stores the identifier of the basic block or the name of the basic block. The time 324 field stores the time required for one execution of the basic block.
According to the examples shown in FIGS. 11 and 12, the waiting time for acquiring the lock M is calculated as 3 * 20 + 1 * 38 + 2 * 19 = 136 microseconds from the execution time of each basic block.

(ロック取得部の動作)
ロック取得部、すなわち第1ロック取得部161および第2ロック取得部171は、第1の実施の形態では、TEST−and−SET命令を用いてロックを取得したが、第3の実施の形態では、LoadLinked命令(以下、「LL命令」と呼ぶ)、およびStore Conditional命令(以下、「SC命令」と呼ぶ)を用いてロックを取得する。
(Operation of lock acquisition unit)
The lock acquisition unit, that is, the first lock acquisition unit 161 and the second lock acquisition unit 171 acquire the lock using the TEST-and-SET instruction in the first embodiment, but in the third embodiment, , A LoadLinked instruction (hereinafter, referred to as “LL instruction”), and a Store Conditional instruction (hereinafter, referred to as “SC instruction”).

LL命令とは、指定されたメモリ領域をロードすると同時に、その領域に対して「リンク」を生成する命令である。この「リンク」は、他のCPUが同じ領域に書き込みを行うと消滅する。SC命令とは、指定されたメモリ領域に対して「リンク」が残存している場合に限り、値をストアする命令である。SC命令における「リンク」の残存の確認は、以下のことを意味する。すなわち、「リンク」が残存していることは、LL命令からSC命令までの間に、他のCPUが同じ領域に書き込みを行っていないことを示している。すなわちこれにより、読み込みと書き込みのアトミシティの保証、つまり読み込みと書き込みが不可分の一体として成功したことが保証される。   The LL instruction is an instruction that loads a specified memory area and, at the same time, generates a “link” for that area. This “link” disappears when another CPU writes in the same area. The SC instruction is an instruction that stores a value only when a “link” remains in a specified memory area. Confirmation of the remaining "link" in the SC instruction means the following. That is, the remaining “link” indicates that no other CPU has written in the same area between the LL instruction and the SC instruction. That is, this guarantees the atomicity of reading and writing, that is, guaranteeing that reading and writing have succeeded as an integral part.

(フローチャート)
図13は、第3の実施の形態における第1CPU160による、ロック取得動作およびロック取得に関するログ記録動作を示すフローチャートである。図13に示すように、ステップS451がベーシックブロックA、ステップS454がベーシックブロックB、ステップS455がベーシックブロックCである。それぞれのベーシックブロックを実行すると、各ベーシックブロックに対応するカウンタを更新する。図13に示すフローチャートは、第1の実施の形態における図7に相当する。以下では主に図7との相違点を説明する。
(flowchart)
FIG. 13 is a flowchart illustrating a lock acquisition operation and a log recording operation related to lock acquisition by the first CPU 160 according to the third embodiment. As shown in FIG. 13, step S451 is the basic block A, step S454 is the basic block B, and step S455 is the basic block C. When each basic block is executed, the counter corresponding to each basic block is updated. The flowchart shown in FIG. 13 corresponds to FIG. 7 in the first embodiment. Hereinafter, differences from FIG. 7 will be mainly described.

ステップS400Aでは、第1カウンタ141のカウンタA〜Cをゼロにリセットし、ステップS451に進む。ステップS451ではLL命令を用いてロック変数111を読出してステップS452に進む。ステップS452ではカウンタAをインクリメント、すなわちカウンタ値を1増加させてステップS453に進む。
ステップS453では、ステップS451において読みだしたロック変数111がゼロであったか否かを判断する。CPUは、ゼロであると判断する場合はステップS455に進み、ゼロでないと判断する場合はステップS454に進む。
In step S400A, the counters A to C of the first counter 141 are reset to zero, and the process proceeds to step S451. In step S451, the lock variable 111 is read using the LL instruction, and the flow advances to step S452. In step S452, the counter A is incremented, that is, the counter value is increased by 1, and the process proceeds to step S453.
In step S453, it is determined whether or not the lock variable 111 read in step S451 is zero. The CPU proceeds to step S455 when determining that it is zero, and proceeds to step S454 when determining that it is not zero.

ステップS454では、ステップS451において生成したリンクを破棄する。続くステップS403Aでは、カウンタBをインクリメントしてステップS404Aに進む。ステップS404AではカウンタBとカウンタCのカウンタ値の和が「1」であるか否かを判断する。カウンタ値が「1」であると判断する場合はステップS405に進み、カウンタ値が「1」以外であると判断する場合はステップS451に戻る。ステップS405では、時刻レジスタ121からタイムスタンプを取得し、ステップS451に戻る。   In step S454, the link generated in step S451 is discarded. In a succeeding step S403A, the counter B is incremented and the process proceeds to a step S404A. In step S404A, it is determined whether the sum of the counter values of the counters B and C is "1". When it is determined that the counter value is “1”, the process proceeds to step S405, and when it is determined that the counter value is other than “1”, the process returns to step S451. In step S405, a time stamp is obtained from the time register 121, and the process returns to step S451.

ステップS455では、SC命令を用いてロック変数111に「1」を書き込む。続くステップS456では、カウンタCをインクリメントする。続くステップS457ではステップS455における書き込みが成功したか否かを判断し、成功したと判断する場合はステップS406Aに進み、失敗したと判断する場合はステップS404Aに進む。ステップS406Aでは、カウンタBのカウンタ値がゼロであるか否かを判断する。ゼロであると判断する場合はステップS407に進み、ゼロ以外であると判断する場合はステップS408に進む。
ステップS407以降の処理は第1の実施の形態と同様なので説明を省略する。
In step S455, "1" is written to the lock variable 111 using the SC instruction. In a succeeding step S456, the counter C is incremented. In a succeeding step S457, it is determined whether or not the writing in the step S455 is successful. When it is determined that the writing is successful, the process proceeds to step S406A, and when it is determined that the writing is failed, the process proceeds to step S404A. In the step S406A, it is determined whether or not the counter value of the counter B is zero. If it is determined to be zero, the process proceeds to step S407, and if it is determined to be other than zero, the process proceeds to step S408.
The processing after step S407 is the same as in the first embodiment, and a description thereof will be omitted.

上述した第3の実施の形態によれば、次の作用効果が得られる。
(1)カウンタ更新部、すなわち第1ロック取得部161および第2ロック取得部171は、共有資源110にアクセスしたときに、所定の処理単位が実行される毎に、すなわち各ベーシックブロックが実行されるごとに更新カウンタ格納部140に格納された、それぞれのベーシックブロックに対応するカウンタの値を更新させる。
そのため、実行間隔および実行時間が既知であるベーシックブロックの実行回数を記録することで、オーバーヘッドの大きいタイマへのアクセスを行うことなく、待ち時間を記録することができる。
According to the above-described third embodiment, the following operation and effect can be obtained.
(1) When the counter update unit, that is, the first lock acquisition unit 161 and the second lock acquisition unit 171 access the shared resource 110, each time a predetermined processing unit is executed, that is, each basic block is executed. Each time the value of the counter stored in the update counter storage unit 140 and corresponding to each basic block is updated.
Therefore, by recording the number of executions of the basic block whose execution interval and execution time are known, it is possible to record the waiting time without accessing a timer having a large overhead.

(2)カウンタ更新部、すなわち第1ロック取得部161および第2ロック取得部171は、共有資源110が他のCPUにより排他制御されている場合に、カウンタBまたはカウンタCのカウンタ値を変化させる。そのため、共有資源110にアクセスしたが排他制御できなかった回数を記録することができる。
第1の実施の形態と異なり、第3の実施の形態では、共有資源110が他のCPUにより排他制御されている場合には、ステップS453でゼロであると判断する場合と、後述のステップS457で書き込みが失敗したと判断する場合の二通りがある。カウンタBとカウンタCのカウンタ値の和を用いることで、排他制御できなかった回数を記録することができる。
また、ステップS404Aにおいては、カウンタBとカウンタCのカウンタ値の和「1」であるかと判断することにより、いずれの場合によったとしても、排他制御できなかった1回目の場合に時刻を取得することができ、第1の実施形態と同様に、オーバーヘッドを隠蔽しつつ待ち時間が生じた時刻を記録する効果を得ることができる。
(2) The counter updating unit, that is, the first lock acquiring unit 161 and the second lock acquiring unit 171 change the counter value of the counter B or the counter C when the shared resource 110 is exclusively controlled by another CPU. . Therefore, it is possible to record the number of times that the shared resource 110 was accessed but the exclusive control could not be performed.
Unlike the first embodiment, in the third embodiment, when the shared resource 110 is exclusively controlled by another CPU, it is determined in step S453 that it is zero, and in step S457 described later. There are two cases in which it is determined that writing has failed. By using the sum of the counter values of the counter B and the counter C, it is possible to record the number of times the exclusive control could not be performed.
In addition, in step S404A, it is determined whether or not the sum of the counter values of the counters B and C is “1”, and in any case, the time is obtained in the first case where the exclusive control could not be performed. As in the first embodiment, it is possible to obtain the effect of recording the time when the waiting time occurs while hiding the overhead.

(変形例)
第3の実施の形態では、ベーシックブロックの実行回数をカウントしたが、これより細かい粒度での処理の回数をカウントしてもよいし、荒い粒度での処理の回数をカウントしてもよい。例えば、細かい粒度でのカウントとして、CPUの命令ごとにカウントする構成が考えられる。この場合は、ログ格納部150には、CPUの各命令ごとの実行時間が格納されることになる。また、命令ごとにカウントする場合は、ソフトウェアでこれを実現することは極めてオーバーヘッドが高いため、CPU等のハードウェア回路を用いてカウントすることが望ましい。ハードウェアによる命令ごとの計数を行う方法によれば、ベーシックブロックごとの実行回数を計数するようにソフトウェアを変更する必要がなく、相対的にオーバーヘッドを減らす効果が得られる。
(Modification)
In the third embodiment, the number of executions of the basic block is counted. However, the number of times of processing with a finer granularity may be counted, or the number of times of processing with a coarser granularity may be counted. For example, a configuration is conceivable in which counting is performed for each instruction of the CPU as counting at a fine granularity. In this case, the log storage unit 150 stores the execution time of each instruction of the CPU. In the case of counting for each instruction, it is desirable to count using a hardware circuit such as a CPU because realizing this by software has a very high overhead. According to the method of counting for each instruction by hardware, it is not necessary to change software so as to count the number of executions for each basic block, and an effect of relatively reducing overhead can be obtained.

なお、第1の実施形態においても、更新カウンタ格納部140に格納されたカウンタのインクリメント処理はソフトウェアで行う必要はない。たとえば、CPUの一つまたは複数のレジスタとしてカウンタが実装され、CPUが特定の命令を実行した場合に、対応するカウンタが加算される形であってもよい。この場合はたとえば、図7のステップS407およびステップS408においてログ格納部150に記録される待ち時間314は、ハードウェアから読みだしたカウンタの値となる。この場合も、第1の実施の形態の作用効果に加えて、オーバーヘッドをさらに減らす効果が得られる。   Also in the first embodiment, the increment processing of the counter stored in the update counter storage unit 140 does not need to be performed by software. For example, a counter may be implemented as one or a plurality of registers of the CPU, and when the CPU executes a specific instruction, the corresponding counter may be added. In this case, for example, the waiting time 314 recorded in the log storage unit 150 in steps S407 and S408 in FIG. 7 is the value of the counter read from the hardware. In this case, in addition to the operation and effect of the first embodiment, an effect of further reducing overhead can be obtained.

プログラムは不図示のROMに格納されるとしたが、プログラムはメモリ130に格納されていてもよい。また、電子制御装置100が不図示の入出力インタフェースを備え、必要なときに入出力インタフェースと電子制御装置100が利用可能な媒体を介して、他の装置からプログラムが読み込まれてもよい。ここで媒体とは、例えば入出力インタフェースに着脱可能な記憶媒体、または通信媒体、すなわち有線、無線、光などのネットワーク、または当該ネットワークを伝搬する搬送波やディジタル信号、を指す。また、プログラムにより実現される機能の一部または全部がハードウエア回路やFPGAにより実現されてもよい。
上述した各実施の形態および変形例は、それぞれ組み合わせてもよい。
上記では、種々の実施の形態および変形例を説明したが、本発明はこれらの内容に限定されるものではない。本発明の技術的思想の範囲内で考えられるその他の態様も本発明の範囲内に含まれる。
Although the program is stored in the ROM (not shown), the program may be stored in the memory 130. Further, the electronic control device 100 may include an input / output interface (not shown), and a program may be read from another device via a medium that can be used by the electronic control device 100 when necessary. Here, the medium refers to, for example, a storage medium detachable from an input / output interface, or a communication medium, that is, a network such as a wired, wireless, or optical network, or a carrier or a digital signal that propagates through the network. In addition, some or all of the functions realized by the program may be realized by a hardware circuit or an FPGA.
The above-described embodiments and modifications may be combined with each other.
Although various embodiments and modified examples have been described above, the present invention is not limited to these contents. Other embodiments that can be considered within the scope of the technical idea of the present invention are also included in the scope of the present invention.

1 … 解析システム
100、100A … 電子制御装置
110 … 共有資源
111 … ロック変数
112 … タスク情報
120 … タイマ
140 … 更新カウンタ格納部
150 … ログ格納部
160 … 第1CPU
161 … 第1ロック取得部
162 … 第1カウンタ記録部
170 … 第2CPU
171 … 第2ロック取得部
172 … 第2カウンタ記録部
200 … 解析装置
211 … 収集バッファ
212、212A … 時間変換テーブル
220 … ログ解析部
230 … 表示部
900 … 診断部
1 analysis system 100, 100A electronic control unit 110 shared resource 111 lock variable 112 task information 120 timer 140 update counter storage unit 150 log storage unit 160 first CPU
161, a first lock acquisition unit 162, a first counter recording unit 170, a second CPU
171, a second lock acquisition unit 172, a second counter recording unit 200, an analyzer 211, collection buffers 212, 212A, a time conversion table 220, a log analysis unit 230, a display unit 900, and a diagnosis unit.

Claims (8)

複数のCPUコアと、共有資源とを備える電子制御装置であって、
前記CPUコアのそれぞれは排他制御により前記共有資源を独占して使用可能であり、
カウンタ値が格納される更新カウンタ格納部と、
前記CPUコアが実行したプログラムのログが格納されるログ格納部と、
前記CPUコアが前記共有資源にアクセスしたときに、前記カウンタ値を変化させるカウンタ更新部と、
前記CPUコアが前記共有資源にアクセスしたときに、前記共有資源が他のCPUコアにより排他制御されていない場合には、前記カウンタ値を含む前記ログを前記ログ格納部に記録するカウンタ記録部とをさらに備える電子制御装置。
An electronic control device including a plurality of CPU cores and a shared resource,
Each of the CPU cores can exclusively use the shared resources by exclusive control and can be used,
An update counter storage unit in which a counter value is stored;
A log storage unit for storing a log of a program executed by the CPU core;
A counter updating unit that changes the counter value when the CPU core accesses the shared resource;
When the CPU core accesses the shared resource, if the shared resource is not exclusively controlled by another CPU core, a counter recording unit that records the log including the counter value in the log storage unit. An electronic control device further comprising:
請求項1に記載の電子制御装置であって、
前記カウンタ更新部は、前記CPUコアが前記共有資源にアクセスしたときに前記共有資源が他のCPUにより排他制御されている場合に、前記カウンタ値を変化させる電子制御装置。
The electronic control device according to claim 1,
The electronic control unit, wherein the counter update unit changes the counter value when the CPU core accesses the shared resource and the shared resource is exclusively controlled by another CPU.
請求項1に記載の電子制御装置であって、
前記カウンタ更新部は、前記CPUコアが前記共有資源にアクセスして所定の処理単位を実行する毎に、前記カウンタ値を変化させる電子制御装置。
The electronic control device according to claim 1,
The electronic control unit, wherein the counter updating unit changes the counter value each time the CPU core accesses the shared resource and executes a predetermined processing unit.
請求項1に記載の電子制御装置であって、
時刻情報を保持するタイマを更に備え、
前記カウンタ記録部は、前記CPUコアが前記共有資源に一回目にアクセスしたときに、前記共有資源が他のCPUコアにより排他制御されている場合は、時刻情報を前記タイマから取得し、前記時刻情報をさらに含む前記ログを前記ログ格納部に格納する電子制御装置。
The electronic control device according to claim 1,
A timer for holding time information;
The counter recording unit acquires time information from the timer when the CPU core accesses the shared resource for the first time, and when the shared resource is exclusively controlled by another CPU core, An electronic control unit that stores the log further including information in the log storage unit.
請求項1に記載の電子制御装置であって、
前記共有資源は、前記CPUコアが実行している処理を識別する識別情報を格納する識別情報格納部を備え、
前記カウンタ記録部は、前記CPUコアが二回目以降のアクセスで前記共有資源を排他制御した場合に、前記識別情報格納部から前記識別情報を取得し、前記識別情報をさらに含む前記ログを前記ログ格納部に格納する電子制御装置。
The electronic control device according to claim 1,
The shared resource includes an identification information storage unit that stores identification information for identifying a process executed by the CPU core,
The counter recording unit acquires the identification information from the identification information storage unit when the CPU core exclusively controls the shared resource in a second or subsequent access, and stores the log further including the identification information in the log. Electronic control device to be stored in the storage unit.
請求項5に記載の電子制御装置であって、
前記カウンタ更新部は、前記CPUコアが前記共有資源を排他制御した場合に、前記CPUコアが実行している処理に基づき前記識別情報格納部の前記識別情報を更新する電子制御装置。
The electronic control device according to claim 5, wherein
The electronic control unit, wherein the counter updating unit updates the identification information of the identification information storage unit based on a process executed by the CPU core when the CPU core controls the shared resource exclusively.
請求項1から請求項6までのいずれか一項に記載の電子制御装置であって、
前記カウンタ値を時間に換算するための換算情報を格納する記憶部と、
前記換算情報を用いて前記カウンタ値を実時間に換算する解析部と、を備える電子制御装置。
The electronic control device according to any one of claims 1 to 6, wherein
A storage unit that stores conversion information for converting the counter value into time,
An electronic control unit comprising: an analysis unit configured to convert the counter value into real time using the conversion information.
請求項1から請求項6までのいずれか一項に記載の電子制御装置と、解析装置と、を備える解析システムであって、
前記解析装置は、
前記電子制御装置の前記ログ格納部に格納された前記ログが入力されるログ収集部と、
前記カウンタ値を実時間に換算するための換算情報を格納する記憶部と、
前記換算情報を用いて、前記ログ収集部に入力された前記カウンタ値を実時間に換算する解析部と、を備える解析システム。


An analysis system comprising the electronic control device according to any one of claims 1 to 6, and an analysis device,
The analysis device,
A log collection unit to which the log stored in the log storage unit of the electronic control device is input;
A storage unit that stores conversion information for converting the counter value into real time,
An analysis unit configured to convert the counter value input to the log collection unit into real time using the conversion information.


JP2016169607A 2016-08-31 2016-08-31 Electronic control unit, analysis system Active JP6666216B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2016169607A JP6666216B2 (en) 2016-08-31 2016-08-31 Electronic control unit, analysis system
PCT/JP2017/026375 WO2018042935A1 (en) 2016-08-31 2017-07-20 Electronic control device and analysis system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016169607A JP6666216B2 (en) 2016-08-31 2016-08-31 Electronic control unit, analysis system

Publications (2)

Publication Number Publication Date
JP2018036864A JP2018036864A (en) 2018-03-08
JP6666216B2 true JP6666216B2 (en) 2020-03-13

Family

ID=61300769

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016169607A Active JP6666216B2 (en) 2016-08-31 2016-08-31 Electronic control unit, analysis system

Country Status (2)

Country Link
JP (1) JP6666216B2 (en)
WO (1) WO2018042935A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023019077A (en) * 2021-07-28 2023-02-09 日立Astemo株式会社 On-vehicle processing apparatus
JP7448585B2 (en) 2022-05-31 2024-03-12 トヨタ自動車株式会社 Information processing device, information processing method, and information processing program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2570018B2 (en) * 1991-09-06 1997-01-08 日本電信電話株式会社 Automatic analysis method of lock section and calculation method of lock time
JPH05257902A (en) * 1992-03-10 1993-10-08 Fujitsu Ltd Lock acquisition processing system in processing program mode
JP3152178B2 (en) * 1997-09-11 2001-04-03 日本電気株式会社 Lock operation measurement method
JP2001084235A (en) * 1999-09-10 2001-03-30 Nec Corp Exclusive control method using lock particle size satistical information and computer-readable recording medium with program recorded therein
US6687904B1 (en) * 1999-11-22 2004-02-03 Sun Microsystems, Inc. Method and apparatus for selecting a locking policy based on a per-object locking history
JP2009251871A (en) * 2008-04-04 2009-10-29 Nec Corp Contention analysis device, contention analysis method, and program

Also Published As

Publication number Publication date
JP2018036864A (en) 2018-03-08
WO2018042935A1 (en) 2018-03-08

Similar Documents

Publication Publication Date Title
US6539500B1 (en) System and method for tracing
US8978017B2 (en) Profiling operating context
US8392930B2 (en) Resource contention log navigation with thread view and resource view pivoting via user selections
US20150301871A1 (en) Busy lock and a passive lock for embedded load management
EP3564898A1 (en) Apparatus and methods for generating dynamic trace data on a gpu
JP6666216B2 (en) Electronic control unit, analysis system
US9009537B2 (en) Diagnostic data capture in a computing environment
US8966323B2 (en) Monitoring multiple data transfers
CN107451038B (en) Hardware event acquisition method, processor and computing system
US20130305012A1 (en) Implementation of counters using trace hardware
JP4151975B2 (en) Information processing apparatus, program, and management method
US10956303B2 (en) Trace data representation
US9619361B2 (en) Performance profiling apparatus and performance profiling method
US11734149B2 (en) Trace-data processing device
JP2004192052A (en) Software processing method and software processing system
US10489218B2 (en) Suppression of speculative accesses to shared memory locations at a processor
WO2012111167A1 (en) Trace information acquisition method, computer system, and program
US11347505B2 (en) Processor performance monitor that logs reasons for reservation loss
JP4755232B2 (en) compiler
JP4998303B2 (en) Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method
JP2005165825A (en) Trace information recorder
JP6201921B2 (en) Microcomputer
WO2002077810A1 (en) An integrated circuit
JP2775830B2 (en) Instruction frequency measurement method
JPH02128243A (en) Cpu history circuit for parallel computer

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20170126

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20170927

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181121

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200128

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200220

R150 Certificate of patent or registration of utility model

Ref document number: 6666216

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250