JP4066838B2 - Shared resource conflict detector and shared resource conflict detection method - Google Patents

Shared resource conflict detector and shared resource conflict detection method Download PDF

Info

Publication number
JP4066838B2
JP4066838B2 JP2003041575A JP2003041575A JP4066838B2 JP 4066838 B2 JP4066838 B2 JP 4066838B2 JP 2003041575 A JP2003041575 A JP 2003041575A JP 2003041575 A JP2003041575 A JP 2003041575A JP 4066838 B2 JP4066838 B2 JP 4066838B2
Authority
JP
Japan
Prior art keywords
event
logical
shared resource
counter
pattern
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.)
Expired - Fee Related
Application number
JP2003041575A
Other languages
Japanese (ja)
Other versions
JP2004252670A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2003041575A priority Critical patent/JP4066838B2/en
Publication of JP2004252670A publication Critical patent/JP2004252670A/en
Application granted granted Critical
Publication of JP4066838B2 publication Critical patent/JP4066838B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、複数の論理CPUから構成されるマルチスレッドプロセッサにおいて、論理CPU間で共有リソースの競合状態を発見するための検出器および検出方法に関する。
【0002】
【従来の技術】
一般に、マルチプロセッサシステムにおいてプロセッサ間で共有するリソースに対して排他的にアクセスするために、「クリティカルリージョン」と呼ぶプログラム領域を設けることが多い。クリティカルリージョンは、同時に1 つのプロセッサしか実行することができないプログラム領域である。この領域内でプロセッサ間の共有リソースにアクセスすることで、並列プログラムを実行中のデータの整合性を保つ。
【0003】
実際には、複数のプロセッサを搭載したシステムにおいて、プロセッサがクリティカルリージョンに入って良いかどうか、すなわち他のプロセッサがクリティカルリージョンを走行していないかどうかを判断するために、「スピンロック変数」と呼ぶ変数を設ける。
例えば、スピンロック変数には、
・あるプロセッサがクリティカルリージョンを走行中の場合は「1」
・いずれのプロセッサも走行していない場合は「0」
がセットされる。
【0004】
この実装では、あるプロセッサがクリティカルリージョンを走行している間に他のプロセッサがクリティカルリージョンに入ろうとした場合には、スピンロッ変数が「0」になるまでスピンロック変数値を繰り返しチェックする必要が生じる。このループ処理を「スピンループ」と呼ぶ。スピンループは、排他制御の簡潔な実装方法として、マルチプロセッサシステム上で動作するソフトウェアにおいて多用されている。
【0005】
しかし、マルチスレッドプロセッサにおいては大きな間題が発生する(マルチスレッドプロセッサについては、非特許文献1参照)。即ち、ある論理CPU上でスピンループしているスレッドが論理CPU間で共有している演算リソースを奪ってしまうために、計算処理を行っている他のスレッドの実効性能が大きく低下してしまうことがある(例えば、非特許文献2、3参照)。
【0006】
また、マルチスレッドプロセッサでは、スピンロックのような演算リソースの奪い合い(競合)だけに留まらず、論理CPU間で共有しているその他のリソース(例えば、Intel製Xeonプロセッサ(非特許文献4参照)の場合であれば、1次2次キャッシュメモリやTLB(Translation Look-aside Buffer )が論理CPU間で共有される) における競合もまた性能低下を招く原因となる(例えば、非特許文献5参照)。
【0007】
次に、リソースの競合部分の発見について、従来の技術を述べる。
プログラムの実行において、「プログラム中のどの部分で最も時間を消費したか」といった統計情報を採取する作業を性能プロファイリングという。性能プロファイリングを行う最も基本的で広く利用されている手法として、PCサンプリングが挙げられる(例えば、非特許文献6参照)。
【0008】
PC(プログラムカウンタ) サンプリングとは、ある一定間隔ごとにプログラムのどの部分を実行していたかを記録し、プログラム実行後にそれらサンプリングデータについて統計処理を施すことで性能プロファイリングを行う。実際には、イベント計測カウンタとカウンタのオーバフロー割り込みとを組み合わせることでPCサンプリングを既存プロセッサ上で実現している。
【0009】
例えば、Intelプロセッサに搭載されている性能モニタリングカウンタ(例えば、非特許文献5参照)は上記のような機能を有しているイベント計測カウンタである。しかし、従来のイベント計測カウンタを用いた場合では、ある特定のイベント(例えばタイムベースや実行命令数など)によるサンプリングを行うことは可能であるが、スピンループのような複数の命令の動作の組み合せによって引き起こされるイベントを計測することには対応できない。
【0010】
また、マルチプロセッサ/マルチスレッドプロセッサ向きのイベント計測カウンタが提案されている(例えば、特許文献1、2参照)。しかしこれらの提案は、いずれもプロセッサ上で走行するスレッド別のカウントを可能とするものであったり、すべてのスレッドでの走行時間の合計を記録する、といった機能しか持たない。このような機能を利用したサンプリング測定では、すべてのスレッドが活動している部分を特定することは可能であると考えられるが、性能プロファイリングで重要なのは、すベてのスレッドが活動しているとして、それらがどのような動作(例えばスピンロック)を行っていたかを判断することである。この点において、上記のいずれの手法も、単純に実行された命令数を数えたり、キャッシュミスイベントの発生回数をカウントしたりといった、単一イベントの発生回数をカウントすることしか行うことができず、論理CPU間での関連性を考察する上では不十分と言える。
【0011】
以上の方式の他にも、命令そのものをプロファイルする技術「ProfileMe」(例えば、非特許文献7参照)と呼ぶ方法も提案されている。しかし、この方式は、命令一つずつに識別子をセットして命令そのものの実行遅延を測定するものであり、スピンループのような複数の命令から構成されるループ処理をチェックすることはできない。
【0012】
さらに、ある一定時間毎にプロセッサの動作状態をチェックする「WatchDogタイマ」と呼ぶ機能が知られている。この機能を応用すれば、スピンループについては発生場所を特定できる可能性がある。しかし、この手法では、プログラム中に出現するスピンループ以外のループ処理との識別が困難であり、また、検出できたとしても現在スピンループが発生している1箇所を特定するのみで、性能プロファイリングのような統計処理には適用できない。加えて、上記の手法はループ処理に対してのみ利用可能であり、本発明での課題とする共有リソース競合を検出するために応用することは困難である。
【0013】
なお、ここで論理CPUについて定義を簡単に行う。マルチスレッドプロセッサ内部には、独立した複数の命令流を制御するために、
(1)命令制御部および命令実行ステートを保持するレジスタ群
(2)上記(1)の間で共有されている演算器等
が存在する。ここでは独立した命令流を実行する上で必要となる(1)と(2)の組合せを論理CPUと呼ぶこととする。一方、物理的なプロセッサ全体のことを「物理CPU」と呼ぶこととする。
【0014】
また、「スレッド」とはOSあるいはハードウェアで認識できる実行コンテキストを持つ一連の実行命令列のこととする。
【0015】
【非特許文献1】
"Simultaneous Multithreading: Maximizing On-Chip Parallelism", Dean M.Tullsen,Susan J.Eggers,and Henry M.Levy,In Proc. of 22nd Annual Interna-tional Symposium on Computer Architecture,pp.392-403,June 1995.
【0016】
【非特許文献2】
"Using Spin-Loops on Intel Pentium4 Processor and Intel Xeon ProcessorVersion 2.1",May 2001,Order Number 248674-002.
【0017】
【非特許文献3】
"Introduction to Next Generation Multiprocessing:Hyper-Threading Tech-nology",http://www.intel.com/technology/hyperthread/intro nexgen/.
【0018】
【非特許文献4】
"Hyper-Threading Technology Architecture and Microarchitecture",
Deborah T.Marr, et al.,Intel Technology Journal,Volume.6,Issue.1,Febru- ary 2002.
【0019】
【非特許文献5】
"IA-32 Intel Architecture Software Developer's Manual Volume 3 System Programming Guide",September,2002,Order Number 245472-009, p.7-40.
【0020】
【非特許文献6】
"Measuring Computer Performance A Practitioner's Guide",David J.Lilja,Cambridge University Press,New York,NY,2000.
【0021】
【非特許文献7】
"ProfileMe: Hardware Support for Instruction-Level Profiling on Out-of-Order Processors",Jeffrey Dean,James E.Hicks,Carl A.Waldspurger,WilliamE.Weihl,George Chrysos,International Symposium on Microarchitecture,1997
【0022】
【特許文献1】
特開平10−275100号公報(第1頁、図1)
【0023】
【特許文献2】
特開平9−237203号公報(第1頁)
【0024】
【発明が解決しようとする課題】
前述のように、マルチスレッドプロセッサにおいては、ある論理プロセッサ上でのプログラムの実行速度は、他の論理プロセッサ上でのプログラムの動作状況に大きな影響を受ける。特に、一方の論理プロセッサ上でスピンループが実行されていた場合には、他方の論理プロセッサ上におけるプログラムの実効性能が大きく低下してしまう可能性がある。しかし、このようなスピンループがプログラム実行中の何時、どの部分で発生しているかを検出することはこれまで困難であると考えられていた。
【0025】
また、マルチスレッドプロセッサ内部に装備されている共有リソース( 例えばキャッシュメモリ) において、各論理CPU間で頻繁に競合が発生する場合には、大幅な性能低下を招く危険がある。しかし、このような競合が頻繁に発生していると考えられる場所を特定することもまた困難であつた。
マルチスレッドプロセッサの性能を十分に発揮するためには、上記のような性能劣化の要因となるスピンループおよび共有リソースでの競合を簡単、かつ的確に発見することが課題である。
【0026】
【課題を解決するための手段】
上記課題を解決するため、本発明のマルチスレッドプロセッサにおける共有リソースの競合検出器は以下のように構成される。
(1)第1の発明
第1の発明の原理を図1を用いて説明する。本発明の検出器は、イベント取得手段1、カウント手段2および割り込み手段3から構成する。
【0027】
イベント取得手段1は、マルチスレッドプロセッサの中で実行中の複数のCPU(論理CPU)からコマンドの実行に伴って発生するイベント(実行したイベントの種類)を取得する。
カウント手段2は、取得したイベントが予め登録してあるイベントパターンと比較して等しいときカウンタのカウントアップを行う。例えば、登録してあるイベントパターンが、イベントA、イベントB、イベントCの順に登録してあるとき、イベント取得手段1で取得したイベントの順序とイベントの種類が登録のイベントパターンと同一であればカウンタを1つカウントアップするものである。
【0028】
割り込み手段3は、カウント手段2によってカウントアップされたカウント値が所定の値となったとき、共有リソースの競合が発生したと判断してイベントを発生しているCPUに割り込みを掛けることを行う。
第1の発明は、論理CPU間で共有リソースの競合が起こった場合に、特徴的なイベントパターンが発生することに着目して競合の発生していることを検出するものである。本発明の構成は前述のとおりであるが、本発明を図2のように模式的に示すことができる。図2の論理CPUxで実行中のプログラムの命令は、例えば既存のIntel製プロセッサにおける命令セットアーキテクチャを用いて図3の(a)に示されるようなものである。また図2の登録したイベントパターン内のイベントは同様にIntel製プロセッサの性能モニタリング用イベントを用いて示している。図3(a)のプログラムを実行することにより発生するイベントは、図3の(b)に示されるもので、このイベントと登録したイベントパターンとを比較し、一致した場合にはカウンタをインクリメントする。カウンタ値が所定の値になった場合にイベントを発生しているCPU#xに割り込みを発生させる。
【0029】
第1の発明によれば、マルチスレッドプロセッサにおける共有リソース競合の発生を検知できる。
(2)第2の発明
登録するイベントパターンは、イベントとこのイベントに対応付けてイベント発生元(スピンループを発生している論理CPU)とするものである。これにより、論理CPU間での競合状態を検出することが可能となる。例えば、図4(a)のように、論理CPU#0がキャッシュミスを発生した直後に、論理CPU#1がキャッシュミスを発生させた場合には互いにキャッシュメモリヘのアクセスについて競合状態にある可能性が高い。このようにイベントの発生元を特定することで、共有リソースでの競合がプログラム実行時のどの部分において発生し、悪影響を及ぼしているかを判断することができる。例えば論理CPU#0と論理CPU#1は、図4(b)に示すイベントを発生することが予想され、これをイベントパターンとして登録しておく。
(3)第3の発明
割り込み手段において、カウンタが所定値になったとき、即ち共有リソースの競合状態を検出したとき、論理CPUの割り込みを掛けると共に当該論理CPUのプログラムカウンタの値をサンプリングするものである。これにより、プログラムのどの部分で他方の論理CPUでスピンループが発生していたか、というPCサンプリングによるプロファイリングを行うことができる。
(4)第4の発明
割り込み手段において、カウンタが所定値になったとき、即ち共有リソースの競合状態を検出したとき、競合を発生している当該スレッドとは別の実行状態にあるスレッドを優先的にスケジューリングする。または、競合を発生する原因となっているスレッドの実行を休止(停止)させる。これにより、共有リソース競合の発生を抑えることができる。
(5)第5の発明
本発明の共有リソースの検出方法、イベント取得手順、カウント手順および割り込み手順から構成する。イベント取得手順は、マルチスレッドプロセッサの中で実行中の複数の論理CPUからコマンドの実行に伴って発生するイベントを取得する。カウント手順は、取得したイベントが予め登録してあるイベントパターンと比較して等しいときカウンタのカウントアップを行う。割り込み手順は、カウント手順によってカウントアップされたカウント値が所定の値となったとき、そのイベントを発生しているCPUに割り込みを掛けることを行う。これにより、マルチスレッドプロセッサにおける共有リソース競合の発生を検知できる。
【0030】
【発明の実施の形態】
次に、本発明について図面を参照して実施形態を説明する。
(実施形態その1)
実施形態その1は、2 つの論理CPUで構成されたマルチスレッドプロセッサにおいて、一方の論理CPUが5つの関数(A,B,C,D,E)から構成されているプログラムを実行しているものとする。このとき、当該プログラムのどの部分が、論理CPU#1上で実行されたスピンループの影響を受けているかを検出する例を示す。
【0031】
図5に、本発明のリソース競合の検出機能を有するマルチスレッドプロセッサの基本的な構成を示す。この例は、論理CPUが2つで構成されているマルチスレッドプロセッサである。各構成要素は、プログラム40からコマンド取り出す命令フェッチユニット11、スレッドを制御する命令シーケンサ12、演算器を選択するSU13、算術/論理演算ユニットであるALU14、浮動小数点加算器のFPA15、乗算器FPM16、割算器FPD17、ロ一ドストアユニットLD/ST18、命令シーケンサ12に対応したレジスタセットREG20、命令の終了処理を行うRetirement Unit19、リソースの競合を検出するイベント比較ユニット30から成る。本発明の中心は、イベント比較ユニット30にあるので、マルチスレッドプロセッサを構成する上での他の部分については省略してある。
【0032】
イベント比較ユニットは、イベントパターンを格納するレジスタPTRN REGISTERS35を持ち、ここに検出すべきイベントパターンが登録されている。この例の場合、最大6個のイベント発生シーケンスを検出することができ、イベント発生元とイベントとを登録している。イベント比較ユニット内部には、PTRN INDEX REGISTER34があり、これを用いてPTRNREGISTERS35内のどのイベントを現在比較しているかを示す。発生したイベントは、イベントフェッチユニット31を通してイベント比較ユニットに投入され、登録されたイベントパターンと比較器32で比較される。一致した場合は、カウンタ33をカウントアップし、カウンタ33がオーバーフローしたとき、競合が発生したと判断して割り込み信号を発生させる。カウンタ33は例えば40ビットで構成する。
【0033】
また図5には、スピンループを行うプログラム40の例を表示している。このプログラムが論理CPU#1で実行されているとし、この場合、図5のイベント発生パターンのようなシーケンスでイベントが発生する。この実施例では、図6のように論理CPU#1で発生したカウンタのオーバフロー割り込みを論理CPU#0に発生させることにする。そして、論理CPU#0に対して割り込みが発生した時に実行される割り込みハンドラ内部でPCサンプリングを行う。同時に、従来の技術で実現可能なタイムベース(クロックベース) および実行完了命令数べ一スでのPCサンプリングも行うこととする。
【0034】
次に、実施形態その1の処理フローについて図7をもとに説明する。まず、カウンタ33のカウント値CNT、および登録したイベントパターンの項目番号Iを初期化のため「0」にセットしておく。CPU#1でプログラム40のコマンドを実行し、その実行にともなって発生するイベントをイベントフェッチユニット31から取得する。(S11〜S14)。
【0035】
登録のイベント項目番号Iをカウントアップし、取得したイベントがI番目の登録イベントパターンと一致するかを調べ、一致すればそれが6番目のイベントかどうかを調べる。6番目のイベントであれば6個の発生シーケンスからなる登録イベントパターンと一致したことになるので、カウンタ値”CNT”をカウントアップする。次にカウンタがオーバーフローしていなければ、S12に戻りイベントの取得を行うことを繰り返す。6番目のイベントでなかった場合もS12に戻りイベントの取得の繰り返しを行う。(S15〜S19)。
【0036】
カウンタ33がオーバーフローした場合に競合発生と判断し、CPU#0に割り込みを掛けるとともにレジスタセットREG20の一つであるPCカウンタの値をサンプリングする。(S20)。
図8にPCサンプリングの結果例を示す。これは、1GHzで動作するCPUにおいて論理CPU#0で1秒間PCサンプリングを行った結果である。図7には、従来の(a)タイムベース(クロックベース) サンプリングを行った場合、(b)実行完了命令数べ一スによるサンプリングを行った場合、(c)スピンロック検出イベントによるサンプリングを行った場合のそれぞれについて、PCサンプリングによる各関数の出現比率を示したものである。簡単のため、イベントサンプリングは、各イベントが発生するたびに行われるものとする。
【0037】
(a)、(b)は、従来のイベント計測カウンタによるプロファイリング結果である。通常ソフトウェア開発者は、(a)のプロファイリング結果から、関数Cが最も多くの時間を費やしているので、これが性能向上のボトルネックとなっていると判断する。この場合、関数CのCPI(Cycles Per Instructions)は、
【0038】
【数1】

Figure 0004066838
【0039】
となる。ここで、(c)より論理CPU#0が関数Cを実行中に、論理CPU#1においてスピンロックが
【0040】
【数2】
Figure 0004066838
【0041】
回発生していることがわかる。検出される1つのスピンロックは6命令から構成されているので、総計
【0042】
【数3】
Figure 0004066838
【0043】
命令が論理CPU#1においてスピンロックのために実行されたこととなる。したがって、大まかにいえば、論理CPU#1でスピンロック処理が行われていないと仮定すると、論理CPU#0での実行命令数がIs増えることが期待できる。したがって、スピンロックの影響を取り除いた関数CのCPIは、
【0044】
【数4】
Figure 0004066838
【0045】
となり、関数Cについては約32%の高速化が見込める。
このように、本発明によりスピンロックの影響を受けて実行時間が大幅に増加している部分を検出することが可能となる。
(実施形態その2)
2つの論理CPUで構成されたマルチスレッドプロセッサにおいて、論理CPU上で実行されているスピンループを検出し、それに対応してスレッドスケジューリングを行うことでプロセッサの実効性能を向上するシステム例を示す。
【0046】
図9にスレッドスケジューリングを行うマルチスレッドプロセッサの構成例を示す。図9の構成要素は図5と同様で、イベント比較ユニット30からスケジューリングユニット13および命令シーケンサ12に対して比較結果を転送するためのデータパスが設けられている。
ここで、論理CPU#0においては通常の計算処理を行うスレッド、また論理CPU#1においてスピンロックを行うスレッドが実行されるものとする。このとき、それぞれのスレッドに含まれる命令は対応する命令シーケンサAおよびBから発行される。
【0047】
通常時、スケジューリングユニット13は2つの命令シーケンサから発行された命令を、同一優先度の基で実行ユニットに対して投入するものとする。ここで、イベント比較ユニット30によってスピンロックが検出された場合には、スピンロックを実行しているスレッドよりも、他方スレッドを優先的にスケジューリングする。すなわち、スピンロックを行う命令シーケンサBから発行された命令よりも、命令シーケンサAが発行した命令を優先的に実行ユニットに投入する。
【0048】
本発明により、上記のようなプログラムの実行状況に対応した動的な命令スケジューリング装置が実現可能であり、マルチスレッドプロセッサの命令実効性能を向上させることができる。
(付記1) 複数のCPUを有するマルチスレッドプロセッサの共有リソースの競合検出器であって、
前記複数のCPUがコマンドの実行によって発生するイベントを取得するイベント取得手段と、
取得した前記イベントと、予め登録したイベントパターンとを比較し、一致したときカウンタをカウントアップするカウント手段と、
前記カウンタのカウント値が所定の値になったとき、前記イベントを発生したCPUに割り込みを掛ける割り込み手段と
を有することを特徴とする共有リソースの競合検出器。
【0049】
(付記2) 前記登録したイベントパターンは、イベントと前記イベントに対応付けたイベント発生元であり、
前記割り込み手段は、前記カウンタのカウント値が所定の値になったとき、前記イベントを発生したCPU、または登録した前記イベント発生元のCPUに割り込みを掛ける
ことを特徴とする付記1に記載の共有リソースの競合検出器。
【0050】
(付記3) 前記割り込み手段は、前記カウンタのカウント値が所定の値になったとき、前記イベントを発生したCPUに割り込みを掛け、プログラムカウンタの値をサンプリングする
ことを特徴とする付記1または付記2に記載の共有リソースの競合検出器。
(付記4) 前記割り込み手段は、前記カウンタのカウント値が所定の値になったとき、スレッドのスケジューリング処理を行う
ことを特徴とする付記1または付記2に記載の共有リソースの競合検出器。
【0051】
(付記5) 複数のCPUを有するマルチスレッドプロセッサの共有リソースの競合検出方法であって、
前記複数のCPUがコマンドの実行によって発生するイベント発生パターンを取得するイベントパターン取得手順と、
取得した前記イベント発生パターンと、予め登録した登録イベントパターンとを比較し、一致したときカウンタをカウントアップするカウント手順と、
前記カウンタのカウント値が所定の値になったとき、前記イベント発生パターンを発生したCPUに割り込みを掛ける割り込み手順と
を有することを特徴とする共有リソースの競合検出方法。
【0052】
(付記6) 前記登録したイベントパターンは、イベントと前記イベントの発生時間間隔である
ことを特徴とする付記1または付記2に記載の共有リソースの競合検出器。
(付記7) 前記割り込み手段は、前記カウンタのカウント値が所定の値になったとき、前記イベントを発生したCPUを一時停止するように割り込みを掛ける
ことを特徴とする付記1、付記2または付記6に記載の共有リソースの競合検出器。
【0053】
【発明の効果】
本発明は、マルチスレッドプロセッサにおいて、イベント発生パターンを認識することができるカウンタを使用することで、特徴的なイベント発生パターンを持つスピンループによる演算リソース競合やキャッシュメモリの利用競合、といった論理CPU間での共有リソースの奪い合いが発生する場所を効率的に特定することが可能となる。この情報は、マルチスレッドプロセッサ上で動作するプログラムの最適化を行う技術をサポートする。
【図面の簡単な説明】
【図1】本発明の原理図である。
【図2】第1の発明の模式図である。
【図3】スピンループ実装プログラム例と発生したイベントパターン例である。
【図4】キャッシュメモリアクセスにおける競合の検出例である。
【図5】実施形態その1の構成例である。
【図6】イベント発生元の識別による競合検出例である。
【図7】実施形態その1のフロー例である。
【図8】PCサンプリング例である。
【図9】実施形態その2の構成例である。
【符号の説明】
1:イベント取得手段
2:カウント手段
3:割り込み手段
10:マルチスレッドプロセッサ
11:命令フェッチユニット
12:命令シーケンサ
13:選択ユニット
14:算術/論理演算ユニット
15:浮動小数点加算機
16:乗算器
17:割算器
18:ロード/ストアユニット
19:リタイアメントユニット
20:レジスタセット
30:イベント比較ユニット
31:イベントフェッチユニット
32:比較器
33:カウンタ
34:パターン索引レジスタ
35:パターンレジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a detector and a detection method for finding a competition state of shared resources between logical CPUs in a multi-thread processor composed of a plurality of logical CPUs.
[0002]
[Prior art]
In general, in order to exclusively access resources shared between processors in a multiprocessor system, a program area called “critical region” is often provided. A critical region is a program area that can execute only one processor at a time. Access to shared resources between processors in this area maintains the consistency of data during execution of parallel programs.
[0003]
In practice, in a system with multiple processors, a “spinlock variable” is used to determine whether a processor can enter the critical region, that is, whether another processor is not running in the critical region. Provide a variable to call.
For example, for spinlock variables:
-1 if a processor is running in the critical region
・ "0" when no processor is running
Is set.
[0004]
In this implementation, when one processor is running in the critical region and another processor tries to enter the critical region, it is necessary to repeatedly check the spinlock variable value until the spinlock variable becomes “0”. . This loop processing is called “spin loop”. The spin loop is frequently used in software operating on a multiprocessor system as a simple implementation method of exclusive control.
[0005]
However, a big problem occurs in a multi-thread processor (refer to Non-Patent Document 1 for a multi-thread processor). In other words, the thread that is spinning on a certain logical CPU robs the computation resources shared between the logical CPUs, so that the effective performance of other threads performing computation processing is greatly reduced. (For example, see Non-Patent Documents 2 and 3).
[0006]
Further, in the multi-thread processor, not only the competition (competition) of operation resources such as spin lock, but also other resources shared between logical CPUs (for example, Intel Xeon processor (see Non-Patent Document 4)). In some cases, contention in the primary / secondary cache memory and TLB (Translation Look-aside Buffer) is shared between logical CPUs also causes performance degradation (see, for example, Non-Patent Document 5).
[0007]
Next, a conventional technique for finding a competitive part of a resource will be described.
In the execution of a program, the work of collecting statistical information such as “where in the program the most time was consumed” is called performance profiling. The most basic and widely used technique for performing performance profiling is PC sampling (see Non-Patent Document 6, for example).
[0008]
PC (program counter) sampling is to record which part of the program was executed at certain intervals, and perform performance profiling by performing statistical processing on the sampled data after the program is executed. In practice, PC sampling is realized on an existing processor by combining an event measurement counter and a counter overflow interrupt.
[0009]
For example, a performance monitoring counter (for example, see Non-Patent Document 5) mounted on the Intel processor is an event measurement counter having the above-described functions. However, when a conventional event measurement counter is used, it is possible to perform sampling based on a specific event (for example, time base, number of executed instructions, etc.), but a combination of operations of multiple instructions such as a spin loop. It cannot cope with measuring the event caused by.
[0010]
Also, an event measurement counter for multiprocessor / multithread processor has been proposed (see, for example, Patent Documents 1 and 2). However, each of these proposals has only a function of enabling counting for each thread running on the processor or recording the total running time for all threads. Sampling measurement using such a function seems to be able to identify the part where all threads are active, but the important thing in performance profiling is that all threads are active , To determine what operation (eg, spin lock) they were performing. In this regard, any of the above methods can only count the number of occurrences of a single event, such as simply counting the number of instructions executed or counting the number of occurrences of a cache miss event. It can be said that it is insufficient for considering the relationship between logical CPUs.
[0011]
In addition to the above method, a method called “ProfileMe” (see, for example, Non-Patent Document 7) that profiles an instruction itself has also been proposed. However, in this method, an identifier is set for each instruction to measure the execution delay of the instruction itself, and it is not possible to check a loop process composed of a plurality of instructions such as a spin loop.
[0012]
Furthermore, a function called a “Watch Dog timer” for checking the operating state of the processor at certain intervals is known. If this function is applied, there is a possibility that the occurrence location of the spin loop can be specified. However, with this method, it is difficult to distinguish from loop processing other than the spin loop appearing in the program, and even if it can be detected, it is only necessary to identify one location where the spin loop is present, and performance profiling It cannot be applied to statistical processing such as In addition, the above-described method can be used only for loop processing, and it is difficult to apply it to detect shared resource contention, which is a problem in the present invention.
[0013]
Here, the logical CPU is simply defined. In order to control multiple independent instruction flows inside the multi-thread processor,
(1) A register group that holds an instruction control unit and an instruction execution state (2) There is an arithmetic unit or the like shared between the above (1). Here, the combination of (1) and (2) necessary for executing an independent instruction stream is called a logical CPU. On the other hand, the entire physical processor is referred to as a “physical CPU”.
[0014]
The “thread” is a series of execution instruction sequences having an execution context that can be recognized by the OS or hardware.
[0015]
[Non-Patent Document 1]
"Simultaneous Multithreading: Maximizing On-Chip Parallelism", Dean M. Tullsen, Susan J. Eggers, and Henry M. Levy, In Proc. Of 22nd Annual Interna-tional Symposium on Computer Architecture, pp. 392-403, June 1995.
[0016]
[Non-Patent Document 2]
"Using Spin-Loops on Intel Pentium4 Processor and Intel Xeon ProcessorVersion 2.1", May 2001, Order Number 248674-002.
[0017]
[Non-Patent Document 3]
"Introduction to Next Generation Multiprocessing: Hyper-Threading Tech-nology", http://www.intel.com/technology/hyperthread/intro nexgen /.
[0018]
[Non-Patent Document 4]
"Hyper-Threading Technology Architecture and Microarchitecture",
Deborah T. Marr, et al., Intel Technology Journal, Volume.6, Issue.1, February 2002.
[0019]
[Non-Patent Document 5]
"IA-32 Intel Architecture Software Developer's Manual Volume 3 System Programming Guide", September, 2002, Order Number 245472-009, p.7-40.
[0020]
[Non-Patent Document 6]
"Measuring Computer Performance A Practitioner's Guide", David J. Lilja, Cambridge University Press, New York, NY, 2000.
[0021]
[Non-Patent Document 7]
"ProfileMe: Hardware Support for Instruction-Level Profiling on Out-of-Order Processors", Jeffrey Dean, James E.Hicks, Carl A.Waldspurger, WilliamE.Weihl, George Chrysos, International Symposium on Microarchitecture, 1997
[0022]
[Patent Document 1]
Japanese Patent Laid-Open No. 10-275100 (first page, FIG. 1)
[0023]
[Patent Document 2]
JP-A-9-237203 (first page)
[0024]
[Problems to be solved by the invention]
As described above, in a multi-thread processor, the execution speed of a program on a certain logical processor is greatly influenced by the operation status of the program on another logical processor. In particular, when a spin loop is executed on one logical processor, the effective performance of the program on the other logical processor may be greatly reduced. However, it has been considered difficult to detect when and where such a spin loop occurs during program execution.
[0025]
Further, in the case of frequent competition between logical CPUs in a shared resource (for example, cache memory) provided in the multithread processor, there is a risk of causing a significant performance degradation. However, it has also been difficult to identify where such conflicts are likely to occur.
In order to fully demonstrate the performance of the multi-thread processor, it is a problem to easily and accurately find the competition between the spin loop and the shared resource that cause the performance deterioration as described above.
[0026]
[Means for Solving the Problems]
In order to solve the above problems, the shared resource conflict detector in the multi-thread processor of the present invention is configured as follows.
(1) First Invention The principle of the first invention will be described with reference to FIG. The detector of the present invention comprises event acquisition means 1, count means 2 and interrupt means 3.
[0027]
The event acquisition unit 1 acquires events (types of executed events) that occur with the execution of commands from a plurality of CPUs (logical CPUs) being executed in the multi-thread processor.
The counting means 2 counts up the counter when the acquired event is equal to the previously registered event pattern. For example, when the registered event patterns are registered in the order of event A, event B, and event C, if the order of events acquired by the event acquisition means 1 and the event type are the same as the registered event pattern The counter is incremented by one.
[0028]
When the count value counted up by the count unit 2 reaches a predetermined value, the interrupt unit 3 determines that a shared resource conflict has occurred and interrupts the CPU that has generated the event.
The first invention detects the occurrence of contention by paying attention to the occurrence of a characteristic event pattern when a shared resource contention occurs between logical CPUs. Although the configuration of the present invention is as described above, the present invention can be schematically illustrated as shown in FIG. The instructions of the program being executed by the logical CPUx in FIG. 2 are, for example, as shown in FIG. 3A using an instruction set architecture in an existing Intel processor. The events in the registered event pattern in FIG. 2 are similarly shown using performance monitoring events of the Intel processor. The event generated by executing the program in FIG. 3A is shown in FIG. 3B. This event is compared with the registered event pattern, and if they match, the counter is incremented. . When the counter value reaches a predetermined value, an interrupt is generated in the CPU #x that has generated the event.
[0029]
According to the first aspect, it is possible to detect the occurrence of shared resource contention in the multithread processor.
(2) Second invention An event pattern to be registered is an event and an event generation source (a logical CPU generating a spin loop) associated with the event. Thereby, it is possible to detect a race condition between logical CPUs. For example, as shown in FIG. 4A, when the logical CPU # 1 generates a cache miss immediately after the logical CPU # 0 has generated a cache miss, there is a possibility that the access to the cache memory is in a competition state. High nature. By identifying the event source in this way, it is possible to determine in which part of the program execution the contention in the shared resource has an adverse effect. For example, the logical CPU # 0 and the logical CPU # 1 are expected to generate the event shown in FIG. 4B, and this is registered as an event pattern.
(3) In the third invention interrupt means, when the counter reaches a predetermined value, that is, when a conflicting state of the shared resource is detected, the logical CPU is interrupted and the value of the program counter of the logical CPU is sampled. It is. Thereby, it is possible to perform profiling by PC sampling to determine which part of the program a spin loop has occurred in the other logical CPU.
(4) In the fourth invention interrupt means, when a counter reaches a predetermined value, that is, when a conflict state of a shared resource is detected, priority is given to a thread in an execution state different from the thread in which the conflict occurs. Scheduled. Alternatively, the execution of the thread that causes the contention is suspended (stopped). Thereby, it is possible to suppress the occurrence of shared resource contention.
(5) Fifth Invention The present invention comprises the shared resource detection method, event acquisition procedure, count procedure and interrupt procedure of the present invention. The event acquisition procedure acquires an event that occurs in accordance with the execution of a command from a plurality of logical CPUs being executed in the multithread processor. In the counting procedure, the counter is counted up when the acquired event is equal to the previously registered event pattern. In the interrupt procedure, when the count value counted up by the count procedure becomes a predetermined value, the CPU that has generated the event is interrupted. As a result, occurrence of shared resource contention in the multi-thread processor can be detected.
[0030]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings.
(Embodiment 1)
Embodiment 1 is a multi-thread processor composed of two logical CPUs, one logical CPU executing a program composed of five functions (A, B, C, D, E) And At this time, an example of detecting which part of the program is affected by the spin loop executed on the logical CPU # 1 is shown.
[0031]
FIG. 5 shows a basic configuration of a multi-thread processor having a resource contention detection function according to the present invention. This example is a multi-thread processor having two logical CPUs. Each component includes an instruction fetch unit 11 that fetches a command from the program 40, an instruction sequencer 12 that controls a thread, an SU 13 that selects an arithmetic unit, an ALU 14 that is an arithmetic / logical arithmetic unit, an FPA 15 that is a floating-point adder, a multiplier FPM 16, A divider FPD 17, a load store unit LD / ST 18, a register set REG 20 corresponding to the instruction sequencer 12, a Retirement Unit 19 that performs instruction termination processing, and an event comparison unit 30 that detects resource contention. Since the center of the present invention lies in the event comparison unit 30, other parts of the multi-thread processor are omitted.
[0032]
The event comparison unit has a register PTRN REGISTERS 35 for storing event patterns, and event patterns to be detected are registered here. In this example, a maximum of six event occurrence sequences can be detected, and the event occurrence source and the event are registered. Inside the event comparison unit is a PTRN INDEX REGISTER 34 which is used to indicate which event in the PTRNREGISTERS 35 is currently being compared. The generated event is input to the event comparison unit through the event fetch unit 31 and compared with the registered event pattern by the comparator 32. If they match, the counter 33 is counted up, and when the counter 33 overflows, it is determined that a conflict has occurred and an interrupt signal is generated. The counter 33 is composed of 40 bits, for example.
[0033]
FIG. 5 shows an example of a program 40 that performs a spin loop. Assume that this program is executed by the logical CPU # 1, and in this case, an event occurs in a sequence like the event generation pattern of FIG. In this embodiment, as shown in FIG. 6, the counter overflow interrupt generated in the logical CPU # 1 is generated in the logical CPU # 0. Then, PC sampling is performed inside an interrupt handler that is executed when an interrupt occurs to the logical CPU # 0. At the same time, PC sampling is also performed on the basis of the time base (clock base) and the number of execution completion instructions that can be realized by the conventional technology.
[0034]
Next, the processing flow of Embodiment 1 will be described with reference to FIG. First, the count value CNT of the counter 33 and the item number I of the registered event pattern are set to “0” for initialization. The CPU # 1 executes the command of the program 40, and acquires an event that occurs along with the execution from the event fetch unit 31. (S11-S14).
[0035]
The registered event item number I is counted up, and it is checked whether or not the acquired event matches the I-th registered event pattern, and if it matches, it is checked whether or not it is the sixth event. If it is the sixth event, it matches the registered event pattern consisting of six occurrence sequences, so the counter value “CNT” is counted up. If the counter has not overflowed, the process returns to S12 and the acquisition of the event is repeated. If it is not the sixth event, the process returns to S12 and the acquisition of the event is repeated. (S15-S19).
[0036]
When the counter 33 overflows, it is determined that contention has occurred, interrupts the CPU # 0, and samples the value of the PC counter that is one of the register sets REG20. (S20).
FIG. 8 shows an example of the result of PC sampling. This is a result of performing PC sampling for 1 second by the logical CPU # 0 in the CPU operating at 1 GHz. In FIG. 7, when (a) time base (clock base) sampling is performed, (b) sampling is performed based on the number of execution completion instructions, (c) sampling is performed based on a spin lock detection event. In each case, the appearance ratio of each function by PC sampling is shown. For simplicity, it is assumed that event sampling is performed as each event occurs.
[0037]
(A), (b) is the profiling result by the conventional event measurement counter. Usually, the software developer determines from the profiling result (a) that the function C spends the most time, and this is a bottleneck for improving performance. In this case, the CPI (Cycles Per Instructions) of the function C is
[0038]
[Expression 1]
Figure 0004066838
[0039]
It becomes. Here, from (c), while the logical CPU # 0 is executing the function C, the spin lock is established in the logical CPU # 1.
[Expression 2]
Figure 0004066838
[0041]
It can be seen that it has occurred. Since one detected spinlock consists of 6 instructions, the total
[Equation 3]
Figure 0004066838
[0043]
The instruction is executed for the spin lock in the logical CPU # 1. Therefore, roughly speaking, assuming that the spin lock process is not performed in the logical CPU # 1, it can be expected that the number of executed instructions in the logical CPU # 0 will be increased. Therefore, the CPI of the function C excluding the influence of the spin lock is
[0044]
[Expression 4]
Figure 0004066838
[0045]
Thus, about 32% speedup can be expected for the function C.
As described above, according to the present invention, it is possible to detect a portion where the execution time is significantly increased due to the influence of the spin lock.
(Embodiment 2)
An example of a system that improves the effective performance of a processor by detecting a spin loop being executed on a logical CPU and performing thread scheduling in response to the detection in a multi-thread processor composed of two logical CPUs will be described.
[0046]
FIG. 9 shows a configuration example of a multi-thread processor that performs thread scheduling. The components in FIG. 9 are the same as those in FIG. 5, and a data path is provided for transferring the comparison result from the event comparison unit 30 to the scheduling unit 13 and the instruction sequencer 12.
Here, it is assumed that a thread that performs normal calculation processing is executed in the logical CPU # 0, and a thread that performs spin lock is executed in the logical CPU # 1. At this time, the instructions included in each thread are issued from the corresponding instruction sequencers A and B.
[0047]
In normal times, the scheduling unit 13 inputs instructions issued from two instruction sequencers to the execution unit based on the same priority. Here, when the spin lock is detected by the event comparison unit 30, the other thread is scheduled with priority over the thread executing the spin lock. That is, the instruction issued by the instruction sequencer A is given priority to the execution unit over the instruction issued from the instruction sequencer B that performs the spin lock.
[0048]
According to the present invention, a dynamic instruction scheduling apparatus corresponding to the program execution state as described above can be realized, and the instruction execution performance of the multithread processor can be improved.
(Supplementary note 1) A contention detector for a shared resource of a multi-thread processor having a plurality of CPUs,
Event acquisition means for acquiring an event generated by execution of a command by the plurality of CPUs;
A count means for comparing the acquired event with a pre-registered event pattern and counting up a counter when they match,
A shared resource conflict detector, comprising: interrupt means for interrupting a CPU that has generated the event when a count value of the counter reaches a predetermined value.
[0049]
(Supplementary Note 2) The registered event pattern is an event generation source associated with an event and the event,
The sharing according to claim 1, wherein when the count value of the counter reaches a predetermined value, the interrupt unit interrupts the CPU that generated the event or the registered CPU that generated the event. Resource contention detector.
[0050]
(Supplementary note 3) The supplementary means 1 or Supplementary note, wherein when the count value of the counter reaches a predetermined value, the interrupt means interrupts the CPU that generated the event and samples the value of the program counter 3. The shared resource contention detector according to 2.
(Supplementary Note 4) The shared resource contention detector according to Supplementary Note 1 or 2, wherein the interrupting unit performs thread scheduling when the count value of the counter reaches a predetermined value.
[0051]
(Supplementary Note 5) A method for detecting contention for a shared resource of a multi-thread processor having a plurality of CPUs,
An event pattern acquisition procedure for acquiring event occurrence patterns generated by execution of commands by the plurality of CPUs;
A count procedure for comparing the acquired event occurrence pattern with a registered event pattern registered in advance and counting up a counter when they match,
A shared resource conflict detection method, comprising: an interrupt procedure for interrupting a CPU that has generated the event occurrence pattern when a count value of the counter reaches a predetermined value.
[0052]
(Supplementary Note 6) The shared resource conflict detector according to Supplementary Note 1 or 2, wherein the registered event pattern is an event and an occurrence time interval of the event.
(Supplementary Note 7) The supplementary note 1, the supplementary note 2 or the supplementary note, wherein when the count value of the counter reaches a predetermined value, the interrupt means interrupts the CPU that has generated the event. 6. The shared resource contention detector according to 6.
[0053]
【The invention's effect】
By using a counter capable of recognizing an event occurrence pattern in a multi-thread processor, the present invention makes it possible for logical CPUs such as computation resource contention due to a spin loop having a characteristic event occurrence pattern and cache memory use contention. It is possible to efficiently identify a place where a contention for shared resources occurs. This information supports techniques for optimizing programs that run on multithreaded processors.
[Brief description of the drawings]
FIG. 1 is a principle diagram of the present invention.
FIG. 2 is a schematic diagram of the first invention.
FIG. 3 is an example of a spin loop implementation program and an example of an event pattern that has occurred.
FIG. 4 is an example of contention detection in cache memory access.
FIG. 5 is a configuration example of Embodiment 1;
FIG. 6 is an example of conflict detection by identification of an event generation source.
FIG. 7 is a flow example of Embodiment 1;
FIG. 8 is an example of PC sampling.
FIG. 9 is a configuration example of Embodiment 2;
[Explanation of symbols]
1: Event acquisition means 2: Count means 3: Interrupt means 10: Multithread processor 11: Instruction fetch unit 12: Instruction sequencer 13: Selection unit 14: Arithmetic / logical operation unit 15: Floating point adder 16: Multiplier 17: Divider 18: Load / store unit 19: Retirement unit 20: Register set 30: Event comparison unit 31: Event fetch unit 32: Comparator 33: Counter 34: Pattern index register 35: Pattern register

Claims (4)

複数の論理CPUを有するマルチスレッドプロセッサの共有リソースの競合検出器であって、
前記複数の論理CPUがコマンドの実行によって発生するイベントを取得するイベント取得手段と、
取得した前記イベントと、予め登録したスピンロック実行時に出現するイベントパターンとを比較し、一致したときカウンタをカウントアップするカウント手段と、
前記カウンタのカウント値が所定の値になったとき、一つ以上の論理CPUにスレッドのスケジューリング処理を行う割り込み手段と
を有することを特徴とする共有リソースの競合検出器。
A shared resource contention detector of a multi-thread processor having a plurality of logical CPUs,
Event acquisition means for acquiring an event generated by execution of a command by the plurality of logical CPUs;
The acquired event is compared with a pre-registered event pattern that appears at the time of executing the spin lock, and a count unit that counts up the counter when they match,
A shared resource contention detector, comprising: interrupt means for performing thread scheduling processing on one or more logical CPUs when a count value of the counter reaches a predetermined value.
前記登録したイベントパターンは、イベントと前記イベントに対応付けたイベント発生元であり、
前記割り込み手段は、前記カウンタのカウント値が所定の値になったとき、前記イベント発生元の論理CPUに割り込みを掛ける
ことを特徴とする請求項1に記載の共有リソースの競合検出器。
The registered event pattern is an event generation source associated with an event and the event,
The shared resource contention detector according to claim 1, wherein when the count value of the counter reaches a predetermined value, the interrupt unit interrupts the logical CPU that has generated the event.
前記割り込み手段は、前記カウンタのカウント値が所定の値になったとき、一つ以上の論理CPUに割り込みを掛け、前記論理CPUに対応したプログラムカウンタの値をサンプリングする
ことを特徴とする請求項1または請求項2に記載の共有リソースの競合検出器。
The interrupt means interrupts one or more logical CPUs when the count value of the counter reaches a predetermined value, and samples the value of a program counter corresponding to the logical CPU. The contention detector for shared resources according to claim 1 or 2.
複数の論理CPUを有するマルチスレッドプロセッサの共有リソースの競合検出方法であって、A method for detecting contention for a shared resource of a multi-thread processor having a plurality of logical CPUs,
前記複数の論理CPUがコマンドの実行によって発生するイベント発生パターンを取得するイベントパターン取得手順と、An event pattern acquisition procedure for acquiring an event occurrence pattern generated by execution of a command by the plurality of logical CPUs;
取得した前記イベント発生パターンと、予め登録したスピンロック実行時に出現する登録イベントパターンとを比較し、一致したときカウンタをカウントアップするカウント手順と、A count procedure for comparing the acquired event occurrence pattern with a registered event pattern that appears at the time of executing a pre-registered spin lock, and counting up a counter when they match,
前記カウンタのカウント値が所定の値になったとき、一つ以上の論理CPUにスレッドのスケジューリング処理を行う割り込み手順とAn interrupt procedure for performing thread scheduling processing on one or more logical CPUs when the count value of the counter reaches a predetermined value;
を有することを特徴とする共有リソースの競合検出方法。A conflict detection method for shared resources, comprising:
JP2003041575A 2003-02-19 2003-02-19 Shared resource conflict detector and shared resource conflict detection method Expired - Fee Related JP4066838B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003041575A JP4066838B2 (en) 2003-02-19 2003-02-19 Shared resource conflict detector and shared resource conflict detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003041575A JP4066838B2 (en) 2003-02-19 2003-02-19 Shared resource conflict detector and shared resource conflict detection method

Publications (2)

Publication Number Publication Date
JP2004252670A JP2004252670A (en) 2004-09-09
JP4066838B2 true JP4066838B2 (en) 2008-03-26

Family

ID=33025116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003041575A Expired - Fee Related JP4066838B2 (en) 2003-02-19 2003-02-19 Shared resource conflict detector and shared resource conflict detection method

Country Status (1)

Country Link
JP (1) JP4066838B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4276201B2 (en) 2005-03-31 2009-06-10 富士通株式会社 Billing processing apparatus for SMT processor, billing processing method, and billing processing program
US7992146B2 (en) 2006-11-22 2011-08-02 International Business Machines Corporation Method for detecting race conditions involving heap memory access
JP5397544B2 (en) 2010-06-25 2014-01-22 富士通株式会社 Multi-core system, multi-core system scheduling method, and multi-core system scheduling program
KR102285749B1 (en) 2014-11-10 2021-08-05 삼성전자주식회사 System on chip having semaphore function and emplementing method thereof
JP6447320B2 (en) * 2015-04-01 2019-01-09 株式会社デンソー Performance monitoring device
CN115543622B (en) * 2022-10-11 2024-03-12 天道金科股份有限公司 Resource use controller with counting time stamp in distributed environment and control method

Also Published As

Publication number Publication date
JP2004252670A (en) 2004-09-09

Similar Documents

Publication Publication Date Title
JP4467094B2 (en) Apparatus for sampling a large number of potentially simultaneous instructions in a processor pipeline
JP4467093B2 (en) Apparatus for randomly sampling instructions in a processor pipeline
JP4294778B2 (en) Method for estimating statistics of the characteristics of interactions processed by a processor pipeline
Sprunt Pentium 4 performance-monitoring features
US7426731B2 (en) Determining processor usage by a thread
JP4785213B2 (en) How to analyze computer performance data
US8464035B2 (en) Instruction for enabling a processor wait state
US5752062A (en) Method and system for performance monitoring through monitoring an order of processor events during execution in a processing system
US6480966B1 (en) Performance monitor synchronization in a multiprocessor system
US5751945A (en) Method and system for performance monitoring stalls to identify pipeline bottlenecks and stalls in a processing system
US20160216966A1 (en) System and Method for Mitigating the Impact of Branch Misprediction When Exiting Spin Loops
JPH11272518A (en) Method for estimating statistic value of characteristics of instruction processed by processor pipeline
JPH11272514A (en) Device for sampling instruction operand or result value in processor pipeline
US6785887B2 (en) Technique for using shared resources on a multi-threaded processor
JPH10254700A (en) Processor performance counter for sampling execution frequency of individual instructions
US20030135720A1 (en) Method and system using hardware assistance for instruction tracing with secondary set of interruption resources
US7506207B2 (en) Method and system using hardware assistance for continuance of trap mode during or after interruption sequences
US5729726A (en) Method and system for performance monitoring efficiency of branch unit operation in a processing system
US5748855A (en) Method and system for performance monitoring of misaligned memory accesses in a processing system
US7493615B2 (en) Apparatus and method for synchronizing multiple threads in an out-of-order microprocessor
US6550002B1 (en) Method and system for detecting a flush of an instruction without a flush indicator
Nakajima et al. Enhancements for {Hyper-Threading} Technology in the Operating System: Seeking the Optimal Scheduling
JP4066838B2 (en) Shared resource conflict detector and shared resource conflict detection method
Mericas Performance monitoring on the POWER5 microprocessor
JP2005215816A (en) Performance profiling method using hardware monitor

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040610

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040610

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060215

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070807

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070828

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071017

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: 20071218

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071231

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4066838

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120118

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130118

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140118

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees