Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6447320B2 - Performance monitoring device - Google Patents
[go: Go Back, main page]

JP6447320B2 - Performance monitoring device - Google Patents

Performance monitoring device Download PDF

Info

Publication number
JP6447320B2
JP6447320B2 JP2015075119A JP2015075119A JP6447320B2 JP 6447320 B2 JP6447320 B2 JP 6447320B2 JP 2015075119 A JP2015075119 A JP 2015075119A JP 2015075119 A JP2015075119 A JP 2015075119A JP 6447320 B2 JP6447320 B2 JP 6447320B2
Authority
JP
Japan
Prior art keywords
event
register
context
occurrence
flag
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
JP2015075119A
Other languages
Japanese (ja)
Other versions
JP2016194855A (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.)
Denso Corp
Original Assignee
Denso Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Corp filed Critical Denso Corp
Priority to JP2015075119A priority Critical patent/JP6447320B2/en
Publication of JP2016194855A publication Critical patent/JP2016194855A/en
Application granted granted Critical
Publication of JP6447320B2 publication Critical patent/JP6447320B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、プログラムの性能解析等に使用されるパフォーマンスモニタ装置に関する。   The present invention relates to a performance monitor apparatus used for performance analysis of programs.

パフォーマンスモニタ装置は、プロセッサによるプログラムの実行中に、ハードウェアが発生させたイベントの情報を記憶して、プログラムの性能を解析するため等に使用される。例えば特許文献1には、プロセッサが命令を実行する際に行われる一連の処理に伴い発生するイベント群の中から、予め設定した特徴的なイベントを抽出可能としたパフォーマンスモニタ装置が開示されている。   The performance monitoring device is used for storing information on events generated by hardware during execution of a program by a processor and analyzing the performance of the program. For example, Patent Document 1 discloses a performance monitor device that can extract a preset characteristic event from a group of events that occur in accordance with a series of processes performed when a processor executes an instruction. .

特開2008−186080号公報JP 2008-186080 A

特許文献1に開示された構成によれば、複数のイベントの組み合わせによる特徴イベントを抽出できるが、複数のイベントの組み合わせがどのような時系列で発生したのかは特定できない。例えば、発生したイベントについての時系列情報を全てロギングすれば、その情報を解析することで、特定の複数のイベントが特定の時系列で発生した期間を特定可能である。   According to the configuration disclosed in Patent Document 1, it is possible to extract a feature event by a combination of a plurality of events, but it is not possible to specify in what time series the combination of a plurality of events has occurred. For example, if all the time series information about an event that has occurred is logged, by analyzing the information, it is possible to specify the period in which a plurality of specific events occurred in a specific time series.

しかしながら、その場合、イベント数の増加に伴い時系列の特徴抽出パターンが複雑化するため、ハードウェアで処理することは困難になる。一方、ソフトウェアによる処理は、パフォーマンスモニタ装置の動作がシステムの負荷を増大させるため、解析中のプログラムの性能に影響を及ぼして評価が不正確になるおそれがある。   However, in that case, the time-series feature extraction pattern becomes complicated as the number of events increases, making it difficult to process with hardware. On the other hand, in the processing by software, the operation of the performance monitor device increases the load on the system, so that the performance of the program being analyzed may be affected and the evaluation may be inaccurate.

本発明は上記事情に鑑みてなされたものであり、その目的は、小規模のハードウェアによって、発生したイベントについての時系列情報を抽出できるパフォーマンスモニタ装置を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a performance monitoring apparatus that can extract time-series information about an event that has occurred with small-scale hardware.

請求項1記載のパフォーマンスモニタ装置によれば、イベント前後関係記録部には、プロセッサによるプログラムの実行に伴って発生した2つのイベントのペア(イベントペア)について、それらが発生した時点の前後関係が記録される。前後関係特徴レジスタには、ユーザにより、時系列を特定する対象となる複数のイベントの発生順序が設定される。比較判定部は、イベント前後関係記録部に記録された前後関係の組み合わせが、前後関係特徴レジスタに設定されている発生順序に一致するか否かを比較し、一致すると時系列特定フラグ15をセットする。そして、カウンタは、時系列特定フラグ15がセットされた回数をカウントする。   According to the performance monitor device of claim 1, the event context recording unit has a context of two event pairs (event pairs) that occur as a result of execution of the program by the processor. To be recorded. In the context characteristic register, the occurrence order of a plurality of events for which a time series is specified is set by the user. The comparison determination unit compares whether or not the combination of the contexts recorded in the event context recording unit matches the generation order set in the context feature register, and sets the time series identification flag 15 if they match. To do. Then, the counter counts the number of times the time series identification flag 15 is set.

このように構成すれば、上記カウンタの値を参照することで、ユーザが前後関係特徴レジスタに設定した複数のイベントが、モニタ期間中に設定された発生順序で何回発生したのかを特定できる。そして、イベント前後関係記録部には、2つのイベントのペアについてそれらが発生した時点の前後関係が記録されるので、それらの組み合わせによって複数のイベントの発生順序を特定できる。したがって、比較的小規模のハードウェアにより、発生したイベントについての時系列情報を抽出できる。   With this configuration, by referring to the value of the counter, it is possible to specify how many times a plurality of events set by the user in the context characteristic register have occurred in the order of occurrence set during the monitoring period. The event context recording unit records the context at the time of occurrence of two event pairs, so the order of occurrence of a plurality of events can be specified by their combination. Therefore, it is possible to extract time-series information about the event that has occurred with relatively small hardware.

一実施形態であり、パフォーマンスモニタ装置における前後関係特徴判定部の構成を中心に示す図The figure which is one Embodiment and shows mainly the structure of the context characteristic determination part in a performance monitor apparatus イベントレジスタ及びイベント前後関係記録部の動作の一例を説明する図The figure explaining an example of operation | movement of an event register and an event context recording part 各イベントの内容を示す図Diagram showing the contents of each event パフォーマンスモニタ装置の構成を示す機能ブロック図Functional block diagram showing the configuration of the performance monitoring device 信号処理装置の構成を示す機能ブロック図Functional block diagram showing the configuration of the signal processing device パフォーマンスモニタ装置の動作を示すフローチャートFlow chart showing operation of performance monitor device

以下、一実施形態について説明する。図5に示すように、本実施形態の信号処理装置(プロセッサシステム)は、複数のステージ1(1),1(2),1(3),…が内部バス2を介して相互に接続されている。各ステージ1は、例えば2個のプロセッサコア3(A),3(B),共用メモリ4,調停装置5及びパフォーマンスモニタ装置6を備えている。調停装置5は、プロセッサコア3(A),3(B)による内部バス2及び共用メモリ4へのアクセスを調停するもので、その調停に関する情報等はパフォーマンスモニタ装置6に入力されている。   Hereinafter, an embodiment will be described. As shown in FIG. 5, in the signal processing apparatus (processor system) of this embodiment, a plurality of stages 1 (1), 1 (2), 1 (3),... Are connected to each other via an internal bus 2. ing. Each stage 1 includes, for example, two processor cores 3 (A) and 3 (B), a shared memory 4, an arbitration device 5, and a performance monitor device 6. The arbitration device 5 mediates access to the internal bus 2 and the shared memory 4 by the processor cores 3 (A) and 3 (B), and information related to the arbitration is input to the performance monitor device 6.

パフォーマンスモニタ装置6は、プロセッサコア3が実行する制御プログラムの性能を評価するための装置である。そして、各ステージ1のパフォーマンスモニタ装置6は、外部バス7を介してホストプロセッサ8に接続されている。図4に示すように、パフォーマンスモニタ装置6には、内部バス2及び調停装置5より例えば8ビットのイベント信号が入力されている。各イベント信号がインアクティブ:「0」からアクティブ:「1」に変化すると、イベントレジスタ11(イベント前後関係記録部)の対応する第1〜第8ビットが「1」にセットされる。   The performance monitor device 6 is a device for evaluating the performance of the control program executed by the processor core 3. The performance monitor device 6 of each stage 1 is connected to the host processor 8 via the external bus 7. As shown in FIG. 4, for example, an 8-bit event signal is input to the performance monitor device 6 from the internal bus 2 and the arbitration device 5. When each event signal changes from inactive: “0” to active: “1”, the corresponding first to eighth bits of the event register 11 (event context recording unit) are set to “1”.

イベント前後関係記録部12には、イベントレジスタ11における各ビットのセット/リセット状態に応じて、当面発生したイベント信号と過去に発生したイベント信号との前後関係が記録される。前後関係特徴レジスタ13には、各イベントE1〜E8のうち、ユーザが時系列を特定する対象のイベントについて、それらの発生順序(前後関係),すなわち時系列情報が設定される。例えば、発生順序を特定しないイベントには「0」を設定し、発生順序を特定するイベントには発生順序1〜7を設定する。この場合、前後関係特徴レジスタ13は(3ビット)×8のレジスタとなる。この設定は、ホストプロセッサ8を介してユーザにより行われる。   According to the set / reset state of each bit in the event register 11, the event context recording unit 12 records the context between the event signal generated for the time being and the event signal generated in the past. In the context characteristic register 13, among the events E <b> 1 to E <b> 8, the generation order (context relation), that is, time series information, is set for the event for which the user specifies the time series. For example, “0” is set for events that do not specify the occurrence order, and occurrence orders 1 to 7 are set for events that specify the occurrence order. In this case, the context characteristic register 13 is a (3 bits) × 8 register. This setting is performed by the user via the host processor 8.

前後関係特徴判定部14(比較判定部)は、前後関係特徴レジスタ13における設定状態と、イベント前後関係記録部12における記録状態とを比較して、両者が一致すると時系列特定フラグ15をセットする。時系列特定フラグ15は、カウンタ16に入力される。カウンタ16は、開始/停止信号選択レジスタ17を介して入力される開始信号,停止信号によってカウント動作を開始,停止する例えば32ビットのカウンタである。カウンタ16は、その間のモニタ期間内に時系列特定フラグ15がセットされた回数をカウントする。開始/停止信号選択レジスタ17には、例えば各4ビットのモニタ開始信号,モニタ停止信号が入力されており、ユーザによる設定に応じて4ビットの何れかをトリガとして選択し、それぞれ開始/停止信号選択レジスタ17に入力する開始信号,停止信号とする。   The context characteristic determination unit 14 (comparison determination unit) compares the setting state in the context characteristic register 13 with the recording state in the event context recording unit 12, and sets the time-series identification flag 15 when the two match. . The time series identification flag 15 is input to the counter 16. The counter 16 is, for example, a 32-bit counter that starts and stops a count operation in response to a start signal and a stop signal input via the start / stop signal selection register 17. The counter 16 counts the number of times that the time series identification flag 15 is set within the monitoring period. For example, a 4-bit monitor start signal and a monitor stop signal are input to the start / stop signal selection register 17, and one of the 4 bits is selected as a trigger according to the setting by the user, and each start / stop signal is selected. A start signal and a stop signal input to the selection register 17 are used.

また、イベント前後関係記録部12における記録状態(後述するように56ビット)とカウンタ16のカウンタ値とは、パフォーマンスモニタ装置6の外部に例えばシリアルデータとして出力され(記録状態出力部に相当)、外部バス7及びホストプロセッサ8を介してユーザがリアルタイムでモニタ可能となっている。   In addition, the recording state (56 bits as will be described later) in the event context recording unit 12 and the counter value of the counter 16 are output to the outside of the performance monitor device 6 as serial data (corresponding to a recording state output unit), for example. The user can monitor in real time via the external bus 7 and the host processor 8.

図2に示すように、イベント前後関係記録部12は、レジスタ選択部21と、イベント前後関係記録レジスタ22とを備えている。イベント前後関係記録レジスタ22は、8つのイベントのうち任意の2つの組み合わせであるイベントペア(En,Em)について設けられ(n<m)、初期値は「0」である。そして、各イベントが発生した時点の前後関係に応じて、レジスタ選択部21によりフラグ「1」がセットされる。各イベントペア(En,Em)に前発生レジスタ22(En>Em)と後発生レジスタ22(En<Em)とが設けられているので、総計56ビットのレジスタとなる。   As shown in FIG. 2, the event context recording unit 12 includes a register selection unit 21 and an event context recording register 22. The event context record register 22 is provided for an event pair (En, Em) which is an arbitrary combination of eight events (n <m), and the initial value is “0”. Then, the flag “1” is set by the register selection unit 21 in accordance with the context at the time when each event occurs. Since each event pair (En, Em) is provided with a pre-occurrence register 22 (En> Em) and a post-occurrence register 22 (En <Em), the register becomes a total of 56 bits.

例えば、イベントペア(E1,E2)については、前発生レジスタ22(E1>E2)と後発生レジスタ22(E1<E2)とがあり、イベントE1がイベントE2よりも前に発生した場合は前発生レジスタ22(E1>E2)にフラグ「1」がセットされ、イベントE1がイベントE2よりも後に発生した場合は後発生レジスタ22(E1<E2)にフラグ「1」がセットされる。図2に示すように、双方のレジスタ22(E1>E2)及び22(E1<E2)に何れもフラグ「1」がセットされていれば、イベントE1がイベントE2の前後双方の時点で発生したことを示す。   For example, for the event pair (E1, E2), there are a pre-occurrence register 22 (E1> E2) and a post-occurrence register 22 (E1 <E2). If event E1 occurs before event E2, it occurs before The flag “1” is set in the register 22 (E1> E2), and when the event E1 occurs after the event E2, the flag “1” is set in the post-generation register 22 (E1 <E2). As shown in FIG. 2, if the flag “1” is set in both registers 22 (E1> E2) and 22 (E1 <E2), the event E1 occurs both before and after the event E2. It shows that.

図3に示す各イベントの一例として、イベントE1〜E4は、プロセッサ3が共用メモリ4に対して読み書きアクセスを行った場合及びそれらのアクセスに対するストールの発生に関するものである。また、イベントE5及びE6は、プロセッサ3が内部バス2に対して書き込みアクセスを行った場合及びそのアクセスに対するストールの発生に関するものである。また、イベントE7及びE8は、プロセッサ3が内部バス2の図5中左方向又は右方向のステージ1に対してデータ転送を行った場合のストールの発生に関するものである。   As an example of each event illustrated in FIG. 3, events E <b> 1 to E <b> 4 relate to the case where the processor 3 performs read / write access to the shared memory 4 and the occurrence of a stall for those accesses. Events E5 and E6 relate to the case where the processor 3 makes a write access to the internal bus 2 and the occurrence of a stall for the access. Events E7 and E8 relate to the occurrence of a stall when the processor 3 transfers data to the left or right stage 1 of the internal bus 2 in FIG.

例えば図2に示すように、イベントがE1,E3,E2,E1,E7,…の時系列で発生した場合、各レジスタの値は以下のように変化する。
イベント イベントレジスタ イベント前後関係記録レジスタ
E1 E1「1」
E3 E3「1」 (E1<E3)「1」
E2 E2「1」 (E1<E2)「1」
(E2>E3)「1」
E1 E1「1」 (E1>E2)「1」
(E1>E3)「1」
E7 E7「1」 (E1<E7)「1」
(E2<E7)「1」
(E3<E7)「1」
For example, as shown in FIG. 2, when events occur in a time series of E1, E3, E2, E1, E7,..., The values of the registers change as follows.
Event Event register Event context record register E1 E1 “1”
E3 E3 “1” (E1 <E3) “1”
E2 E2 “1” (E1 <E2) “1”
(E2> E3) “1”
E1 E1 “1” (E1> E2) “1”
(E1> E3) “1”
E7 E7 “1” (E1 <E7) “1”
(E2 <E7) “1”
(E3 <E7) “1”

図1に示すように、前後関係特徴判定部14は、イベントペア数だけ存在するマルチプレクサ23及び比較ロジック24(比較器)と、イベントペア選択部25及びANDゲート26とを備えている。各マルチプレクサ23(En,Em)には、対応するイベントペアの後発生レジスタ(En<Em),前発生レジスタ(En>Em)のレジスタ値が入力されており、前者が「1」側で後者が「0」側である。比較ロジック24(En<Em)は、前後関係特徴レジスタ13において、発生順序が設定されているイベントペアについてその順序の大小関係を比較し、比較結果を「1,0」で対応するマルチプレクサ23(En,Em)に選択信号として出力する。   As shown in FIG. 1, the contextual feature determination unit 14 includes a multiplexer 23 and a comparison logic 24 (comparator) that exist as many as the number of event pairs, an event pair selection unit 25, and an AND gate 26. Each multiplexer 23 (En, Em) receives the register values of the subsequent occurrence register (En <Em) and the previous occurrence register (En> Em) of the corresponding event pair, the former being the “1” side and the latter Is the “0” side. The comparison logic 24 (En <Em) compares the magnitude relation of the order of the event pairs in which the generation order is set in the context characteristic register 13, and the comparison result is “1, 0” and the corresponding multiplexer 23 ( En, Em) as a selection signal.

各マルチプレクサ23(En,Em)の出力信号は、イベントペア選択部25を介してANDゲート26に入力される。前後関係特徴レジスタ13は、イベントペア選択部25に28ビットの選択信号を与える。前後関係特徴レジスタ13において、発生順序が設定されていないイベントペア,すなわち少なくとも一方が「0」であるイベントペアについては、対応するマルチプレクサ23の選択を行う必要が無い。したがって、イベントペア選択部25が対応するマルチプレクサ23の出力を直接「1」にして、ANDゲート26に入力する。   The output signal of each multiplexer 23 (En, Em) is input to the AND gate 26 via the event pair selection unit 25. The context characteristic register 13 gives a 28-bit selection signal to the event pair selection unit 25. In the context characteristic register 13, it is not necessary to select the corresponding multiplexer 23 for an event pair for which the generation order is not set, that is, an event pair in which at least one is “0”. Therefore, the event pair selection unit 25 directly sets the output of the corresponding multiplexer 23 to “1” and inputs it to the AND gate 26.

図1に示す例で説明すると、ユーザが前後関係特徴レジスタ13に発生順序
E3<E1<E7
を設定している。この場合、3つのイベントペア(E1,E3),(E1,E7),(E3,E7)のみが有効となり、他の25のイベントペアは無効となる。この時、前後関係特徴レジスタ13からイベントペア選択部25に対して、例えば有効な3つのイベントペアについては「0」を与えて、対応するマルチプレクサ23の選択結果を有効とする。その他のイベントペアについては「1」を与えて、対応するマルチプレクサ23の選択結果に関わらず、上述したようにイベントペア選択部25がANDゲート26に直接「1」を入力する。
In the example shown in FIG. 1, the user enters the generation order E3 <E1 <E7 in the context feature register 13.
Is set. In this case, only three event pairs (E1, E3), (E1, E7), (E3, E7) are valid, and the other 25 event pairs are invalid. At this time, for example, “0” is given to the event pair selection unit 25 from the context characteristic register 13 for the valid three event pairs, and the selection result of the corresponding multiplexer 23 is validated. For other event pairs, “1” is given, and the event pair selection unit 25 inputs “1” directly to the AND gate 26 as described above, regardless of the selection result of the corresponding multiplexer 23.

また、ユーザが前後関係特徴レジスタ13に設定した発生順序は、各イベントペア毎に分けると、
E1(2)<E3(1)? → 0
E3(1)<E7(3)? → 1
E1(2)<E7(3)? → 1
となる。上記の比較結果に従い、マルチプレクサ23(E1,E3)では、「0」側の入力である前発生レジスタ22(E1>E3)の値「1」が選択される。また、マルチプレクサ23(E3,E7)では、「1」側の入力である後発生レジスタ22(E1<E7)の値「1」が選択される。マルチプレクサ23(E1,E7)も同様に、「1」側の入力である後発生レジスタ22(E3<E7)の値「1」が選択される。
In addition, when the occurrence order set by the user in the context characteristic register 13 is divided for each event pair,
E1 (2) <E3 (1)? → 0
E3 (1) <E7 (3)? → 1
E1 (2) <E7 (3)? → 1
It becomes. In accordance with the comparison result, the multiplexer 23 (E1, E3) selects the value “1” of the pre-occurrence register 22 (E1> E3), which is the input on the “0” side. Further, the multiplexer 23 (E3, E7) selects the value “1” of the post-generation register 22 (E1 <E7), which is the input on the “1” side. Similarly, the value “1” of the post-generation register 22 (E3 <E7), which is the input on the “1” side, is also selected for the multiplexer 23 (E1, E7).

したがって、イベント前後関係記録部12における前後関係の記録状態が、ユーザが前後関係特徴レジスタ13に設定した発生順序に一致した時点でANDゲート26が「1」を出力し、時系列特定フラグ15がセットされる。ここで、本実施形態のように、前後関係特徴判定部14が、イベント数8で発生順序1〜7までを設定するために必要なハードウエア資源量は、以下のようになる。
・イベント前後関係記録部12 56ビット
・前後関係特徴レジスタ13 3×8=24ビット
・マルチプレクサ23(2:1) 28個
・比較ロジック24 28個
・イベントペア選択部25(28ビット) 1個
・ANDゲート26(28入力) 1個
Therefore, when the context recording state in the event context recording unit 12 matches the order of occurrence set in the context characteristic register 13 by the user, the AND gate 26 outputs “1”, and the time series identification flag 15 is set. Set. Here, as in the present embodiment, the amount of hardware resources necessary for the context characteristic determination unit 14 to set the occurrence order 1 to 7 with the number of events 8 is as follows.
Event context recording unit 12 56 bits, context feature register 13 3 × 8 = 24 bits, multiplexer 23 (2: 1) 28, comparison logic 24 28, event pair selection unit 25 (28 bits) 1 AND gate 26 (28 inputs) 1 piece

次に、本実施形態の作用について説明する。図6に示すように、先ずユーザが、パフォーマンスモニタ装置6の前後関係特徴レジスタ13,及び開始/停止信号選択レジスタ17に設定を行う(S1,S2)。それから、イベントレジスタ11及びイベント前後関係記録部12が初期化されると(S3)、プロセッサコア3が制御プログラムの実行を開始する(S4)。それに伴い、イベント前後関係記録部12において特徴イベントの抽出(発生順序が設定されたイベントペアについての前後関係の記録)が開始される(S5)。   Next, the operation of this embodiment will be described. As shown in FIG. 6, the user first sets the context characteristic register 13 and the start / stop signal selection register 17 of the performance monitor device 6 (S1, S2). Then, when the event register 11 and the event context recording unit 12 are initialized (S3), the processor core 3 starts executing the control program (S4). Along with this, the event context recording unit 12 starts extracting feature events (recording the context of event pairs for which the order of occurrence has been set) (S5).

ユーザが選択設定したモニタ開始信号が発生すると、パフォーマンスモニタ装置6によるプログラムのモニタが開始され(S6)、カウンタ16は、時系列特定フラグ15がセットされた回数をカウントする(S7)。その後、ユーザが選択設定したモニタ停止信号が発生すると、パフォーマンスモニタ装置6によるモニタが停止する(S8)。そして、モニタ結果を外部に出力し(S9)、プログラムの実行が終了でなければ(S10:NO)ステップS5に戻り、プログラムの実行が終了すれば(YES)終了となる。   When the monitor start signal selected and set by the user is generated, monitoring of the program by the performance monitor device 6 is started (S6), and the counter 16 counts the number of times the time series identification flag 15 is set (S7). Thereafter, when a monitor stop signal selected and set by the user is generated, monitoring by the performance monitor device 6 is stopped (S8). Then, the monitor result is output to the outside (S9). If the execution of the program is not finished (S10: NO), the process returns to step S5, and if the execution of the program is finished (YES), the process is finished.

以上のように本実施形態によれば、パフォーマンスモニタ装置6において、イベント前後関係記録部12には、プロセッサ3によるプログラムの実行に伴って発生した2つのイベントのペアについて、それらが発生した時点の前後関係が記録され、前後関係特徴レジスタ13には、ユーザにより複数のイベントの発生順序が設定される。前後関係特徴判定部14は、イベント前後関係記録部12に記録された前後関係の組み合わせが、前後関係特徴レジスタ13に設定されている発生順序に一致するか否かを比較し、一致すると時系列特定フラグ15をセットする。そして、カウンタ16は、時系列特定フラグ15がセットされた回数をカウントする。   As described above, according to the present embodiment, in the performance monitor device 6, the event context recording unit 12 has two event pairs that have occurred as a result of execution of the program by the processor 3. The context is recorded, and the occurrence order of a plurality of events is set in the context characteristic register 13 by the user. The context characteristic determination unit 14 compares whether or not the combination of the contexts recorded in the event context recording unit 12 matches the order of occurrence set in the context characteristic register 13, and if they match, time series The specific flag 15 is set. Then, the counter 16 counts the number of times that the time series identification flag 15 is set.

このように構成すれば、上記カウンタ16の値を参照することで、ユーザが前後関係特徴レジスタ13に設定した複数のイベントが、モニタ期間中に設定された発生順序で何回発生したのかを特定できる。そして、イベント前後関係記録部12には、2つのイベントのペアについてそれらが発生した時点の前後関係が記録されるので、それらの組み合わせによって複数のイベントの発生順序を特定できる。したがって、比較的小規模のハードウェアにより、発生したイベントについての時系列情報を抽出できる。   With this configuration, by referring to the value of the counter 16, it is possible to specify how many times a plurality of events set by the user in the context characteristic register 13 have occurred in the order set during the monitoring period. it can. Since the event context recording unit 12 records the context of two event pairs at the time when they occurred, the order of occurrence of a plurality of events can be specified by their combination. Therefore, it is possible to extract time-series information about the event that has occurred with relatively small hardware.

また、イベント前後関係記録部12は、イベントペアの一方が他方より前に発生した場合にフラグがセットされる前発生レジスタ22(En>Em)と、イベントペアの一方が他方より後に発生した場合にフラグがセットされる後発生レジスタ22(En<Em)とを個別に備えるので、これらのレジスタにおけるフラグのセット状態により、各イベントの発生順序を特定できる。   In addition, the event context recording unit 12 includes a pre-occurrence register 22 (En> Em) in which a flag is set when one of the event pairs occurs before the other, and a case where one of the event pairs occurs after the other. Since the post-occurrence register 22 (En <Em) is separately provided, the order of occurrence of each event can be specified by the set state of the flag in these registers.

また、イベント前後関係記録部12は、各イベントが発生した時点でフラグがセットされるイベントレジスタ11における各フラグの状態に応じて、前発生レジスタ22(En>Em)及び後発生レジスタ22(En<Em)にフラグをセットするレジスタ選択部21を備えている。これにより、前発生レジスタ22(En>Em)及び後発生レジスタ22(En<Em)に、各イベントが発生したタイミングの前後関係を適切に記録することができる。   In addition, the event context recording unit 12 has a pre-occurrence register 22 (En> Em) and a post-occurrence register 22 (En depending on the state of each flag in the event register 11 in which a flag is set when each event occurs. A register selection unit 21 that sets a flag in <Em) is provided. As a result, the front-rear relationship of the timing at which each event occurs can be appropriately recorded in the pre-occurrence register 22 (En> Em) and the post-occurrence register 22 (En <Em).

更に、イベント前後関係記録部12は、各イベントペアに対応する前発生レジスタ22(En>Em)及び後発生レジスタ22(En<Em)における何れか一方のレジスタ値を選択して出力する複数のマルチプレクサ23と、前後関係特徴レジスタ13に設定されている発生順序に従う各イベントペアについての前後関係を比較して、各イベントペアに対応するマルチプレクサの入力選択を切替える比較ロジック24と、前後関係設定レジスタ13に設定されているイベントの種類に応じて、マルチプレクサ23の出力を選択するイベントペア選択部25と、イベントペア選択部25を介して選択されたマルチプレクサ23の出力値の論理積を演算して時系列特定フラグ15をセットするANDゲート26とを備えた。したがって、簡単なロジック構成で時系列特定フラグ15をセットすることができる。   Further, the event context recording unit 12 selects and outputs one of the register values in the pre-occurrence register 22 (En> Em) and the post-occurrence register 22 (En <Em) corresponding to each event pair. A comparison logic 24 for switching the input selection of the multiplexer corresponding to each event pair by comparing the multiplexer 23 with the context for each event pair according to the generation order set in the context characteristic register 13, and the context setting register According to the type of event set to 13, the event pair selection unit 25 that selects the output of the multiplexer 23 and the logical product of the output values of the multiplexer 23 selected through the event pair selection unit 25 are calculated. And an AND gate 26 for setting the time series identification flag 15. Therefore, the time series identification flag 15 can be set with a simple logic configuration.

加えて、イベント前後関係記録部12における前後関係の記録状態を、外部に出力可能としたので、ユーザは、プロセッサ3によるプログラムの実行中において、各イベントが発生したタイミングの前後関係をリアルタイムでモニタできる。   In addition, since the recording status of the context in the event context recording unit 12 can be output to the outside, the user can monitor the context of the timing at which each event occurred in real time during the execution of the program by the processor 3. it can.

本発明は上記した、又は図面に記載した実施形態にのみ限定されるものではなく、以下のような変形又は拡張が可能である。
各部のビット数の設定等は一例であり、個別の設計に応じて適宜変更すれば良い。
各ステージ1に搭載されるプロセッサコア3の数は、1つでも、3つ以上であっても良い。また、単一のステージのみで構成されるシステムに適用しても良い。
イベント数は8に限らず、「7」以下又は「9」以上であっても良い。
イベント前後関係記録部12における前後関係の記録状態,及びカウンタ16のカウント値を外部に出力する構成は、必要に応じて設ければ良い。
The present invention is not limited to the embodiments described above or shown in the drawings, and the following modifications or expansions are possible.
The setting of the number of bits in each unit is an example, and may be appropriately changed according to individual design.
The number of processor cores 3 mounted on each stage 1 may be one or three or more. Further, the present invention may be applied to a system configured with only a single stage.
The number of events is not limited to 8, and may be “7” or less or “9” or more.
A configuration for outputting the recording state of the context in the event context recording unit 12 and the count value of the counter 16 to the outside may be provided as necessary.

図面中、6はパフォーマンスモニタ装置、11はイベントレジスタ、12はイベント前後関係記録部、13は前後関係特徴レジスタ、14は前後関係特徴判定部(比較判定部)、15は時系列特定フラグ、16はカウンタ、22はイベント前後関係記録レジスタを示す。   In the drawing, 6 is a performance monitor device, 11 is an event register, 12 is an event context recording unit, 13 is a context feature register, 14 is a context feature determination unit (comparison determination unit), 15 is a time series identification flag, 16 Represents a counter, and 22 represents an event context record register.

Claims (5)

プロセッサによるプログラムの実行に伴って発生した2つのイベントのペア(以下、イベントペアと称す)について、それらが発生した時点の前後関係が記録されるイベント前後関係記録部(12)と、
ユーザが、複数のイベントについて、それらの発生順序を設定する前後関係特徴レジスタ(13)と、
前記イベント前後関係記録部に記録された前後関係の組み合わせが、前記前後関係特徴レジスタに設定されている発生順序に一致するか否かを比較し、一致すると時系列特定フラグ(15)をセットする比較判定部(14)と、
前記時系列特定フラグがセットされた回数をカウントするカウンタ(16)とを備えることを特徴とするパフォーマンスモニタ装置。
An event context recording unit (12) for recording the context of two event pairs (hereinafter referred to as event pairs) that occur as a result of execution of a program by the processor;
A context feature register (13) in which the user sets the order of occurrence of a plurality of events;
It is compared whether or not the combination of the contexts recorded in the event context recording unit matches the order of occurrence set in the context characteristic register, and if they match, the time series identification flag (15) is set. A comparison determination unit (14);
And a counter (16) for counting the number of times the time-series specific flag is set.
前記イベント前後関係記録部は、前記イベントペアの一方が他方より前に発生した場合にフラグがセットされる前発生レジスタ(22(En>Em))と、
前記イベントペアの一方が他方より後に発生した場合にフラグがセットされる後発生レジスタ(22(En<Em))とを個別に備えていることを特徴とする請求項1記載のパフォーマンスモニタ装置。
The event context recording unit includes a pre-occurrence register (22 (En> Em)) in which a flag is set when one of the event pairs occurs before the other,
Performance monitoring apparatus according to claim 1, wherein the one of the event pair is a after generating register (22 (En <Em)) flag is set individually when occurring after the other .
前記イベント前後関係記録部は、前記前発生レジスタ及び前記後発生レジスタより構成されるイベント前後関係記録レジスタ(22)と、
各イベントが発生した時点でフラグがセットされるイベントレジスタ(11)における各フラグの状態に応じて、前記イベント前後関係記録レジスタにフラグをセットするレジスタ選択部(21)とを備えていることを特徴とする請求項2記載のパフォーマンスモニタ装置。
The event context recording unit includes an event context recording register (22) composed of the pre-occurrence register and the post-occurrence register;
A register selection unit (21) that sets a flag in the event context recording register according to the state of each flag in the event register (11) in which a flag is set when each event occurs. 3. The performance monitor device according to claim 2, wherein
前記比較判定部は、前記各イベントペアに対応する前発生レジスタ及び後発生レジスタにおける何れか一方のレジスタ値を選択して出力する複数のマルチプレクサ(23)と、
前記前後関係特徴レジスタに設定されている発生順序に従う前記各イベントペアについての前後関係を比較して、各イベントペアに対応するマルチプレクサの入力選択を切替える比較器(24)と、
前記前後関係特徴レジスタに設定されているイベントの種類に応じて、前記複数のマルチプレクサの出力を選択するイベントペア選択部(25)と、
このイベントペア選択部を介して選択されたマルチプレクサの出力値の論理積を演算することで、前記時系列特定フラグをセットするANDゲート(26)とを備えることを特徴とする請求項3記載のパフォーマンスモニタ装置。
The comparison / determination unit includes a plurality of multiplexers (23) that select and output one of the register values in the pre-occurrence register and the post-occurrence register corresponding to each event pair;
A comparator (24) that compares the context for each event pair according to the order of occurrence set in the context characteristic register and switches the input selection of the multiplexer corresponding to each event pair;
An event pair selection unit (25) for selecting outputs of the plurality of multiplexers in accordance with the type of event set in the context characteristic register;
The AND gate (26) according to claim 3, further comprising: an AND gate (26) for setting the time series identification flag by calculating a logical product of the output values of the multiplexers selected via the event pair selection unit. Performance monitor device.
前記イベント前後関係記録部における前後関係の記録状態を、外部に出力する記録状態出力部を備えることを特徴とする請求項1から4の何れか一項に記載のパフォーマンスモニタ装置。   5. The performance monitoring apparatus according to claim 1, further comprising a recording state output unit that outputs the recording state of the context in the event context recording unit to the outside. 6.
JP2015075119A 2015-04-01 2015-04-01 Performance monitoring device Expired - Fee Related JP6447320B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015075119A JP6447320B2 (en) 2015-04-01 2015-04-01 Performance monitoring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015075119A JP6447320B2 (en) 2015-04-01 2015-04-01 Performance monitoring device

Publications (2)

Publication Number Publication Date
JP2016194855A JP2016194855A (en) 2016-11-17
JP6447320B2 true JP6447320B2 (en) 2019-01-09

Family

ID=57323730

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015075119A Expired - Fee Related JP6447320B2 (en) 2015-04-01 2015-04-01 Performance monitoring device

Country Status (1)

Country Link
JP (1) JP6447320B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58191051A (en) * 1982-04-30 1983-11-08 Nec Corp Instruction sequence measuring device
JPH0335332A (en) * 1989-06-30 1991-02-15 Toshiba Corp Event measuring circuit
JP2001273166A (en) * 2000-03-24 2001-10-05 Matsushita Electric Ind Co Ltd Appearance order detection circuit
JP4066838B2 (en) * 2003-02-19 2008-03-26 富士通株式会社 Shared resource conflict detector and shared resource conflict detection method

Also Published As

Publication number Publication date
JP2016194855A (en) 2016-11-17

Similar Documents

Publication Publication Date Title
JP5299272B2 (en) Analysis program and analyzer
JP2004013896A5 (en)
US7433803B2 (en) Performance monitor with precise start-stop control
JP6070712B2 (en) Information processing apparatus and performance analysis data collection method
CN107423206B (en) Method and device for measuring system management interruption time
US9824169B2 (en) Regression signature for statistical functional coverage
JP2020187412A (en) Information processing device and information processing method
JP6041749B2 (en) Trace collection circuit and trace collection method
JP6447320B2 (en) Performance monitoring device
JP7630512B2 (en) Enhanced performance monitor counters triggered by the debug state machine
US9811617B2 (en) Regression nearest neighbor analysis for statistical functional coverage
JP2009217385A (en) Processor and multiprocessor
CN111192061A (en) Method and device for judging customer participation in promotion activity based on binary bit design
KR20170065845A (en) Processor and controlling method thereof
CN111857866B (en) Loading method and device of multiple dynamic cores and computer readable storage medium
US9182958B2 (en) Software code profiling
KR20100089345A (en) Performance monitoring unit and method of estimating power consumption of a system using the performance monitoring unit
JP6966999B2 (en) Hardware access counters and event generation to coordinate multithreaded processing
JP6394169B2 (en) Simulation device
CN111552958B (en) A method and device for extracting program running characteristics
JP6862951B2 (en) Memory control device, information processing device and memory control method
JP7559676B2 (en) Fault diagnosis system
JP7375903B2 (en) Abnormality detection circuit and abnormality detection method
US7478258B2 (en) Identifying a processor in a multiprocessor system
KR20240164870A (en) Chiplet Cross-Performance Data Streaming

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180629

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180710

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180730

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181119

R151 Written notification of patent or utility model registration

Ref document number: 6447320

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees