JP4998303B2 - Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method - Google Patents

Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method Download PDF

Info

Publication number
JP4998303B2
JP4998303B2 JP2008029926A JP2008029926A JP4998303B2 JP 4998303 B2 JP4998303 B2 JP 4998303B2 JP 2008029926 A JP2008029926 A JP 2008029926A JP 2008029926 A JP2008029926 A JP 2008029926A JP 4998303 B2 JP4998303 B2 JP 4998303B2
Authority
JP
Japan
Prior art keywords
measurement
access
memory
unit
time
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
JP2008029926A
Other languages
Japanese (ja)
Other versions
JP2009193093A (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 JP2008029926A priority Critical patent/JP4998303B2/en
Publication of JP2009193093A publication Critical patent/JP2009193093A/en
Application granted granted Critical
Publication of JP4998303B2 publication Critical patent/JP4998303B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、複数の処理装置がメモリを共有するシステムのメモリアクセス量の測定技術に関する。   The present invention relates to a technique for measuring a memory access amount in a system in which a plurality of processing devices share a memory.

従来、複数の処理装置とメモリを備えるシステムでは、複数の処理装置がバスマスタとなりバスを共有する構成になっている。例えば、マルチコアプロセッサにおいては複数の処理装置としてプロセッサコアが設けられ、プロセッサコアがバスマスタとしてバスを共有する。また、CPUなどを備えたユニットを複数有するシステムにおいては、ユニットを処理装置として各ユニットがバスマスタとしてバスを共有する。   Conventionally, a system including a plurality of processing devices and a memory has a configuration in which a plurality of processing devices serve as a bus master and share a bus. For example, in a multi-core processor, a processor core is provided as a plurality of processing devices, and the processor core shares a bus as a bus master. Further, in a system having a plurality of units each including a CPU or the like, each unit shares a bus as a bus master with each unit as a processing device.

このような構成では、複数のバスマスタが同時にバスアクセスを行うことがあり、バス帯域の上限を超えるようなアクセスが同時に生じると、ハードウェアがバスの調停を行うために一部のバスマスタを待たせる制御を行う、そのため必要な性能を得られない場合がある。そこで、必要な性能を確保するために図11に示すようなバス帯域使用率の測定をし、プログラムのチューニングなどに利用する提案がされている。   In such a configuration, a plurality of bus masters may access the bus at the same time, and if access exceeding the upper limit of the bus bandwidth occurs simultaneously, the hardware causes some bus masters to wait for arbitration of the bus. Therefore, the required performance may not be obtained. Therefore, in order to ensure the required performance, a proposal has been made to measure the bus bandwidth usage rate as shown in FIG. 11 and use it for program tuning or the like.

図11は、マルチコアプロセッサ102のバス帯域使用率の測定をする構成を示した図である。図11のマルチコアプロセッサ102の構成は、処理装置(バスマスタ)としてプロセッサコア104(コア0〜コアN)、DMA109(Direct Memory Access Unit)などが設けられている。   FIG. 11 is a diagram showing a configuration for measuring the bus bandwidth usage rate of the multi-core processor 102. The configuration of the multi-core processor 102 in FIG. 11 includes a processor core 104 (core 0 to core N), a DMA 109 (Direct Memory Access Unit), and the like as processing devices (bus masters).

各プロセッサコア104はメモリ部103とのインタフェースを備えている。また、プロセッサコア104は処理部105(処理00、処理01、処理02・・・)、ローカルメモリ106、タイマ部107、アクセス測定部108、DMA109を備えている。   Each processor core 104 has an interface with the memory unit 103. The processor core 104 includes a processing unit 105 (processing 00, processing 01, processing 02...), A local memory 106, a timer unit 107, an access measurement unit 108, and a DMA 109.

メモリ部103は、各プロセッサコア104、DMA109にバスを介して接続され、例えば、各アクセス測定部108から出力される測定結果も保存する。メモリ部103に保存される測定結果は各プロセッサコア104およびDMA109のアクセス量である。   The memory unit 103 is connected to each processor core 104 and the DMA 109 via a bus, and stores, for example, measurement results output from each access measurement unit 108. The measurement result stored in the memory unit 103 is the access amount of each processor core 104 and DMA 109.

図12は、図11に示したシステム構成(ハードウェア)を用いたバス帯域使用率の測定フローを示す。各プロセッサコア104で実行する処理のアクセス量を測定するためには、処理するプログラム(ソフトウェア)の前後に、フラグをセット、ネゲートを行うコードを挿入する。各プロセッサコア104でプログラムが実行され、フラグをセットするコードが実行されると、図12に示すようにアクセス測定部108のフラグ部110にフラグのセットが通知され、フラグ部110はアクセス量検出カウンタ部111にアクセス量カウント指示を通知する。   FIG. 12 shows a measurement flow of the bus bandwidth usage rate using the system configuration (hardware) shown in FIG. In order to measure the access amount of processing executed by each processor core 104, a code for setting and negating a flag is inserted before and after a program (software) to be processed. When a program is executed in each processor core 104 and a code for setting a flag is executed, the flag unit 110 of the access measuring unit 108 is notified of the flag setting as shown in FIG. 12, and the flag unit 110 detects the access amount. An access amount count instruction is notified to the counter unit 111.

つまり、図12に示す、プロセッサコア104ごとに実行される動作フローのように、ステップS21でフラグをセットし、ステップS22で処理00を実行する。処理を実行した後、ステップS23でフラグをネゲートする。同様の処理をステップS24から実行して各処理のアクセス量を取得する(アクセス量検出カウンタ部111で測定したアクセス量(カウント値)をカウント値用レジスタ部112に保持する)。このように、メモリアクセスが実行されるたびに各プロセッサコア104から通知されるアクセス量をカウントして保持する。   That is, as in the operation flow executed for each processor core 104 shown in FIG. 12, the flag is set in step S21, and the process 00 is executed in step S22. After executing the process, the flag is negated in step S23. Similar processing is executed from step S24 to obtain the access amount of each processing (the access amount (count value) measured by the access amount detection counter unit 111 is held in the count value register unit 112). In this way, each time a memory access is executed, the access amount notified from each processor core 104 is counted and held.

上記構成にすることにより各コアでは、アクセス量の累計を取得することができ、アクセス量の総和を取得することができる。この値がバス帯域の上限近くまで上がっていれば、メモリアクセス待ちで各バスマスタの処理時間が延びている可能性があることを利用者は知ることができる。そして、必要な性能を未達成の場合には、ソフトウェアを修正してメモリアクセスを削減し、必要な性能を満たすようにチューニングを行う。   With the above configuration, each core can acquire the total access amount and can acquire the total access amount. If this value rises to near the upper limit of the bus bandwidth, the user can know that the processing time of each bus master may be extended while waiting for memory access. If the required performance is not achieved, the software is modified to reduce memory access, and tuning is performed to satisfy the required performance.

また、マルチコアプロセッサなどを用いるためにはC言語のような高級言語を用いた(オブジェクト指向の)ソフトウェア開発が必須になっている。
図13に高級言語を用いたマルチプロセッサ向けプログラムと各バスマスタへの処理の割当を示す。関数やタスクの単位でバスマスタに処理を割り当てる。
In order to use a multi-core processor or the like, software development (object-oriented) using a high-level language such as C language is indispensable.
FIG. 13 shows a multiprocessor program using a high-level language and the allocation of processing to each bus master. Allocate processing to the bus master in units of functions and tasks.

例えば、図13では高級言語で記述されたプログラムを構成する関数00、関数01、関数02、関数10、関数11、関数20、関数21が、各バスマスタに割り振られる。バスマスタを示すコア0には関数00〜02、コア1には関数10、11、コア2には関数20、21が割り付けられている。   For example, in FIG. 13, a function 00, a function 01, a function 02, a function 10, a function 11, a function 20, and a function 21 constituting a program written in a high-level language are allocated to each bus master. Functions 00 to 02 are assigned to the core 0 indicating the bus master, functions 10 and 11 are assigned to the core 1, and functions 20 and 21 are assigned to the core 2.

このような割付をする場合、マルチコアプロセッサ上でのプログラム開発時にバス帯域高使用率による性能劣化改善のために関数単位での1)マスタへの割当変更、2)実行順番変更、3)変数単位でメモリ配置変更というプログラム上でのチューニングを行う必要がある。そこで、特許文献1〜4に示すような提案がされている。   When performing such allocation, 1) change assignment to master, 2) change execution order, 3) variable unit, in order to improve performance degradation due to high bus bandwidth utilization during program development on multi-core processors Therefore, it is necessary to tune the program to change the memory allocation. Therefore, proposals as shown in Patent Documents 1 to 4 have been made.

しかしながら、従来技術で取得できる性能情報は各処理ごとのバスアクセス量の累計のみであり、上記1)〜3)を行うことができないという問題がある。1)〜3)を行うためには、全バスマスタ共通の時刻情報とバスマスタごとのバス帯域使用量を関連付けることが必要であり、具体的には、イ)関数単位の帯域使用情報、ロ)全バスマスタ共通の時間情報に基づいた関数単位の開始時刻と終了時刻、ハ)各変数アクセスに対するバス帯域使用率を測定する必要がある。
特開平11−272499号公報 特開平06−231087号公報 特開2000−348007号公報 特開2006−146921号公報
However, the performance information that can be acquired by the prior art is only the cumulative amount of bus access for each process, and there is a problem that the above 1) to 3) cannot be performed. In order to perform 1) to 3), it is necessary to associate time information common to all bus masters and bus bandwidth usage for each bus master. Specifically, a) bandwidth usage information in units of functions, b) all The function unit start time and end time based on time information common to the bus master, and c) the bus bandwidth usage rate for each variable access needs to be measured.
JP 11-272499 A Japanese Patent Application Laid-Open No. 06-231087 JP 2000-348007 A JP 2006-146922 A

本発明は上記のような実情に鑑みてなされたものであり、各処理のアクセス量とともにアクセス時間の情報を取得することにより、メモリアクセスが集中しても性能劣化を回避可能とするために、メモリアクセス量を測定するメモリアクセス量測定装置、メモリアクセス量測定装置、メモリアクセス量測定方法を提供することを目的とする。   The present invention has been made in view of the above situation, and by acquiring access time information together with the access amount of each process, in order to avoid performance degradation even if memory access is concentrated, An object of the present invention is to provide a memory access amount measuring device, a memory access amount measuring device, and a memory access amount measuring method for measuring a memory access amount.

本発明の態様のひとつである複数の処理装置がメモリを共有するメモリ共有データ処理システムであって、前記処理装置は、タイマから通知される時刻を用いて前記処理装置で実行される処理ごとの前記メモリへのアクセス開始時刻と終了時刻を測定する時間測定部と、前記処理の開始から終了までの間、前記処理のメモリへのアクセス量を測定するアクセス測定部と、を具備する構成である。   A memory shared data processing system in which a plurality of processing devices according to one aspect of the present invention share a memory, wherein the processing device uses a time notified from a timer for each process executed by the processing device. A time measurement unit that measures an access start time and an end time of the memory; and an access measurement unit that measures an access amount to the memory of the process from the start to the end of the process. .

上記構成により、利用者は各処理のアクセス量とともにアクセス時間の情報を取得することができ、この結果に基づいてメモリアクセスが集中しても性能劣化を回避する対策を立てることができる。   With the above configuration, the user can acquire access time information together with the access amount of each process, and based on this result, it is possible to take measures to avoid performance degradation even when memory accesses are concentrated.

好ましくは、前記処理装置は、前記メモリへのアクセスの測定対象領域として測定領域開始アドレスと測定領域終了アドレスを測定アドレス情報として保持し、前記処理の前記メモリへのアクセスごとにアクセス先アドレスが前記測定領域開始アドレスと前記測定領域終了アドレスの間の範囲であれば前記アクセス量の測定を前記アクセス測定部に指示するアドレス比較部をさらに備えてもよい。   Preferably, the processing device holds a measurement area start address and a measurement area end address as measurement address information as measurement target areas for access to the memory, and an access destination address is stored for each access to the memory in the process. An address comparison unit that instructs the access measurement unit to measure the access amount within a range between the measurement region start address and the measurement region end address may be further provided.

好ましくは、前記時間測定部は、前記開始時刻と前記終了時刻と、前記アクセス測定部によって測定された前記アクセス量を保持してもよい。   Preferably, the time measurement unit may hold the start time, the end time, and the access amount measured by the access measurement unit.

本発明によれば、各処理のアクセス量とともにアクセス時間の情報を取得することにより、メモリアクセスが集中しても性能劣化を回避するための対策を立てることが可能である。   According to the present invention, by acquiring the access time information together with the access amount of each process, it is possible to take measures for avoiding performance degradation even when memory accesses are concentrated.

(原理説明)
本発明は、複数の処理装置とメモリを備えるシステムにおいて、複数の処理装置がバスマスタとなるようなシステムに用いることができる。例えば、複数の処理装置としてプロセッサコアなどが設けられ、処理装置などがバスマスタとしてバスを共有するマルチコアプロセッサ。また、CPUなどを備えたユニットを処理装置とし、各ユニットをバスマスタとしてバスを共有するユニットを複数有するシステム。
(Principle explanation)
The present invention can be used in a system including a plurality of processing devices and a memory in which the plurality of processing devices serve as a bus master. For example, a multi-core processor in which processor cores are provided as a plurality of processing devices, and the processing devices share a bus as a bus master. A system having a plurality of units sharing a bus with a unit including a CPU as a processing device and each unit as a bus master.

上記処理装置は時間測定部、アクセス測定部を備え、時間測定部は、タイマから通知される時刻を用いて処理装置で実行される処理ごとのメモリへのアクセス開始時刻と終了時刻を測定し、アクセス測定部は、各処理の開始から終了までの間各処理のメモリへのアクセス量を測定する。   The processing device includes a time measurement unit and an access measurement unit, and the time measurement unit measures the access start time and end time to the memory for each process executed by the processing device using the time notified from the timer, The access measurement unit measures the access amount to the memory of each process from the start to the end of each process.

上記測定により処理情報をアプリケーションソフトの関数、タスク、変数に対応させることが可能な形式で取得することができる。具体的には、関数単位の帯域使用情報、全バスマスタ共通の時間情報に基づいた関数単位の開始時刻と終了時刻、各変数アクセスに対するバス帯域使用率を取得する。   Through the above measurement, processing information can be acquired in a format that can correspond to functions, tasks, and variables of application software. Specifically, the function unit bandwidth use information, the function unit start time and end time based on time information common to all bus masters, and the bus bandwidth usage rate for each variable access are acquired.

例えばC言語などの高級言語を用いてアプリケーションソフトを開発するときに、利用者はその取得結果を用いバスマスタへの関数割当変更、関数の実行順序の変更、変数単位でのメモリ配置変更をプログラム上で検討することが可能になり、バスアクセス集中による性能劣化を回避できる。   For example, when developing application software using a high-level language such as C language, the user uses the obtained result to change the function assignment to the bus master, change the function execution order, and change the memory allocation for each variable. This makes it possible to examine performance and avoid performance degradation due to bus access concentration.

以下図面に基づいて、本発明の実施形態について詳細を説明する。
(実施例1)
(構成)
図1に示すシステム1は、複数のプロセッサコア4(コア0〜コアN)やDMA9(Direct Memory Access Unit)などがバスを共有するマルチコアプロセッサ2とメモリ部3(SDRAMなど)から構成された例である。また、マルチコアプロセッサ2はプロセッサコア4、DMA9、タイマ部10を備えている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
Example 1
(Constitution)
The system 1 shown in FIG. 1 is an example in which a plurality of processor cores 4 (cores 0 to N), a DMA 9 (Direct Memory Access Unit), etc. share a bus and a memory unit 3 (SDRAM or the like). It is. The multi-core processor 2 includes a processor core 4, a DMA 9, and a timer unit 10.

各プロセッサコア4(処理装置)は、処理部5、ローカルメモリ6、時間測定部7、アクセス測定部8を備えている。
処理部5は、プロセッサコア4(コア0)において処理00、01、02〜(関数やタ
スクの単位)が割り当られている。例えば、高級言語で記述されたプログラムを構成する関数が、各バスマスタであるプロセッサコア4(コア0)に割り当てられる。同様にプロセッサコア4(コア1)〜(コアN)で実行する処理が割り当てられ、割り付けられた処理を各処理部5は実行する。
Each processor core 4 (processing device) includes a processing unit 5, a local memory 6, a time measurement unit 7, and an access measurement unit 8.
The processing unit 5 is assigned processing 00, 01, 02 to (unit of function or task) in the processor core 4 (core 0). For example, functions constituting a program written in a high-level language are allocated to the processor core 4 (core 0) that is each bus master. Similarly, processing to be executed by the processor cores 4 (core 1) to (core N) is assigned, and each processing unit 5 executes the assigned processing.

ローカルメモリ6にはプログラムやデータ、処理結果(図1、取得情報)などを保持することができる。
時間測定部7は、タイマ部10から通知される時刻を用い、プロセッサコア4とDMA9を実行したときの各処理のメモリ(メモリ部3)へのアクセス開始時刻とアクセス終了時刻を測定する。
The local memory 6 can hold programs, data, processing results (FIG. 1, acquired information), and the like.
The time measuring unit 7 uses the time notified from the timer unit 10 to measure the access start time and access end time to the memory (memory unit 3) of each process when the processor core 4 and the DMA 9 are executed.

アクセス測定部8は、処理の開始から終了までの間、各処理のメモリ(メモリ部3)へのアクセス量を測定する。なお、このアクセス量はメモリ部3へのアクセスのたびに、例えば、各コアの処理部5からの制御情報としてアクセス測定部8に与えられるものとする。   The access measurement unit 8 measures the access amount to the memory (memory unit 3) of each process from the start to the end of the process. It is assumed that this access amount is given to the access measurement unit 8 as control information from the processing unit 5 of each core, for example, every time the memory unit 3 is accessed.

タイマ部10は、測定時に時刻をプロセッサコア4とDMA9の時間測定部7にブロードキャストに通知をする。タイマ部10はOSのシステムカウンタなどを用いてもよい。
メモリ部3には、データや各プロセッサコア4の処理とDMA9の処理に関して測定したアクセス開始時刻、アクセス終了時刻、アクセス量を保持することができる(図1、取得情報)。これらの測定結果はローカルメモリ6などに保持してもよい。
The timer unit 10 broadcasts the time to the processor core 4 and the time measuring unit 7 of the DMA 9 at the time of measurement. The timer unit 10 may use an OS system counter or the like.
The memory unit 3 can hold data, the access start time, the access end time, and the access amount that are measured for the processing of each processor core 4 and the processing of the DMA 9 (FIG. 1, acquired information). These measurement results may be held in the local memory 6 or the like.

図2に時間測定部7とアクセス測定部8の構成を示す。
時間測定部7は、複数フラグ部11、時間取得部12、カウント値出力部13を備えている。
FIG. 2 shows configurations of the time measuring unit 7 and the access measuring unit 8.
The time measurement unit 7 includes a plurality of flag units 11, a time acquisition unit 12, and a count value output unit 13.

複数フラグ部11は複数のフラグを有する。図2に示すように例えばコア0に対するフラグ数はフラグ00〜0n(nは1以上の自然数)まで用意されている。例えば、特殊レジスタなどにより構成し、フラグは特殊レジスタを書き換えることによりセットされる。また、任意のフラグセット時にフラグがセットされたことを時間取得部12、カウント値出力部13、アクセス測定部8に通知し、フラグネゲート時にフラグがネゲートされたことを時間取得部12、カウント値出力部13、アクセス測定部8に通知する。   The multiple flag unit 11 has multiple flags. As shown in FIG. 2, for example, flags 00 to 0n (n is a natural number of 1 or more) are prepared for the core 0. For example, a special register is used, and the flag is set by rewriting the special register. In addition, the time acquisition unit 12, the count value output unit 13, and the access measurement unit 8 are notified that the flag has been set when an arbitrary flag is set, and the time acquisition unit 12 and the count value that the flag has been negated when the flag is negated The output unit 13 and the access measurement unit 8 are notified.

時間取得部12は、フラグがセットされたとき(任意のフラグセット時)にタイマ部10より通知された時刻を測定開始時刻として取得する。また、フラグネゲート時にタイマ部10より通知された時刻を測定終了時刻として取得する。取得した測定開始時刻、測定終了時刻をフラグに対応するメモリ領域に出力する。   The time acquisition unit 12 acquires the time notified from the timer unit 10 when the flag is set (when any flag is set) as the measurement start time. The time notified from the timer unit 10 at the time of flag negation is acquired as the measurement end time. The acquired measurement start time and measurement end time are output to the memory area corresponding to the flag.

カウント値出力部13は、フラグネゲート時にカウント値用レジスタ部14よりデータを読み出して対応する領域にカウント値を書き込む。そのカウント値をアクセス量としてセットしていたフラグに対応するメモリ領域に保持する。   The count value output unit 13 reads data from the count value register unit 14 at the time of flag negation, and writes the count value in the corresponding area. The count value is held in the memory area corresponding to the flag set as the access amount.

ここで、メモリ領域は、メモリ部3、ローカルメモリ6、専用メモリなどに割り当てられたメモリである。専用メモリを用いる場合は、フラグ数であるn個の測定開始時刻、測定終了時刻、アクセス量を保持できる領域を確保し、また、メモリ部3、ローカルメモリ6を用いる場合はフラグ数であるn個の測定開始時刻、終了時刻、アクセス量を保持できる領域を確保する。   Here, the memory area is a memory allocated to the memory unit 3, the local memory 6, a dedicated memory, and the like. In the case of using a dedicated memory, n measurement start times, measurement end times, and areas capable of holding the access amount are secured, and when the memory unit 3 and the local memory 6 are used, the number of flags is n. An area that can hold the measurement start time, end time, and access amount is secured.

アクセス測定部8は、カウント値用レジスタ部14、アクセス量検出カウンタ部15から構成されている。
アクセス量検出カウンタ部15は、時間測定部7のフラグがセットされたときに、アクセス量検出カウンタ部15のカウンタを0にセットし、ネゲートされるまでの期間メモリへのアクセスがあるたびにカウンタをカウントアップする。カウント値はカウント値用レジスタ部14に通知する。
The access measurement unit 8 includes a count value register unit 14 and an access amount detection counter unit 15.
The access amount detection counter unit 15 sets the counter of the access amount detection counter unit 15 to 0 when the flag of the time measurement unit 7 is set, and counts up every time there is access to the memory until it is negated. Count up. The count value is notified to the count value register unit 14.

図3にプロセッサコア4のプログラムに対応した処理シーケンスを示す。また、図4に各処理ごとの詳細について示す。
図3では、処理00についてステップS1〜S3を実行することにより測定開始時刻、測定終了時刻、アクセス量をメモリに保存する。
FIG. 3 shows a processing sequence corresponding to the program of the processor core 4. FIG. 4 shows details of each process.
In FIG. 3, the measurement start time, the measurement end time, and the access amount are stored in the memory by executing steps S1 to S3 for the process 00.

ステップS1では、処理00用の時間情報を取得する(測定開始時刻)。メモリアクセスごとにアクセス量の測定を開始する。
ステップS2では処理00が実行される。
In step S1, time information for process 00 is acquired (measurement start time). Start measuring access amount for each memory access.
In step S2, process 00 is executed.

ステップS3では、処理00用の時間情報を取得する(測定終了時刻)。メモリアクセスごとのアクセス量の測定を終了する。
同様にステップS4〜S6を実行し処理01に関する測定開始時刻、測定終了時刻、アクセス量をメモリに保存し、ステップS7〜S9を実施して処理02の測定開始時刻、測定終了時刻、アクセス量をメモリに保存する。
In step S3, time information for process 00 is acquired (measurement end time). The access amount measurement for each memory access is terminated.
Similarly, steps S4 to S6 are executed to store the measurement start time, measurement end time, and access amount related to process 01 in the memory, and steps S7 to S9 are executed to determine the measurement start time, measurement end time, and access amount of process 02. Save to memory.

また、他のプロセッサコア4(コア1〜N)についても同じように処理を行う。
次に図4について説明する。
処理00にはアクセス量を取得するために、アクセス量を測定したいプログラムの範囲の初めにフラグをセットする記述を挿入し、測定したい範囲の終わりにフラグをネゲートする記述を挿入する。上記のようなフラグセットとフラグネゲートを行うコードを、アクセス量を測定する必要がある処理およびDMAを実行させるプログラムに記述する。
The same processing is performed on the other processor cores 4 (cores 1 to N).
Next, FIG. 4 will be described.
In process 00, in order to obtain the access amount, a description for setting a flag is inserted at the beginning of the range of the program whose access amount is to be measured, and a description for negating the flag is inserted at the end of the range to be measured. The code for performing the flag set and the flag negation as described above is described in a program that executes a process that needs to measure an access amount and a DMA.

ステップS41では例えば処理i(例えば0i)に対応したフラグi(0i)がセットされる。
ステップS42では、フラグがセットされると時間取得部12にてタイマ部10の時刻情報を開始時間としてフラグiに対応するメモリ領域に格納する。iは処理を識別するための番号である。
In step S41, for example, a flag i (0i) corresponding to process i (for example, 0i) is set.
In step S42, when the flag is set, the time acquisition unit 12 stores the time information of the timer unit 10 as the start time in the memory area corresponding to the flag i. i is a number for identifying a process.

例えば、処理00を実行するプロセッサコア4(コア0)がプログラムを実行し、処理00用のフラグをセットするコードが実行されると、時間測定部7の複数フラグ部11の処理00に対応するフラグ00がセットされる。フラグがセットされるとタイマ部10より通知される時刻情報を処理00の測定開始時刻として時間取得部12が取得する。また、フラグがセットされたことをカウント値出力部13とアクセス測定部8のアクセス量検出カウンタ部15に通知する。ここで、測定開始時刻をメモリ領域に格納してもよいが、時間取得部12に保持しネゲート後にまとめてメモリ領域に格納してもよい。   For example, when the processor core 4 (core 0) that executes the process 00 executes the program and the code for setting the flag for the process 00 is executed, it corresponds to the process 00 of the multiple flag unit 11 of the time measuring unit 7. Flag 00 is set. When the flag is set, the time acquisition unit 12 acquires the time information notified from the timer unit 10 as the measurement start time of the process 00. Further, it notifies the count value output unit 13 and the access amount detection counter unit 15 of the access measurement unit 8 that the flag has been set. Here, the measurement start time may be stored in the memory area, but may be stored in the time acquisition unit 12 and stored in the memory area after negation.

ステップS43では処理が実行され、アクセス量検出カウンタ部15でメモリアクセスごとにアクセス量をカウントアップしカウント値用レジスタ部14に格納する。
例えば処理00の場合、アクセス測定部8では、フラグセットの通知を受けてアクセス量検出カウンタ部15のアクセス量を測定するカウンタのカウンタ値を0にセットする。その後、処理00実行時メモリへのアクセスがあるたびにアクセス量を検出してカウンタ値をインクリメントしてアクセス量を測定する。
In step S43, processing is executed, and the access amount detection counter unit 15 counts up the access amount for each memory access and stores it in the count value register unit 14.
For example, in the case of processing 00, the access measurement unit 8 receives the flag set notification and sets the counter value of the counter that measures the access amount of the access amount detection counter unit 15 to zero. Thereafter, each time the process 00 is executed, the access amount is detected and the counter value is incremented to measure the access amount.

ステップS44では処理iに対応したフラグiがネゲートされる。
ステップS45では、時間取得部にてタイマ部の時刻情報を終了時間としてフラグiに対応するメモリ領域に格納する。
In step S44, the flag i corresponding to the process i is negated.
In step S45, the time acquisition unit stores the time information of the timer unit as an end time in the memory area corresponding to the flag i.

例えば、処理00を実行するプロセッサコア4(コア0)がプログラムを実行し、処理00用のフラグをネゲートするコードが実行されると、時間測定部7の複数フラグ部11の処理00に対応するフラグ00がネゲートされ、タイマ部10より通知される時刻を測定終了時刻として時間取得部12が取得する。また、フラグがネゲートされたことをカウント値出力部13とアクセス測定部8のアクセス量検出カウンタ部15に通知する。その後、測定終了時刻をメモリ領域に格納する。   For example, when the processor core 4 (core 0) that executes the process 00 executes the program and the code that negates the flag for the process 00 is executed, it corresponds to the process 00 of the multiple flag unit 11 of the time measuring unit 7. The time acquisition unit 12 acquires the time when the flag 00 is negated and the time notified from the timer unit 10 is the measurement end time. Further, it notifies the count value output unit 13 and the access amount detection counter unit 15 of the access measurement unit 8 that the flag has been negated. Thereafter, the measurement end time is stored in the memory area.

ステップS46では、カウント値出力部13にてカウント値用レジスタ部14のカウント値を読み出しフラグiに対応するメモリ領域に格納する。
例えば処理00の場合、処理00用のフラグ00がネゲートされるとアクセス測定部8のアクセス量検出カウンタ部15はアクセス量の測定を停止し、カウント値用レジスタ部14に格納されている値はカウント値出力部13に出力される。取得した測定開始時刻、測定終了時刻、アクセス量はまとめてメモリ部3、ローカルメモリ6、専用メモリのいずれかに保持される。
In step S46, the count value output unit 13 stores the count value of the count value register unit 14 in the memory area corresponding to the read flag i.
For example, in the case of process 00, when the flag 00 for process 00 is negated, the access amount detection counter unit 15 of the access measurement unit 8 stops measuring the access amount, and the value stored in the count value register unit 14 is It is output to the count value output unit 13. The acquired measurement start time, measurement end time, and access amount are collectively held in any of the memory unit 3, the local memory 6, and the dedicated memory.

図5に測定開始時刻、測定終了時刻、アクセス量を利用した表示とその利用方法について説明する。
図5は縦軸にアクセス量、横軸に測定時刻を示したグラフである。測定した情報に基づいて図5のようなグラフを表示することにより、どの時刻に各プロセッサコア4のどの処理が重なってバス帯域を上限近くまで使用しているかを視覚的に把握することができる。
FIG. 5 illustrates a display using the measurement start time, the measurement end time, and the access amount, and a method for using the display.
FIG. 5 is a graph showing the access amount on the vertical axis and the measurement time on the horizontal axis. By displaying the graph as shown in FIG. 5 based on the measured information, it is possible to visually grasp at which time each process of the processor cores 4 overlaps to use the bus bandwidth to the upper limit. .

図5に示す表は、デバッガなどを用いてメモリに保存した測定開始時刻、測定終了時刻、アクセス量のデータを、メモリから読み出してPCなどの表示部に表示する。
また、処理ごとに表示されているアクセス量は、例えば、測定開始時間と測定終了時間の間にカウンタされたカウント値を時間的に平均してその区間表示している。より詳細なアクセス量を取得するためには、処理ごとに複数のフラグを設けて測定開始時間と測定終了時間を測定してもよい。
In the table shown in FIG. 5, measurement start time, measurement end time, and access amount data stored in a memory using a debugger or the like are read from the memory and displayed on a display unit such as a PC.
Further, the access amount displayed for each process is, for example, displayed as a section by averaging the count values counted between the measurement start time and the measurement end time. In order to acquire a more detailed access amount, a plurality of flags may be provided for each process to measure the measurement start time and the measurement end time.

T0〜T1の区間ではDMAなどと同時に、プロセッサコア4(コア0)の処理00(例えば、関数やタスクの単位)とプロセッサコア4(コア1)の処理10がメモリアクセスをしている。   In the period from T0 to T1, simultaneously with DMA, the processing 00 (for example, a unit of function or task) of the processor core 4 (core 0) and the processing 10 of the processor core 4 (core 1) are accessing the memory.

T1〜T2の区間ではDMAなどと同時に、プロセッサコア4(コア0)の処理00と
プロセッサコア4(コア1)の処理11がメモリアクセスをしている。
T2〜T3の区間ではDMAなどと同時に、プロセッサコア4(コア0)の処理01とプロセッサコア4(コア1)の処理11がメモリアクセスをしている。この区間ではバス帯域の限界に近づいている。
In the period from T1 to T2, simultaneously with DMA, the processing 00 of the processor core 4 (core 0) and the processing 11 of the processor core 4 (core 1) are accessing the memory.
In the period from T2 to T3, simultaneously with DMA, the processing 01 of the processor core 4 (core 0) and the processing 11 of the processor core 4 (core 1) are accessing the memory. In this section, the bus bandwidth is approaching its limit.

T3〜T4の区間ではDMAなどと同時に、プロセッサコア4(コア0)の処理01とプロセッサコア4(コア1)の処理12がメモリアクセスをしている。
T4〜T5の区間ではDMAなどと同時に、プロセッサコア4(コア0)の処理02とプロセッサコア4(コア1)の処理12がメモリアクセスをしている。
In the period from T3 to T4, simultaneously with DMA, the process 01 of the processor core 4 (core 0) and the process 12 of the processor core 4 (core 1) are accessing the memory.
In the period from T4 to T5, simultaneously with DMA, the process 02 of the processor core 4 (core 0) and the process 12 of the processor core 4 (core 1) are accessing the memory.

T5〜T6の区間ではDMAなどと同時に、プロセッサコア4(コア0)の処理02がメモリアクセスをしている。
上記のグラフからバス帯域を上限近くまで使用している区間T2〜T3は、バスアクセスの調停により性能劣化が起きている可能性が高い。この性能劣化を回避するために各プロセッサコア4への処理(関数やタスク)割当の変更、プロセッサコア4における実行順序の変更を行って、使用するバス帯域を小さくすることができる。
図5の例では、処理12を処理11と入れ替えて処理01の完了後に実行するようにしてバス帯域を越えないようにソフトチューニングを利用者が検討することができる。
In the period from T5 to T6, the processing 02 of the processor core 4 (core 0) is performing memory access simultaneously with DMA or the like.
From the above graph, it is highly possible that the performance degradation is caused by arbitration of bus access in the sections T2 to T3 where the bus bandwidth is used up to the upper limit. In order to avoid this performance degradation, it is possible to reduce the bus bandwidth to be used by changing the processing (function or task) assignment to each processor core 4 and changing the execution order in the processor core 4.
In the example of FIG. 5, the user can consider soft tuning so as not to exceed the bus bandwidth by replacing the process 12 with the process 11 and executing the process after the process 01 is completed.

(実施例2)
実施例2は、実施例1にさらにアドレス比較部を設け、指定したメモリ領域(変数など)に対するアクセス量、測定開始時刻、測定終了時刻を測定する。
(構成)
指定した領域に対するアクセス量、測定開始時間、測定終了時間を測定するためのシステム構成を図6に示す。実施例1と実施例2との差分は、アドレス比較部16を追加したことである。
(Example 2)
In the second embodiment, an address comparison unit is further provided in the first embodiment, and an access amount, a measurement start time, and a measurement end time with respect to a specified memory area (such as a variable) are measured.
(Constitution)
FIG. 6 shows a system configuration for measuring the access amount, the measurement start time, and the measurement end time for the specified area. The difference between the first embodiment and the second embodiment is that an address comparison unit 16 is added.

アドレス比較部16は、アクセス量を測定したいメモリ領域の開始アドレスと終了アドレスを保持しており、メモリ領域に対するアクセス発生時にアドレス、アクセス量を検出し、アドレスが保持している開始アドレス以上、終了アドレス未満であれば、アクセス量をアクセス測定部8に通知する。   The address comparison unit 16 holds a start address and an end address of a memory area whose access amount is to be measured, detects an address and an access amount when an access to the memory area occurs, and finishes when the address is more than the start address held. If it is less than the address, the access measuring unit 8 is notified of the access amount.

アクセス測定部8では、時間測定部7から通知されているフラグ情報がセットのときに、アドレス比較部16より通知されるアドレス量をカウントする。
図7に、プロセッサコア4ごとに設けられる時間測定部7、アクセス測定部8、アドレス比較部16の構成を示す。
The access measuring unit 8 counts the address amount notified from the address comparing unit 16 when the flag information notified from the time measuring unit 7 is set.
FIG. 7 shows the configuration of the time measurement unit 7, the access measurement unit 8, and the address comparison unit 16 provided for each processor core 4.

アドレス比較部16は、アドレス比較器17、測定領域レジスタ18から構成される。
アドレス比較器17は、いずれかのフラグがセットされたときに、メモリアクセス先アドレスと測定領域レジスタ値の比較を行い、範囲内であればアクセス量をアクセス量検出カウンタ部15に通知する。
The address comparison unit 16 includes an address comparator 17 and a measurement area register 18.
When any of the flags is set, the address comparator 17 compares the memory access destination address with the measurement area register value, and notifies the access amount detection counter unit 15 of the access amount within the range.

図7に示すアクセス量検出カウンタ部15は、実施例1に示した機能にさらにアドレス比較器17からの通知があるときのみカウントをする。通知があるとき以外は測定領域レジスタ18に設定されたメモリ領域でないため測定を行わない。   The access amount detection counter unit 15 shown in FIG. 7 counts only when there is a notification from the address comparator 17 in addition to the function shown in the first embodiment. Unless there is a notification, no measurement is performed because the memory area is not set in the measurement area register 18.

測定領域レジスタ18は、プロセッサコア4ごとに実行する処理の測定したいメモリ領域の始点となるアドレスと終点となるアドレスを保持している。
図8にプログラムに対応した処理シーケンスを示す。
The measurement area register 18 holds an address serving as a start point and an end point of a memory area to be measured for processing executed for each processor core 4.
FIG. 8 shows a processing sequence corresponding to the program.

処理00についてステップS71〜S73を実行することにより測定するメモリ領域のアドレスの始点と終点を設定するとともに、測定開始時刻、測定終了時刻、指定したメモリ領域へのアクセス量をメモリに保存する。   By executing steps S71 to S73 for process 00, the start point and end point of the address of the memory area to be measured are set, and the measurement start time, the measurement end time, and the access amount to the specified memory area are stored in the memory.

ステップS71では、処理00用の時間情報を取得する(測定開始時刻)。指定したメモリ領域へのアクセスごとにアクセス量の測定を開始する。
ステップS72では処理00が実行される。
In step S71, time information for process 00 is acquired (measurement start time). The access amount measurement is started every time the specified memory area is accessed.
In step S72, process 00 is executed.

ステップS73では、処理00用の時間情報を取得する(測定終了時刻)。指定したメモリ領域へのアクセスごとのアクセス量の測定を終了する。
同様にステップS74〜S76を実行し処理01に関する測定開始時刻、測定終了時刻、アクセス量をメモリに保存し、ステップS77〜S79を実施して処理02の測定開始時刻、測定終了時刻、アクセス量をメモリに保存する。
In step S73, time information for process 00 is acquired (measurement end time). Ends the access amount measurement for each access to the specified memory area.
Similarly, steps S74 to S76 are executed to store the measurement start time, measurement end time, and access amount related to process 01 in the memory, and steps S77 to S79 are executed to determine the measurement start time, measurement end time, and access amount of process 02. Save to memory.

また、他のプロセッサコア4(コア1〜N)についても同じように処理を行う。
次に図9について説明する。
処理00には指定したメモリ領域のアクセス量を取得するために、フラグをセットする記述の前にアドレス量を測定したいメモリ領域の開始アドレス(始点)と終了アドレス(終点)をアドレス比較部16にセットする記述を挿入する。また、アクセス量を測定したいプログラムの範囲の初めにフラグをセットする記述を挿入し、測定したい範囲の終わりにフラグをネゲートする記述を挿入する。上記のような設定とフラグセットとフラグネゲートを行うコードを、アクセス量を測定する必要がある処理およびDMAを実行させるプログラムに記述する。
The same processing is performed on the other processor cores 4 (cores 1 to N).
Next, FIG. 9 will be described.
In process 00, in order to obtain the access amount of the specified memory area, the address comparison unit 16 is supplied with the start address (start point) and end address (end point) of the memory area whose address amount is to be measured before the description of setting the flag. Insert description to set. Also, a description for setting a flag is inserted at the beginning of the range of the program whose access amount is to be measured, and a description for negating the flag is inserted at the end of the range to be measured. The code for setting, flag set, and flag negation as described above is described in a process that needs to measure the access amount and a program that executes DMA.

ステップS91では測定アドレスを設定する。
ステップS92では、各プロセッサコア4がプログラムを実行し、アドレス量を測定したいメモリ領域の開始アドレスと終了アドレスを、アドレス比較部16にセットする記述が実行されると、アドレス比較器17に開始アドレスと終了アドレスが測定領域レジスタ18にセットされる。
In step S91, a measurement address is set.
In step S92, when each processor core 4 executes a program and a description for setting the start address and end address of the memory area whose address amount is to be measured is set in the address comparison unit 16, the start address is stored in the address comparator 17. And the end address are set in the measurement area register 18.

ステップS93では処理i(例えば0i)に対応したフラグi(0i)がセットされる。
ステップS94では、任意のフラグをセットするコードを実行すると、時間測定部7では対応するフラグがセットされ、前述のように、タイマ部10より通知される時刻情報を測定開始時刻として取得し、フラグiがセットされたことをアクセス測定部8に通知する。ここで、iは処理を識別するための番号である。
In step S93, the flag i (0i) corresponding to the process i (for example, 0i) is set.
In step S94, when a code for setting an arbitrary flag is executed, a corresponding flag is set in the time measurement unit 7, and as described above, the time information notified from the timer unit 10 is acquired as the measurement start time. The access measurement unit 8 is notified that i has been set. Here, i is a number for identifying a process.

ステップS95では、フラグセット中はアドレス比較部16によりメモリアクセス時に
アクセス先アドレスと測定領域レジスタ18に保持された始点と終点のアドレスの比較を行う。アクセス先アドレスが始点以上終点未満であれば、アクセス量をアクセス量検出カウンタ部15に通知する。
In step S95, the address comparison unit 16 compares the access destination address with the start point and end point addresses held in the measurement area register 18 during memory access during flag setting. If the access destination address is not less than the start point and less than the end point, the access amount is notified to the access amount detection counter unit 15.

ステップS96では処理が実行され、アクセス量検出カウンタ部15では、フラグセットの通知を受けてアクセス量をカウントするカウンタを0にセットする。また、メモリへのアクセスがあるたびにアドレス比較器17よりアクセス量検出カウンタ部15にメモリアクセスのあったことを通知する。アクセス量検出カウンタ部15ではメモリアクセスごとにアクセス量をカウントアップしカウント値用レジスタ部14に格納する。   In step S96, the process is executed, and the access amount detection counter unit 15 receives a flag set notification and sets a counter for counting the access amount to zero. Further, every time the memory is accessed, the address comparator 17 notifies the access amount detection counter unit 15 that the memory has been accessed. The access amount detection counter unit 15 counts up the access amount for each memory access and stores it in the count value register unit 14.

例えば、処理00の場合、アクセス測定部8では、フラグセットの通知を受けてアクセス量検出カウンタ部15のアクセス量を測定するカウンタのカウンタ値を0にセットする。その後、処理00実行時アドレス比較器17から通知があれば、メモリへのアクセスがあるたびにアクセス量を検出してカウンタ値をインクリメントしてアクセス量を測定する。   For example, in the case of processing 00, the access measurement unit 8 receives the flag set notification and sets the counter value of the counter that measures the access amount of the access amount detection counter unit 15 to 0. Thereafter, if there is a notification from the address comparator 17 when the processing 00 is executed, the access amount is detected and the counter value is incremented every time the memory is accessed, and the access amount is measured.

ステップS97では処理iに対応したフラグiがネゲートされる。
ステップS98では、時間取得部12にてタイマ部10の時刻情報を測定終了時間としてフラグiの対応するメモリ領域に格納する。
In step S97, the flag i corresponding to the process i is negated.
In step S98, the time acquisition unit 12 stores the time information of the timer unit 10 as a measurement end time in the memory area corresponding to the flag i.

ステップS99では、カウント値出力部13にてカウント値用レジスタ部14のカウント値を読み出しフラグiに対応するメモリ領域に格納する。
例えば処理00の場合、処理00用のフラグ00がネゲートされるとアクセス測定部8のアクセス量検出カウンタ部15は対象のメモリ領域へのアクセス量の測定を停止し、測定したカウント値がカウント値用レジスタ部14に読み出され、カウント値はカウント値出力部13に出力される。取得した測定開始時刻、測定終了時刻、アクセス量は、セットでメモリ部3、ローカルメモリ6、専用メモリのいずれかに保持される。
In step S99, the count value output unit 13 stores the count value of the count value register unit 14 in the memory area corresponding to the read flag i.
For example, in the case of process 00, when the flag 00 for process 00 is negated, the access amount detection counter unit 15 of the access measurement unit 8 stops measuring the access amount to the target memory area, and the measured count value is the count value. The count value is read to the register unit 14 and the count value is output to the count value output unit 13. The acquired measurement start time, measurement end time, and access amount are held in the memory unit 3, the local memory 6, or the dedicated memory as a set.

上記のようにすることで、例えばハードウェアで動作させるアプリケーションソフトにおいて指定した測定区間の測定区間ごとの帯域使用情報(アクセス量)、測定区間の処理の測定開始時刻と測定終了時刻をセットで測定することができる。   By doing the above, for example, the band usage information (access amount) for each measurement section of the measurement section specified in the application software that is operated by hardware, and the measurement start time and measurement end time of the measurement section processing are measured as a set can do.

図10に示すグラフは、測定区間の帯域使用情報(アドレスの始点、終点)、測定区間の処理の測定開始時刻と測定終了時刻、指定したメモリ領域に対するアクセス量に基づいて表示される。図10の縦軸は指定したメモリ領域、横軸はアクセス量を示す。また、図10に示す表は、デバッガなどを用いて測定区間の帯域使用情報、測定開始時刻、測定終了時刻、アクセス量のデータを、メモリから読み出してPCなどの表示部に表示する。   The graph shown in FIG. 10 is displayed based on the band usage information (address start point and end point) of the measurement section, the measurement start time and measurement end time of the measurement section processing, and the access amount to the specified memory area. The vertical axis in FIG. 10 indicates the designated memory area, and the horizontal axis indicates the access amount. In the table shown in FIG. 10, the bandwidth usage information, the measurement start time, the measurement end time, and the access amount data of the measurement section are read from the memory and displayed on a display unit such as a PC using a debugger or the like.

図10に示すグラフは、プロセッサコア4(コア1)のメモリ領域へのアクセスを領域ごとに表示している。
メモリ領域の領域1に対してメモリアクセスがどれくらいあったかを示している。同じように領域2〜領域4についても各領域にどれくらいのメモリアクセスがあったかを示している。つまり、領域内におけるアクセス量の合計である。このように視覚的にすることで、図10では領域2へのアクセス量が他の領域に比べて多いことがわかり、グラフを利用者が検討することができる。
The graph shown in FIG. 10 displays access to the memory area of the processor core 4 (core 1) for each area.
It shows how much memory access has been made to area 1 of the memory area. Similarly, for the areas 2 to 4, how much memory access has been made to each area is shown. That is, the total access amount in the area. By visualizing in this way, it can be seen in FIG. 10 that the amount of access to the area 2 is larger than in other areas, and the user can examine the graph.

その結果、測定対象であるアプリケーションプログラム上の測定区間を関数、タスクな
どのマルチプロセッサ向けアプリケーションプログラムの並列化の単位とすることにより、測定情報を用いてメモリアクセス集中により性能劣化を回避するためのプログラムチューニングを行うことが可能である。
As a result, by using the measurement interval on the application program to be measured as the unit of parallelization of application programs for multiprocessors such as functions and tasks, it is possible to avoid performance degradation due to memory access concentration using measurement information Program tuning can be performed.

例えば、変数ごとのアクセス量を取得することができるので、バスアクセス量の大きい変数をローカルメモリ6などの別のバスを使用する領域に配置することにより、1つのバスに対するアクセス量を削減することができ、性能劣化を回避することができる。
また、本発明は、上記実施の形態に限定されるものでなく、本発明の要旨を逸脱しない範囲内で種々の改良、変更が可能である。
For example, since the access amount for each variable can be acquired, the access amount for one bus can be reduced by arranging a variable having a large bus access amount in an area using another bus such as the local memory 6. And performance degradation can be avoided.
The present invention is not limited to the above-described embodiment, and various improvements and modifications can be made without departing from the gist of the present invention.

(付記1)
複数の処理装置がメモリを共有するメモリ共有データ処理システムであって、
前記処理装置は、
タイマから通知される時刻を用いて前記処理装置で実行される処理ごとの開始時刻と終了時刻を測定する時間測定部と、
前記処理の開始から終了までの間、前記処理のメモリへのアクセス量を測定するアクセス測定部と、
を具備することを特徴とするメモリ共有データ処理システム。
(付記2)
前記処理装置は、
前記メモリへのアクセスの測定対象領域としての測定領域開始アドレスと測定領域終了アドレスを測定アドレス情報として保持し、前記処理の前記メモリへのアクセスごとにアクセス先アドレスが前記測定領域開始アドレスと前記測定領域終了アドレスの間の範囲であれば前記アクセス量の測定を前記アクセス測定部に指示するアドレス比較部をさらに備えることを特徴とする付記1に記載のメモリ共有データ処理システム。
(付記3)
前記時間測定部は、
前記開始時刻と前記終了時刻と、前記アクセス測定部によって測定された前記アクセス量を保持することを特徴とする付記1または2に記載のメモリ共有データ処理システム。
(付記4)
複数の各処理装置ごとに、かつ該各処理装置によって指示される時間範囲内ごとに、前記複数の処理装置に共通のメモリへのアクセス量を測定するアクセス量測定手段と、
該測定の結果を、前記処理装置ごと、前記時間範囲内ごとに記憶するアクセス量記憶手段と、
を備えることを特徴とするメモリアクセス量測定装置。
(付記5)
複数の各処理装置ごとに、かつ該各処理装置によって指示される時間範囲内ごとに、前記複数の処理装置に共通のメモリへのアクセス量を測定し、
該測定の結果を、前記処理装置ごと、前記時間範囲内ごとに記憶する、
ことを特徴とするメモリアクセス量測定方法。
(付記6)
前記時間測定部は、
前記処理ごとの前記アクセス量を測定するために測定開始と測定終了を示すフラグを用い、前記フラグがセットされると前記アクセス量の測定開始を前記アクセス測定部に通知
し、前記フラグがネゲートされると前記アクセス量の測定終了を前記アクセス測定部に通知することを特徴とする請求項1に記載のメモリ共有データ処理システム。
(Appendix 1)
A memory shared data processing system in which a plurality of processing devices share a memory,
The processor is
A time measuring unit for measuring a start time and an end time for each process executed by the processing device using a time notified from a timer;
An access measurement unit that measures the amount of access to the memory of the process between the start and end of the process;
A memory shared data processing system comprising:
(Appendix 2)
The processor is
A measurement area start address and a measurement area end address as measurement target areas for access to the memory are stored as measurement address information, and an access destination address is the measurement area start address and the measurement for each access to the memory in the process. The memory shared data processing system according to claim 1, further comprising an address comparison unit that instructs the access measurement unit to measure the access amount within a range between area end addresses.
(Appendix 3)
The time measuring unit is
The memory shared data processing system according to appendix 1 or 2, wherein the start time, the end time, and the access amount measured by the access measurement unit are held.
(Appendix 4)
An access amount measuring means for measuring an access amount to a memory common to the plurality of processing devices for each of the plurality of processing devices and within a time range instructed by the processing devices;
An access amount storage means for storing the result of the measurement for each processing device and for each time range;
A memory access amount measuring apparatus comprising:
(Appendix 5)
Measure the access amount to the memory common to the plurality of processing devices for each of the plurality of processing devices and for each time range instructed by the processing devices,
Storing the result of the measurement for each processing device and for each time range;
And a memory access amount measuring method.
(Appendix 6)
The time measuring unit is
A flag indicating measurement start and measurement end is used to measure the access amount for each process, and when the flag is set, the access measurement unit is notified of the start of measurement of the access amount, and the flag is negated. The memory shared data processing system according to claim 1, wherein the access measurement unit is notified of the end of measurement of the access amount.

実施例1のシステム構成を示す図である。1 is a diagram illustrating a system configuration of Embodiment 1. FIG. 実施例1のプロセッサコアの時間測定部とアクセス測定部を示す図である。It is a figure which shows the time measurement part and access measurement part of the processor core of Example 1. FIG. 実施例1の動作を示すフロー図である。FIG. 3 is a flowchart showing the operation of the first embodiment. 実施例1の各処理の動作を示すフロー図である。FIG. 6 is a flowchart illustrating the operation of each process according to the first embodiment. 各処理のアクセス量と測定開始時間、測定終了時間に基づいて生成されるグラフを示す図である。It is a figure which shows the graph produced | generated based on the access amount of each process, measurement start time, and measurement end time. 実施例2のシステム構成を示す図である。FIG. 3 is a diagram illustrating a system configuration of a second embodiment. 実施例2のプロセッサコアの時間測定部、アクセス測定部、アドレス比較部を示す図である。It is a figure which shows the time measurement part of the processor core of Example 2, an access measurement part, and an address comparison part. 実施例2の動作を示すフロー図である。FIG. 6 is a flowchart showing the operation of the second embodiment. 実施例2の各処理の動作を示すフロー図である。FIG. 10 is a flowchart illustrating the operation of each process according to the second embodiment. 各処理の対象メモリ領域のアドレスとアクセス量、測定開始時間、測定終了時間に基づいて生成されるグラフを示す図である。It is a figure which shows the graph produced | generated based on the address of the memory area of each process, access amount, measurement start time, and measurement end time. 従来のシステム構成を示す図である。It is a figure which shows the conventional system configuration. 従来のプロセッサコアのアクセス測定部と動作を示すフローを示す図である。It is a figure which shows the flow which shows the access measurement part and operation | movement of the conventional processor core. 関数をバスマスタに割り付けた場合のイメージ図であるIt is an image diagram when the function is assigned to the bus master

符号の説明Explanation of symbols

1 システム
2 マルチコアプロセッサ
3 メモリ部
4 プロセッサコア
5 処理部
6 ローカルメモリ
7 時間測定部
8 アクセス測定部、
9 DMA
10 タイマ部
11 複数フラグ部
12 時間取得部
13 カウント値出力部
14 カウント値用レジスタ部
15 アクセス量検出カウンタ部
16 アドレス比較部
17 アドレス比較器
18 測定領域レジスタ
DESCRIPTION OF SYMBOLS 1 System 2 Multi-core processor 3 Memory part 4 Processor core 5 Processing part 6 Local memory 7 Time measurement part 8 Access measurement part,
9 DMA
DESCRIPTION OF SYMBOLS 10 Timer part 11 Multiple flag part 12 Time acquisition part 13 Count value output part 14 Count value register part 15 Access amount detection counter part 16 Address comparison part 17 Address comparator 18 Measurement area register

Claims (4)

複数の処理装置がメモリを共有するメモリ共有データ処理システムであって、
前記処理装置は、タイマから通知される時刻を用いて前記処理装置で実行される処理ごとの開始時刻と終了時刻を測定する時間測定部と、
前記処理の開始から終了までの間、前記処理のメモリへのアクセス量を測定するアクセス測定部と、
前記メモリへのアクセスの測定対象領域としての測定領域開始アドレスと測定領域終了アドレスを測定アドレス情報として保持し、前記処理の前記メモリへのアクセスごとにアクセス先アドレスが前記測定領域開始アドレスと前記測定領域終了アドレスの間の範囲であれば前記アクセス量の測定を前記アクセス測定部に指示するアドレス比較部と、
を具備することを特徴とするメモリ共有データ処理システム。
A memory shared data processing system in which a plurality of processing devices share a memory,
The processing device uses a time notified from a timer to measure a start time and an end time for each process executed in the processing device, and
An access measurement unit that measures the amount of access to the memory of the process between the start and end of the process;
A measurement area start address and a measurement area end address as measurement target areas for access to the memory are stored as measurement address information, and an access destination address is the measurement area start address and the measurement for each access to the memory in the process. An address comparison unit that instructs the access measurement unit to measure the amount of access if it is a range between region end addresses;
A memory shared data processing system comprising:
前記時間測定部は、前記開始時刻と前記終了時刻と、前記アクセス測定部によって測定された前記アクセス量を保持することを特徴とする請求項1に記載のメモリ共有データ処理システム。 The memory shared data processing system according to claim 1, wherein the time measurement unit holds the start time, the end time, and the access amount measured by the access measurement unit. 複数の各処理装置ごとに、かつ該各処理装置によって指示される時間範囲内ごとに、前記複数の処理装置に共通のメモリへのアクセス量を測定するアクセス量測定手段と、
該測定の結果を、前記処理装置ごと、前記時間範囲内ごとに記憶するアクセス量記憶手段と、
前記メモリへのアクセスの測定対象領域としての測定領域開始アドレスと測定領域終了アドレスを測定アドレス情報として保持し、前記メモリへのアクセスごとにアクセス先アドレスが前記測定領域開始アドレスと前記測定領域終了アドレスの間の範囲であれば前記アクセス量の測定を前記アクセス量測定手段に指示するアドレス比較手段と、
を備えることを特徴とするメモリアクセス量測定装置。
An access amount measuring means for measuring an access amount to a memory common to the plurality of processing devices for each of the plurality of processing devices and within a time range instructed by the processing devices;
An access amount storage means for storing the result of the measurement for each processing device and for each time range;
The measurement area start address and the measurement area end address as the measurement target area for accessing the memory are held as measurement address information, and the access destination address is the measurement area start address and the measurement area end address for each access to the memory. Address comparison means for instructing the access amount measurement means to measure the access amount in the range between
A memory access amount measuring apparatus comprising:
複数の各処理装置ごとに、かつ該各処理装置によって指示される時間範囲内ごとに、前記複数の処理装置に共通のメモリへのアクセス量を測定し、
該測定の結果を、前記処理装置ごと、前記時間範囲内ごとに記憶し、
前記メモリへのアクセスの測定対象領域としての測定領域開始アドレスと測定領域終了アドレスを測定アドレス情報として保持し、前記メモリへのアクセスごとにアクセス先アドレスが前記測定領域開始アドレスと前記測定領域終了アドレスの間の範囲であれば前記アクセス量の測定を指示する、
ことを特徴とするメモリアクセス量測定方法。
Measure the access amount to the memory common to the plurality of processing devices for each of the plurality of processing devices and for each time range instructed by the processing devices,
The result of the measurement is stored for each processing device and for each time range,
The measurement area start address and the measurement area end address as the measurement target area for accessing the memory are held as measurement address information, and the access destination address is the measurement area start address and the measurement area end address for each access to the memory. Instruct the measurement of the access amount if the range is between
And a memory access amount measuring method.
JP2008029926A 2008-02-12 2008-02-12 Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method Expired - Fee Related JP4998303B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008029926A JP4998303B2 (en) 2008-02-12 2008-02-12 Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008029926A JP4998303B2 (en) 2008-02-12 2008-02-12 Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method

Publications (2)

Publication Number Publication Date
JP2009193093A JP2009193093A (en) 2009-08-27
JP4998303B2 true JP4998303B2 (en) 2012-08-15

Family

ID=41075080

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008029926A Expired - Fee Related JP4998303B2 (en) 2008-02-12 2008-02-12 Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method

Country Status (1)

Country Link
JP (1) JP4998303B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5744650B2 (en) * 2011-07-06 2015-07-08 オリンパス株式会社 BUS MONITOR DEVICE, BUS MONITOR METHOD, AND PROGRAM

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03118644A (en) * 1989-09-29 1991-05-21 Nippondenso Co Ltd Program execution monitor
JPH03127237A (en) * 1989-10-13 1991-05-30 Fujitsu Ltd Performance measurement system for information processor
JPH0612395A (en) * 1992-06-29 1994-01-21 Canon Inc Task allocating method in multiprocessor system
JPH0981528A (en) * 1995-09-11 1997-03-28 Nec Eng Ltd Multiprocessor system, method and device for interrupt control used in the same
JP4151975B2 (en) * 2004-11-08 2008-09-17 インターナショナル・ビジネス・マシーンズ・コーポレーション Information processing apparatus, program, and management method
JP4944518B2 (en) * 2006-05-26 2012-06-06 富士通セミコンダクター株式会社 Task transition diagram display method and display device

Also Published As

Publication number Publication date
JP2009193093A (en) 2009-08-27

Similar Documents

Publication Publication Date Title
US8607246B2 (en) Multiprocessor circuit using run-time task scheduling
US20120095728A1 (en) Data processing apparatus, performance evaluation/analysis apparatus, and performance evaluation/analysis system and method
US20110072309A1 (en) Debugger for Multicore System
US20120236011A1 (en) Method of determining the state of a tile based deferred rendering processor and apparatus thereof
CA2880345A1 (en) Hit testing method and apparatus
US9134979B2 (en) Convergence analysis in multithreaded programs
CN112100090A (en) Data access request processing method, device, medium and memory mapping controller
JP2001311692A (en) Apparatus and method for visual inspection
JP5241384B2 (en) Distributed shared memory multiprocessor and data processing method
US8972693B2 (en) Hardware managed allocation and deallocation evaluation circuit
JP4998303B2 (en) Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method
JP2006092029A (en) Microcomputer and trace control method
JP6666216B2 (en) Electronic control unit, analysis system
JP5245620B2 (en) Computer system
CN115905040A (en) Counter processing method, graphic processor, device and storage medium
JPWO2012108020A1 (en) Log recording device
JP2011150532A (en) Information processing apparatus
JP5376042B2 (en) Multi-core processor system, thread switching control method, and thread switching control program
US20130239113A1 (en) Information processing apparatus, computer product, and information processing method
JP2016186697A (en) Method and mechanism for sharing variable among functions
CN115658242B (en) Task processing method for logic system design and electronic equipment
JP5850724B2 (en) Data processing apparatus and control method thereof
CN115687159B (en) Debugging method, debugging device and computer readable storage medium
JP2005242929A (en) Accessing method for shared memory and data processor
JP5582241B2 (en) Multi-core processor system, multi-core processor system control method, and multi-core processor system control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100917

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111115

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120323

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120430

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150525

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees