WO2018163387A1 - 解析装置、解析方法及び解析プログラム - Google Patents

解析装置、解析方法及び解析プログラム Download PDF

Info

Publication number
WO2018163387A1
WO2018163387A1 PCT/JP2017/009613 JP2017009613W WO2018163387A1 WO 2018163387 A1 WO2018163387 A1 WO 2018163387A1 JP 2017009613 W JP2017009613 W JP 2017009613W WO 2018163387 A1 WO2018163387 A1 WO 2018163387A1
Authority
WO
WIPO (PCT)
Prior art keywords
delay time
program
unit
instruction execution
instruction
Prior art date
Application number
PCT/JP2017/009613
Other languages
English (en)
French (fr)
Inventor
治 遠山
正勝 外山
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2017548252A priority Critical patent/JPWO2018163387A1/ja
Priority to PCT/JP2017/009613 priority patent/WO2018163387A1/ja
Publication of WO2018163387A1 publication Critical patent/WO2018163387A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Definitions

  • the present invention relates to a technique for analyzing the performance of a program.
  • Patent Document 1 discloses a method for accurately estimating the execution performance of software (in Patent Document 1, expressed as a machine language instruction sequence). Specifically, Patent Document 1 discloses a method of estimating the execution performance of a certain software including the overhead due to the pipeline hazard by analyzing the occurrence of the pipeline hazard accompanying the instruction execution of the CPU.
  • Patent Document 2 discloses a method for accurately estimating the execution performance of software. Specifically, Patent Document 2 discloses a method for accurately estimating the execution performance of software by analyzing the state of a cache memory accompanying execution of software and including a penalty in the case of a cache miss hit in the estimate. It is disclosed.
  • the main purpose of the present invention is to solve the above problems. More specifically, the main purpose is to estimate the performance of the program efficiently.
  • the analysis apparatus is A program dividing unit for dividing a program including a plurality of instruction sequences into a plurality of blocks; Obtain calculation target range information indicating a calculation target range designated as a target range of calculation of instruction execution delay time in the program, extract blocks included in the calculation target range from the plurality of blocks, and extract An instruction execution delay time calculating unit for calculating an instruction execution delay time of the block.
  • the instruction execution delay time is limited to blocks that require calculation of the instruction execution delay time. For this reason, according to the present invention, it is possible to efficiently estimate the performance of the program.
  • FIG. 3 is a diagram illustrating a functional configuration example of the program performance estimation apparatus according to the first embodiment.
  • 5 is a flowchart illustrating an operation example of the program performance estimation apparatus according to the first embodiment.
  • 5 is a flowchart showing details of step S100 according to the first embodiment.
  • 5 is a flowchart showing details of step S80 according to the first embodiment.
  • FIG. 4 is a diagram showing an example of basic block information according to the first embodiment.
  • 5 is a flowchart showing details of step S90 according to the first embodiment.
  • FIG. 6 is a diagram showing an example of access destination information according to the first embodiment.
  • FIG. 4 is a diagram illustrating an example of execution order information according to the first embodiment.
  • FIG. 5 is a diagram showing an example of execution delay information according to the first embodiment.
  • FIG. 3 is a diagram illustrating a hardware configuration example of the program performance estimation apparatus according to the first embodiment. The figure which shows the relationship between the function structure of the program performance estimation apparatus which concerns on Embodi
  • FIG. *** Explanation of configuration *** FIG. 1 shows a functional configuration example of a program performance estimation apparatus 10 according to the present embodiment.
  • FIG. 10 shows a hardware configuration example of the program performance estimation apparatus 10 according to the present embodiment.
  • the program performance estimation device 10 corresponds to an analysis device.
  • the operations performed by the program performance estimation apparatus 10 correspond to an analysis method and an analysis program.
  • the program performance estimation apparatus 10 is a computer.
  • a processor 900, a storage device 901, a communication interface 902, and an input / output interface 903 are connected to a bus 904.
  • the storage device 901 includes a program dividing unit 200, an execution order analyzing unit 300, an access destination analyzing unit 400, a hazard delay analyzing unit 500, an analysis execution determining unit 510, a memory access delay time calculating unit 600, and a delay time addition shown in FIG.
  • a program for realizing the functions of the unit 700 is stored.
  • the processor 900 executes these programs, and will be described later, a program dividing unit 200, an execution order analyzing unit 300, an access destination analyzing unit 400, a hazard delay analyzing unit 500, an analysis execution determining unit 510, and a memory access delay time calculating unit. 600 and the delay time adding unit 700 are operated.
  • the storage device 901 also includes a program 100, basic block information 201, execution order information 301, peripheral device / IO information 310, access destination information 401, execution delay information 501, measurement interval information 520, CPU configuration information 530, memory access delay.
  • Information 601, cache configuration information 610, and program execution performance information 701 are stored.
  • FIG. 11 shows the relationship between the functional configuration and the hardware configuration of the program performance estimation apparatus 10. In FIG.
  • the processor 900 includes a program dividing unit 200, an execution order analyzing unit 300, an access destination analyzing unit 400, a hazard delay analyzing unit 500, an analysis execution determining unit 510, a memory access delay time calculating unit 600, and a delay time adding unit 700.
  • the state which is running the program which realizes a function is expressed typically.
  • the storage device 901 includes the program 100, basic block information 201, execution order information 301, peripheral device / IO information 310, access destination information 401, execution delay information 501, measurement section information 520, CPU configuration information 530, A state in which memory access delay information 601, cache configuration information 610, and program execution performance information 701 are stored is schematically shown.
  • the communication interface 902 performs communication with an external device.
  • the input / output interface 903 is an interface such as PCI (Peripheral Component Interconnect) or USB (Universal Serial Bus).
  • the program 100 is a machine language instruction sequence. That is, the program 100 includes a plurality of assembly instructions constituting the software.
  • the program 100 is obtained by compiling software described by a software developer in a software description language (eg, C language) with a compiler (eg, C compiler).
  • the program 100 is a set of assembly instructions written by a software developer.
  • the program performance estimation apparatus 10 estimates execution performance when the program 100 is executed under the conditions indicated by the CPU configuration information 530, the cache configuration information 610, and the measurement section information 520.
  • the program dividing unit 200 divides the program 100 according to a specific division rule, and generates a plurality of instruction string chunks called basic blocks.
  • the basic block generated by the program dividing unit 200 and the basic block attribute information are collectively referred to as basic block information 201.
  • the program dividing unit 200 uses, for example, a rule that the program 100 is divided at a place where a jump instruction or a branch instruction appears as a division rule.
  • the program dividing unit 200 can also use a rule that divides the program 100 for every fixed number of instructions (for example, 10 instructions) as a dividing rule. In the present embodiment, the division rule is not particularly specified.
  • the hazard delay analysis unit 500 which will be described later, analyzes the instruction sequence in the basic block and analyzes the occurrence status of the pipeline hazard. It is desirable to be a rule.
  • the execution order analysis unit 300 uses a peripheral device / IO information 310 to simulate a computer that executes the program 100 (hereinafter referred to as an execution computer). Further, the execution order analysis unit 300 accurately simulates the branch condition of the jump instruction and the branch condition of the branch instruction when the program 100 is executed by the execution computer, and generates execution order information indicating the execution order of the basic blocks.
  • Peripheral device / IO information 310 is information indicating the status of CPU peripheral devices and IO devices of the execution computer.
  • the access destination analysis unit 400 detects a memory access instruction (for example, a load / store instruction) included in the basic block. In addition, the access destination analyzing unit 400 analyzes the access destination of the memory access instruction included in the basic block, and generates access destination information 401 for each basic block.
  • the access destination information 401 is information indicating the access destination of the memory access instruction.
  • the analysis execution determination unit 510 acquires the basic block information 201, the execution order information 301, and the measurement section information 520.
  • a measurement section is specified in the measurement section information 520.
  • the measurement interval is a target range for calculating the instruction execution delay time by the hazard delay analysis unit 500.
  • the measurement section corresponds to the calculation target range.
  • the measurement section information 520 corresponds to calculation target range information.
  • the analysis execution determination unit 510 extracts the basic blocks included in the measurement section from the plurality of basic blocks, and causes the hazard delay analysis unit 500 to calculate the instruction execution delay time for only the extracted basic blocks. Specifically, analysis execution determination unit 510 notifies hazard delay analysis unit 500 of the extracted basic block.
  • the hazard delay analysis unit 500 acquires the CPU configuration information 530.
  • the CPU configuration information 530 describes the pipeline configuration and register configuration of the CPU of the execution computer.
  • the hazard delay analysis unit 500 is notified of a basic block for calculation of the instruction execution delay time, that is, a basic block included in the measurement section, from the analysis execution determination unit 510.
  • the hazard delay analysis unit 500 estimates the occurrence situation of a pipeline hazard when the instruction sequence included in the basic block extracted by the analysis execution determination unit 510 is executed by the CPU of the execution computer.
  • the hazard delay analysis unit 500 calculates the instruction execution delay time when the instruction sequence included in the basic block extracted by the analysis execution determination unit 510 is executed by the CPU of the execution computer in consideration of the occurrence of the hazard. .
  • the hazard delay analysis unit 500 generates execution delay information 501 indicating the calculated instruction execution delay time.
  • the hazard delay analysis unit 500 and the analysis execution determination unit 510 are collectively referred to as an instruction execution delay time calculation unit 50.
  • the hazard delay analysis unit 500 and the analysis execution determination unit 510 obtain the measurement interval information 520 as the instruction execution delay time calculation unit 50 and extract the basic blocks included in the measurement interval from the plurality of basic blocks.
  • the instruction execution delay time of the extracted basic block is calculated.
  • the processing performed by the instruction execution delay time calculation unit 50 is referred to as instruction execution delay time calculation processing.
  • the memory access delay time calculation unit 600 acquires cache configuration information 610, execution order information 301, and access destination information 401.
  • the cache configuration information 610 indicates the cache configuration of the execution computer.
  • the memory access delay time calculation unit 600 simulates the internal state of the cache memory when each basic block is executed by the execution computer based on the cache configuration information 610, the execution order information 301, and the access destination information 401. Estimate the cache hit situation of memory access during basic block execution. Further, the memory access delay time calculation unit 600 calculates a memory access delay time for each basic block in consideration of a memory access cache hit or cache miss hit. Then, the memory access delay time calculation unit 600 generates memory access delay information 601 indicating the calculated memory access delay time.
  • the delay time adding unit 700 acquires execution delay information 501 and memory access delay information 601. In addition, the delay time adding unit 700 adds the instruction execution delay time indicated in the execution delay information 501 and the memory access delay time indicated in the memory access delay information 601 for each basic block, and adds up the total delay for each basic block. Get time. Specifically, the delay time adding unit 700 includes the execution delay information 501 output from the hazard delay analysis unit 500 and the memory access delay information 601 output from the memory access delay time calculation unit 600. Execution delay information 501 and memory access delay information 601 are extracted. Then, the instruction execution delay time indicated by the extracted execution delay information 501 and the memory access delay time indicated by the memory access delay information 601 are added.
  • the delay time adding unit 700 treats the memory access delay time as it is as the total delay time of the basic block for the basic block for which the instruction execution delay time is not calculated, that is, the basic block not included in the measurement section. . Further, the delay time adding unit 700 integrates the total delay time for each basic block to obtain the execution performance value (total delay time) of the program 100.
  • FIG. 2 shows an operation example of the program performance estimation apparatus 10 according to the present embodiment.
  • an operation example of the program performance estimation apparatus 10 will be described with reference to FIG.
  • step S80 the program dividing unit 200 divides the program 100 to generate basic block information 201.
  • FIG. 4 shows details of step S80.
  • step S201 the program dividing unit 200 generates a basic block N that is a variable for inserting an instruction sequence.
  • step S ⁇ b> 202 the program dividing unit 200 reads one instruction sequence from the program 100.
  • step S203 the program dividing unit 200 determines whether the instruction sequence read in step S202 is a branch instruction or a jump instruction. If the instruction sequence read in step S202 is neither a branch instruction nor a jump instruction (NO in step S203), the program dividing unit 200 adds the instruction sequence read in step S202 to the basic block N. Then, the program dividing unit 200 performs the operation of Step S202 again.
  • the program dividing unit 200 sets a combination of a basic block, a basic block number, and a head address as a basic block.
  • the value of N is incremented by one.
  • the program dividing unit 200 assigns basic block numbers that are serial numbers to the basic blocks.
  • the program dividing unit 200 generates basic block information 201 from a set of a basic block (a set of instruction sequences), a basic block number, and a head address of the basic block.
  • An example of the basic block information 201 is shown in FIG. As shown in FIG.
  • the basic block information 201 includes a basic block number 2011, a head address 2012, and an instruction sequence 2013.
  • the basic block number 2011 is a serial number assigned to each basic block.
  • the start address 2012 is a memory address of the start instruction of the basic block.
  • the instruction sequence 2013 is a set of instruction sequences and corresponds to a basic block.
  • each record (each row) of the basic block information 201 in FIG. 5 is referred to as a basic block record.
  • step S ⁇ b> 90 the execution order analysis unit 300 analyzes the execution order of the basic blocks and generates execution order information 301.
  • step S91 the access destination analysis unit 400 analyzes the access destination of the basic block and generates access destination information 401.
  • FIG. 6 shows details of step S90 and step S91.
  • step S301 the access destination analysis unit 400 reads the first basic block record [0] from the basic block information 201.
  • step S302 the access destination analysis unit 400 analyzes the instruction sequence 2013 of the read basic block record, and checks whether the instruction sequence 2013 includes a memory access instruction. If the instruction sequence 2013 includes a memory access instruction (YES in step S303), the access destination analysis unit 400 analyzes the access destination of the memory access instruction in step S304, and determines the access destination as access destination information. 401 is added.
  • the access destination information 401 is information that associates a basic block number with an access destination.
  • the access destination analysis unit 400 may generate the access destination information 401 as new data.
  • the access destination analysis unit 400 adds an access destination information column to the basic block information 201. Assume that the access destination information 401 is generated. FIG. 7 shows an example of the access destination information 401. In FIG. 7, the access destination information 2014 is merged with the basic block information 201. If the instruction sequence 2013 does not include a memory access instruction (NO in step S303), the access destination analysis unit 400 skips step S304 and performs step S305. In step S305, the access destination analyzing unit 400 calculates the address (jump destination (X)) of the basic block to be executed next. Next, in step S306, the access destination analysis unit 400 determines whether the jump destination (X) is at the end of the program or outside the measurement interval.
  • the access destination analysis unit 400 ends the process.
  • the execution order analysis unit 300 adds the basic block number (N) to the execution order information 301.
  • the access destination analyzer 400 reads the jump destination basic block record [X] from the basic block information 201, and performs step S302 for the basic block record [X].
  • FIG. 8 shows an example of the execution order information 301. As illustrated in FIG. 8, the execution order information 301 includes an execution order 3011 and a basic block number 3012 corresponding to the execution order 3011. The basic block number 3012 is the same as the basic block number 2011 shown in FIG.
  • step S100 the delay time is calculated in step S100. That is, the instruction execution delay time calculation unit 50 calculates the instruction execution delay time of the basic block in the measurement interval, and the memory access delay time calculation unit 600 calculates the memory access delay time for each basic block. Also, the delay time adding unit 700 adds the instruction execution delay time and the memory access delay time, and further calculates the total delay time of the entire program 100.
  • FIG. 3 shows details of step S100.
  • step S 101 the memory access delay time calculation unit 600 reads the access destination information 401 according to the execution order information 301 and reads each basic block record from the basic block information 201.
  • step S102 the memory access delay time calculation unit 600 performs a cache simulation based on the read access destination information 401 and the cache configuration information 610, and for each basic block, the cache state when the basic block is executed. And whether or not the memory access during the execution of the basic block hits the cache is determined.
  • step S103 the memory access delay time calculation unit 600 calculates the memory access time during execution of the basic block based on the cache hit / miss determination result in step S102.
  • the memory access delay time calculation unit 600 outputs memory access delay information 601 indicating the memory access time of each basic block to the delay time addition unit 700.
  • the instruction execution delay time calculation unit 50 performs a hazard delay analysis in the basic block. More specifically, the analysis execution determining unit 510 reads a basic block from the basic block information 201 based on the execution order information 301 in step S104. Next, in step S105, the analysis execution determination unit 510 determines whether or not the basic block included in the read basic block record is included in the measurement section indicated in the measurement section information 520.
  • the measurement section information 520 describes the basic block numbers of the basic blocks included in the measurement section.
  • the analysis execution determination unit 510 determines whether or not the basic block number of the read basic block record is described in the measurement section information 520, and determines whether or not the basic block is included in the measurement section.
  • the hazard delay analysis unit 500 performs a hazard delay analysis of the basic block and takes into account the pipeline execution hazard when the basic block is executed. Calculate time. That is, the analysis execution determination unit 510 outputs the basic block information 201 of the basic block included in the measurement section to the hazard delay analysis unit 500, and the hazard delay analysis unit 500 performs the hazard based on the basic block information 201 and the CPU configuration information 530. Perform delay analysis. The hazard delay analysis unit 500 outputs execution delay information 501 indicating the execution delay time of the basic block included in the measurement interval to the delay time addition unit 700.
  • the execution delay information 501 is information in which a basic block number and an instruction execution delay time are associated with each other.
  • the hazard delay analysis unit 500 may generate the execution delay information 501 as new data. However, in this embodiment, the hazard delay analysis unit 500 adds a sequence of instruction execution delay times to the basic block information 201. Thus, the execution delay information 501 is generated.
  • FIG. 9 shows an example of the execution delay information 501. In FIG. 9, the instruction execution delay time 2015 is merged with the basic block information 201.
  • the hazard delay analysis unit 500 applies the same description content to each extracted basic block. To determine whether the instruction execution delay time has been calculated. Then, the hazard delay analysis unit 500 omits the calculation of the instruction execution delay time for the basic block for which the instruction execution delay time has already been calculated for the basic block having the same description content, and calculates the calculated instruction execution delay Apply time.
  • step S107 the delay time adding unit 700 adds the memory access delay time and the instruction execution delay time for each basic block.
  • the delay time adding unit 700 obtains the total delay time of the basic block.
  • the delay time adding unit 700 adds the total delay time of the basic block obtained in step S107 to the cumulative value of the total delay time of the preceding basic block.
  • the delay time adding unit 700 treats the memory access delay time as the total delay time of the basic block. Then, the delay time adding unit 700 adds the total delay time to the total value of the total delay times of the preceding basic blocks.
  • the hazard delay analysis unit 500, the analysis execution determination unit 510, the memory access delay time calculation unit 600, and the delay time addition unit 700 repeat these series of processes until the end of the program 100 (YES in step S108). Get the total delay time.
  • a processor 900 illustrated in FIG. 10 is an IC (Integrated Circuit) that performs processing.
  • the processor 900 is a CPU, a DSP (Digital Signal Processor), or the like.
  • a storage device 901 illustrated in FIG. 10 is a RAM (Random Access Memory), a ROM (Read Only Memory), a HDD (Hard Disk Drive), a flash memory, or the like.
  • the communication interface 902 shown in FIG. 10 includes a receiver that receives data and a transmitter that transmits data.
  • the communication interface 902 is, for example, a communication chip or a NIC (Network Interface Card).
  • the communication interface 902 is connected to a network.
  • the communication interface 902 is, for example, a WAN (Wide Area Network or WAN) such as an IP-VPN (Internet Protocol Private Network), a wide area LAN (Local Area Network), and an ATM (Asynchronous Transfer Mode) network.
  • WAN Wide Area Network or WAN
  • IP-VPN Internet Protocol Private Network
  • a disk drive controls reading / writing of data with respect to a disk such as a Compact Disc (CD), a DVD, a Blu-ray (registered trademark) disk, and a floppy disk (FD).
  • a disk such as a Compact Disc (CD), a DVD, a Blu-ray (registered trademark) disk, and a floppy disk (FD).
  • the program performance estimation apparatus 10 may include a touch panel, a touch pad, a trackball, a pen tablet, and other pointing devices instead of the mouse. Further, the program performance estimation device 10 may be connected to a printer.
  • the storage device 901 also stores programs such as a boot program and an OS (Operating System). At least a part of the OS is executed by the processor 900. While executing at least a part of the OS, the processor 900 executes the program dividing unit 200, the execution order analyzing unit 300, the access destination analyzing unit 400, the hazard delay analyzing unit 500, the analysis execution determining unit 510, the memory access delay time calculating unit 600, A program for realizing the function of the delay time adding unit 700 is executed. When the processor 900 executes the OS, task management, memory management, file management, communication control, and the like are performed. Further, the program performance estimation apparatus 10 may include a plurality of processors that replace the processor 900.
  • the plurality of processors include functions of the program dividing unit 200, the execution order analyzing unit 300, the access destination analyzing unit 400, the hazard delay analyzing unit 500, the analysis execution determining unit 510, the memory access delay time calculating unit 600, and the delay time adding unit 700. Shares the execution of programs that realize Each processor is an IC that performs processing similar to the processor 900. In addition, processing results of the program dividing unit 200, the execution order analyzing unit 300, the access destination analyzing unit 400, the hazard delay analyzing unit 500, the analysis execution determining unit 510, the memory access delay time calculating unit 600, and the delay time adding unit 700 are shown.
  • At least one of information, data, signal value, and variable value is stored in at least one of the storage device 901, a register in the processor 900, and a cache memory.
  • a program that realizes the functions of the program dividing unit 200, the execution order analyzing unit 300, the access destination analyzing unit 400, the hazard delay analyzing unit 500, the analysis execution determining unit 510, the memory access delay time calculating unit 600, and the delay time adding unit 700. May be stored in a portable storage medium such as a magnetic disk, FD, optical disk, CD, Blu-ray (registered trademark) disk, or DVD.
  • the “parts” of the program dividing unit 200, the execution order analyzing unit 300, the access destination analyzing unit 400, the hazard delay analyzing unit 500, the analysis execution determining unit 510, the memory access delay time calculating unit 600, and the delay time adding unit 700 are It may be read as “circuit” or “process” or “procedure” or “processing”.
  • the program performance estimation apparatus 10 may be realized by an electronic circuit such as a logic IC (Integrated Circuit), a GA (Gate Array), an ASIC (Application Specific Integrated Circuit), or an FPGA (Field-Programmable Gate Array).
  • the program dividing unit 200, the execution order analyzing unit 300, the access destination analyzing unit 400, the hazard delay analyzing unit 500, the analysis execution determining unit 510, the memory access delay time calculating unit 600, and the delay time adding unit 700 are electronic Realized as part of the circuit.
  • the processor and the electronic circuit are also collectively referred to as a processing circuit.
  • 10 program performance estimation device 50 instruction execution delay time calculation unit, 100 program, 200 program division unit, 201 basic block information, 300 execution order analysis unit, 301 execution order information, 310 peripheral device / IO information, 400 access destination analysis unit 401 access destination information, 500 hazard delay analysis unit, 501 execution delay information, 510 analysis execution determination unit, 520 measurement interval information, 530 CPU configuration information, 600 memory access delay time calculation unit, 601 memory access delay information, 610 cache configuration Information, 700 delay time addition unit, 701 program execution performance information, 900 processor, 901 storage device, 902 communication interface, 903 input / output interface, 904 bus.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

プログラム分割部(200)は、複数の命令列が含まれるプログラム(100)を複数の基本ブロックに分割する。命令実行遅延時間算出部(50)は、プログラム(100)内で命令実行遅延時間の算出の対象の範囲として指定された測定区間が示される測定区間情報(520)を取得し、複数の基本ブロックから測定区間に含まれる基本ブロックを抽出し、抽出した基本ブロックの命令実行遅延時間を算出する。

Description

解析装置、解析方法及び解析プログラム
 本発明は、プログラムの性能を解析する技術に関する。
 電子デバイスを用いたシステム、特に組み込みシステムの開発では、ハードウェア、ソフトウェア両方の開発が必要となる。しかしながら、一般的に、ソフトウェアは、ソフトウェアを実行するハードウェアが完成しないと動作させることができない。このため、従来は、ソフトウェア及びハードウェアの開発が伴うシステムの開発では、システムを構成するハードウェアの設計を先に完了させ、次に、完成したハードウェア上でソフトウェアを動かしてシステム全体の動作確認を行う手法がとられていた。
 このような従来の開発手法では、ソフトウェアの検証を含めたシステム全体の動作検証が開発工程の最後の段階に行われることから、不具合が発覚した場合の手戻りによるリスクが大きいという問題が潜在的に存在する。この潜在的なリスクは、システムが大きく、複雑になるに従って、システムの品質、並びに開発コストに強く影響するようになる。
 近年、電子技術の発展により電子部品は小型化、高性能化してきている。一方で、これらの電子部品を用いて構成されるシステムは大きく、複雑化しており、前記した従来の開発手法での潜在的リスクが無視できなくなってきている。特に開発の後工程となるソフトウェアの開発フェーズにおいて、設計されたハードウェアでは所望の性能を達成することが困難であると判明した場合には、ハードウェアの再設計が必要になる場合がある。また、ハードウェアの再設計を伴わずにソフトウェアが性能を達成できる方法を捻出できた場合も、ソフトウェアの開発工数がその分増加してしまうということがある。
 このような事態を回避するために、開発者は、システムアーキテクチャを考える際に、入念な机上検討によってソフトウェア実行性能の見積もりを行う。しかしながら、ソフトウェアの実行性能は、ソフトウェアを実行するCPU(Central Processing Unit)のアーキテクチャ、並びに、周辺装置の構成に左右されるため、正確な見積もりを行うことは非常に困難である。
 この問題を解決するために、CPUの動作のうち性能に関わる動作を簡易的に模擬するモデルにソフトウェアを入力してCPUの命令実行状況を解析することにより、ソフトウェアの実行性能を見積もる方法が考案されている。
 例えば、特許文献1には、精度よくソフトウェア(特許文献1では、機械語命令列と表記)の実行性能を見積もる方法が開示されている。具体的には、特許文献1には、CPUの命令実行に伴うパイプラインハザードの発生を解析することによって、あるソフトウェアの実行性能をパイプラインハザードによるオーバーヘッドを含めて見積もる方法が開示されている。
 更に、特許文献2にも、精度よくソフトウェアの実行性能を見積もる方法が開示されている。具体的には、特許文献2には、ソフトウェアの実行に伴うキャッシュメモリの状況を解析し、キャッシュミスヒットの場合のペナルティを見積もりの中に含めることで、精度よくソフトウェアの実行性能を見積もる方法が開示されている。
特開平7-021061号公報 特開2015-130067号公報
 特許文献1及び特許文献2のいずれの方法も、CPUの動作を実動作に近いレベルで模擬するため、ソフトウェアの分析に時間を要する。特に、近年のシステムはOS(Operating System)の搭載が当たり前のようになってきている。ソフトウェアの性能見積もりは、OS動作も加味して見積もる必要があるが、特許文献1の方法及び特許文献2の方法では、OSの分析だけでも長い時間を要してしまう。
 しかしながら、実際に実行性能の見積もりが必要なのは、OS起動後の数秒間であったり、システム全体の性能を決めるような一部のソフトウェアであることが多い。このため、特許文献1及び特許文献2の方法では、必ずしも必要ではない実行性能の見積もりに多大な時間及び演算リソースが費やされており、効率が悪いという課題がある。
 本発明は、上記のような課題を解決することを主な目的の一つとしている。より具体的には、効率的にプログラムの性能見積もりを行うことを主な目的とする。
 本発明に係る解析装置は、
 複数の命令列が含まれるプログラムを複数のブロックに分割するプログラム分割部と、
 前記プログラム内で命令実行遅延時間の算出の対象の範囲として指定された算出対象範囲が示される算出対象範囲情報を取得し、前記複数のブロックから前記算出対象範囲に含まれるブロックを抽出し、抽出したブロックの命令実行遅延時間を算出する命令実行遅延時間算出部とを有する。
 本発明では、命令実行遅延時間の算出が必要なブロックに限定して命令実行遅延時間を行う。このため、本発明によれば、効率的にプログラムの性能見積もりを行うことができる。
実施の形態1に係るプログラム性能見積もり装置の機能構成例を示す図。 実施の形態1に係るプログラム性能見積もり装置の動作例を示すフローチャート。 実施の形態1に係るステップS100の詳細を示すフローチャート。 実施の形態1に係るステップS80の詳細を示すフローチャート。 実施の形態1に係る基本ブロック情報の例を示す図。 実施の形態1に係るステップS90の詳細を示すフローチャート。 実施の形態1に係るアクセス先情報の例を示す図。 実施の形態1に係る実行順序情報の例を示す図。 実施の形態1に係る実行遅延情報の例を示す図。 実施の形態1に係るプログラム性能見積もり装置のハードウェア構成例を示す図。 実施の形態1に係るプログラム性能見積もり装置の機能構成とハードウェア構成との関係を示す図。
 以下、本発明の実施の形態について、図を用いて説明する。以下の実施の形態の説明及び図面において、同一の符号を付したものは、同一の部分または相当する部分を示す。
 実施の形態1.
***構成の説明***
 図1は、本実施の形態に係るプログラム性能見積もり装置10の機能構成例を示す。
 また、図10は、本実施の形態に係るプログラム性能見積もり装置10のハードウェア構成例を示す。
 プログラム性能見積もり装置10は、解析装置に相当する。また、プログラム性能見積もり装置10により行われる動作は、解析方法及び解析プログラムに相当する。
 先ず、図10を参照して、プログラム性能見積もり装置10のハードウェア構成例を説明する。
 プログラム性能見積もり装置10は、コンピュータである。
 プログラム性能見積もり装置10では、図10に示すように、プロセッサ900、記憶装置901、通信インタフェース902、及び入出力インタフェース903がバス904に接続されている。
 記憶装置901には、図1に示すプログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の機能を実現するプログラムが記憶されている。
 そして、プロセッサ900がこれらプログラムを実行して、後述する、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の動作を行う。
 また、記憶装置901は、プログラム100、基本ブロック情報201、実行順序情報301、周辺装置/IO情報310、アクセス先情報401、実行遅延情報501、測定区間情報520、CPU構成情報530、メモリアクセス遅延情報601、キャッシュ構成情報610及びプログラム実行性能情報701を記憶する。
 図11は、プログラム性能見積もり装置10の機能構成とハードウェア構成との関係を示す。
 図11では、プロセッサ900がプログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の機能を実現するプログラムを実行している状態を模式的に表している。
 また、図11では、記憶装置901がプログラム100、基本ブロック情報201、実行順序情報301、周辺装置/IO情報310、アクセス先情報401、実行遅延情報501、測定区間情報520、CPU構成情報530、メモリアクセス遅延情報601、キャッシュ構成情報610及びプログラム実行性能情報701を記憶している状態を模式的に表している。
 通信インタフェース902は、外部機器との間で通信を行う。
 入出力インタフェース903は、例えば、PCI(Peripheral Component Interconnect)、USB(Universal Serial Bus)等のインタフェースである。
 次に、図1を参照して、プログラム性能見積もり装置10の機能構成を説明する。
 プログラム100は、機械語命令列である。つまり、プログラム100には、ソフトウェアを構成する複数のアセンブリ命令が含まれている。
 プログラム100は、ソフトウェア開発者がソフトウェア記述言語(例:C言語)で記述したソフトウェアをコンパイラ(例:Cコンパイラ)でコンパイルして得られる。もしくは、プログラム100は、ソフトウェア開発者が記述したアセンブリ命令の集合である。
 本実施の形態に係るプログラム性能見積もり装置10は、プログラム100が、CPU構成情報530、キャッシュ構成情報610及び測定区間情報520に示される条件下で実行された場合の実行性能を見積もる。
 プログラム分割部200は、プログラム100を特定の分割ルールにより分割し、基本ブロックと呼ぶ命令列の塊を複数生成する。プログラム分割部200により生成された基本ブロックと基本ブロックの属性情報を合わせて基本ブロック情報201という。
 プログラム分割部200は、分割ルールとして、例えば、ジャンプ命令又は分岐命令が現れた箇所を境としてプログラム100を分割するというルールを用いる。また、プログラム分割部200は、分割ルールとして、一定の命令数(例:10命令)ごとにプログラム100を分割するというルールを用いることもできる。本実施の形態では、分割ルールについて特段指定しない。しかしながら、基本ブロック情報201に基づいて、後述するハザード遅延解析部500が基本ブロック内の命令列を分析してパイプラインハザードの発生状況を解析するため、この解析がしやすい形態に基本ブロックが生成されるルールであることが望ましい。
 実行順序解析部300は、周辺装置/IO情報310を用いて、プログラム100を実行する計算機(以下、実行計算機という)を模擬する。また、実行順序解析部300は、実行計算機でプログラム100が実行される場合のジャンプ命令の分岐条件及び分岐命令の分岐条件を正確に模擬し、基本ブロックの実行順序を示す実行順序情報を生成する。
 周辺装置/IO情報310は、実行計算機のCPUの周辺装置及びIOデバイスの状態を示す情報である。
 アクセス先解析部400は、基本ブロックに含まれるメモリアクセス命令(例えば、ロード/ストア命令)を検知する。また、アクセス先解析部400は、基本ブロックに含まれるメモリアクセス命令のアクセス先を解析して、基本ブロックごとにアクセス先情報401を生成する。アクセス先情報401は、メモリアクセス命令のアクセス先を示す情報である。
 解析実施判定部510は、基本ブロック情報201と実行順序情報301と測定区間情報520とを取得する。測定区間情報520では、測定区間が指定されている。測定区間は、ハザード遅延解析部500による命令実行遅延時間の算出の対象の範囲である。測定区間は、算出対象範囲に相当する。また、測定区間情報520は、算出対象範囲情報に相当する。
 解析実施判定部510は、複数の基本ブロックのうち測定区間に含まれる基本ブロックを抽出し、抽出した基本ブロックのみ命令実行遅延時間の算出をハザード遅延解析部500に行わせる。具体的には、解析実施判定部510は、抽出した基本ブロックをハザード遅延解析部500に通知する。
 ハザード遅延解析部500は、CPU構成情報530を取得する。CPU構成情報530には、実行計算機のCPUのパイプライン構成及びレジスタ構成が記載されている。また、ハザード遅延解析部500は、解析実施判定部510から命令実行遅延時間の算出の対象となる基本ブロック、すなわち、測定区間に含まれる基本ブロックを通知される。
 ハザード遅延解析部500は、解析実施判定部510により抽出された基本ブロックに含まれる命令列が実行計算機のCPUで実行される際のパイプラインハザードの発生状況を推定する。そして、ハザード遅延解析部500は、解析実施判定部510により抽出された基本ブロックに含まれる命令列を実行計算機のCPUで実行する際の命令実行遅延時間をハザードの発生具合を加味して算出する。更に、ハザード遅延解析部500は、算出した命令実行遅延時間を示す実行遅延情報501を生成する。
 なお、ハザード遅延解析部500及び解析実施判定部510を合わせて命令実行遅延時間算出部50という。ハザード遅延解析部500及び解析実施判定部510は、前述したように、命令実行遅延時間算出部50として、測定区間情報520を取得し、複数の基本ブロックから測定区間に含まれる基本ブロックを抽出し、抽出した基本ブロックの命令実行遅延時間を算出する。また、命令実行遅延時間算出部50により行われる処理を、命令実行遅延時間算出処理という。
 メモリアクセス遅延時間算出部600は、キャッシュ構成情報610と実行順序情報301とアクセス先情報401を取得する。キャッシュ構成情報610には、実行計算機のキャッシュ構成が示される。また、メモリアクセス遅延時間算出部600は、キャッシュ構成情報610と実行順序情報301とアクセス先情報401に基づき、各基本ブロックが実行計算機で実行される際のキャッシュメモリの内部状態を模擬して、基本ブロック実行時のメモリアクセスのキャッシュヒット状況を推定する。
 更に、メモリアクセス遅延時間算出部600は、基本ブロックごとに、メモリアクセスのキャッシュヒットまたはキャッシュミスヒットを考慮して、メモリアクセス遅延時間を算出する。そして、メモリアクセス遅延時間算出部600は、算出したメモリアクセス遅延時間が示されるメモリアクセス遅延情報601を生成する。
 遅延時間加算部700は、実行遅延情報501とメモリアクセス遅延情報601とを取得する。また、遅延時間加算部700は、基本ブロックごとに、実行遅延情報501に示される命令実行遅延時間とメモリアクセス遅延情報601に示されるメモリアクセス遅延時間とを加算して、基本ブロックごとの総遅延時間を得る。具体的には、遅延時間加算部700は、ハザード遅延解析部500から出力される実行遅延情報501とメモリアクセス遅延時間算出部600から出力されるメモリアクセス遅延情報601の中で、同じ基本ブロックの実行遅延情報501とメモリアクセス遅延情報601とを抽出する。そして、抽出した実行遅延情報501に示される命令実行遅延時間とメモリアクセス遅延情報601に示されるメモリアクセス遅延時間とを加算する。なお、遅延時間加算部700は、命令実行遅延時間が算出されていない基本ブロック、すなわち、測定区間に含まれていない基本ブロックについては、メモリアクセス遅延時間をそのまま当該基本ブロックの総遅延時間として扱う。
 更に、遅延時間加算部700は、基本ブロックごとの総遅延時間を積算して、プログラム100の実行性能値(総遅延時間)を得る。
***動作の説明***
 図2は、本実施の形態に係るプログラム性能見積もり装置10の動作例を示す。
 以下、図2を参照して、プログラム性能見積もり装置10の動作例を説明する。
 ステップS80において、プログラム分割部200は、プログラム100を分割し、基本ブロック情報201を生成する。
 図4は、ステップS80の詳細を示す。
 先ず、ステップS201において、プログラム分割部200は、命令列を入れるための変数である基本ブロックNを生成する。
 次に、ステップS202において、プログラム分割部200は、プログラム100から命令列を1つ読み出す。
 次に、ステップS203において、プログラム分割部200は、ステップS202で読み出した命令列が分岐命令又はジャンプ命令であるかを判定する。
 ステップS202で読み出した命令列が分岐命令でもジャンプ命令でもない場合(ステップS203でNO)は、プログラム分割部200は、ステップS202で読み出した命令列を基本ブロックNに追加する。そして、プログラム分割部200は、再度ステップS202の動作を行う。
 一方、ステップS202で読み出した命令列が分岐命令又はジャンプ命令である場合(ステップS203でYES)は、プログラム分割部200は、基本ブロックと、基本ブロック番号と、先頭アドレスとの組を、基本ブロック情報201に追加し、Nの値を1つ増やす。
 具体的には、プログラム分割部200は、基本ブロックに連番である基本ブロック番号を付与する。更に、プログラム分割部200は、基本ブロック(命令列の集合)と、基本ブロック番号と、基本ブロックの先頭アドレスとの組から基本ブロック情報201を生成する。
 基本ブロック情報201の例を図5に示す。
 図5に示すように、基本ブロック情報201は、基本ブロック番号2011、先頭アドレス2012、命令列2013で構成される。基本ブロック番号2011は各基本ブロックに付与される連番である。先頭アドレス2012は、基本ブロックの先頭命令のメモリアドレスである。命令列2013は、命令列の集合であり、基本ブロックに相当する。
 以下では、図5の基本ブロック情報201の各レコード(各行)を基本ブロックレコードという。
 次に、図2に戻り、ステップS90において、実行順序解析部300が基本ブロックの実行順序を解析し、また、実行順序情報301を生成する。
 次に、ステップS91において、アクセス先解析部400が基本ブロックのアクセス先を解析し、また、アクセス先情報401を生成する。
 図6は、ステップS90及びステップS91の詳細を示す。
 先ず、ステップS301において、アクセス先解析部400は、基本ブロック情報201から、先頭の基本ブロックレコード[0]を読み出す。
 次に、アクセス先解析部400は、ステップS302において、読み出した基本ブロックレコードの命令列2013を解析して、命令列2013にメモリアクセス命令が含まれているか否かを検査する。
 そして、命令列2013にメモリアクセス命令が含まれている場合(ステップS303でYES)に、アクセス先解析部400は、ステップS304で、メモリアクセス命令のアクセス先を解析し、アクセス先をアクセス先情報401に追加する。アクセス先情報401は、基本ブロック番号とアクセス先とを対応付ける情報である。アクセス先解析部400は、アクセス先情報401を、新しいデータとして生成してもよいが、本実施の形態では、アクセス先解析部400は、基本ブロック情報201にアクセス先情報の列を追加して、アクセス先情報401を生成するものとする。
 図7は、アクセス先情報401の例を示す。図7では、基本ブロック情報201にアクセス先情報2014がマージされている。
 命令列2013にメモリアクセス命令が含まれていない場合(ステップS303でNO)は、アクセス先解析部400は、ステップS304をスキップしてステップS305を行う。
 ステップS305では、アクセス先解析部400は、次に実行される基本ブロックのアドレス(ジャンプ先(X))を計算する。
 次に、ステップS306において、アクセス先解析部400は、ジャンプ先(X)がプログラムの最後であるか又は測定区間外であるかを判定する。
 ジャンプ先(X)がプログラムの最後又は測定区間外である場合(ステップS306でYES)は、アクセス先解析部400は処理を終了する。
 一方、ジャンプ先(X)がプログラムの最後及び測定区間外のいずれでもない場合(ステップS306でNO)は、実行順序解析部300が、基本ブロック番号(N)を実行順序情報301に追加する。
 次に、アクセス先解析部400がジャンプ先の基本ブロックレコード[X]を基本ブロック情報201から読み出し、基本ブロックレコード[X]についてステップS302を行う。
 図8は、実行順序情報301の例を示す。
 図8に示す通り、実行順序情報301は、実行順3011と、実行順3011に対応する基本ブロック番号3012で構成される。基本ブロック番号3012は、図5に示す基本ブロック番号2011と同じである。
 次に、図2に戻り、ステップS100にて、遅延時間の算出が行われる。
 つまり、命令実行遅延時間算出部50が測定区間内の基本ブロックの命令実行遅延時間を算出し、メモリアクセス遅延時間算出部600が基本ブロックごとにメモリアクセス遅延時間を算出する。また、遅延時間加算部700が命令実行遅延時間とメモリアクセス遅延時間とを加算し、更に、プログラム100の全体の総遅延時間を算出する。
 図3は、ステップS100の詳細を示す。
 ステップS101において、メモリアクセス遅延時間算出部600が、実行順序情報301に従って、アクセス先情報401を読み出し、また、基本ブロック情報201から各基本ブロックレコードを読み出す。
 次に、ステップS102において、メモリアクセス遅延時間算出部600が、読み出したアクセス先情報401と、キャッシュ構成情報610とに基づき、キャッシュシミュレーションを行って、基本ブロックごとに、基本ブロック実行時のキャッシュ状態を推定し、基本ブロック実行時のメモリアクセスがキャッシュにヒットするか否かを判定する。
 次に、ステップS103において、メモリアクセス遅延時間算出部600が、ステップS102におけるキャッシュヒット/ミス判定結果に基づいて、基本ブロック実行時のメモリアクセス時間を算出する。
 メモリアクセス遅延時間算出部600は、各基本ブロックのメモリアクセス時間が示されるメモリアクセス遅延情報601を遅延時間加算部700に出力する。
 ステップS101~S103に並行して、命令実行遅延時間算出部50が、基本ブロック内のハザード遅延解析を行う。
 より具体的には、解析実施判定部510が、ステップS104において、実行順序情報301に基づいて基本ブロック情報201から基本ブロックを読み出す。
 次に、解析実施判定部510は、ステップS105において、読み出した基本ブロックレコードに含まれる基本ブロックが、測定区間情報520に示される測定区間に含まれるかどうかを判定する。測定区間情報520には測定区間に含まれる基本ブロックの基本ブロック番号が記載されている。解析実施判定部510は、読み出した基本ブロックレコードの基本ブロック番号が測定区間情報520に記載されているか否かを判定して、当該基本ブロックが測定区間に含まれるかどうかを判定する。
 基本ブロックが測定区間に含まれる場合(ステップS105でYES)は、ハザード遅延解析部500が、当該基本ブロックのハザード遅延解析を行い、基本ブロックを実行した際のパイプラインハザードを考慮した命令実行遅延時間を算出する。つまり、解析実施判定部510が測定区間に含まれる基本ブロックの基本ブロック情報201をハザード遅延解析部500に出力し、ハザード遅延解析部500は、基本ブロック情報201とCPU構成情報530に基づいてハザード遅延解析を行う。
 ハザード遅延解析部500は、測定区間に含まれる基本ブロックの実行遅延時間が示される実行遅延情報501を遅延時間加算部700に出力する。
 実行遅延情報501は、基本ブロック番号と命令実行遅延時間とを対応付けた情報である。ハザード遅延解析部500は、実行遅延情報501を、新しいデータとして生成してもよいが、本実施の形態では、ハザード遅延解析部500は、基本ブロック情報201に命令実行遅延時間の列を追加して、実行遅延情報501を生成するものとする。
 図9は、実行遅延情報501の例を示す。図9では、基本ブロック情報201に命令実行遅延時間2015がマージされている。
 なお、測定区間に含まれる基本ブロックとして複数の基本ブロックが解析実施判定部510により抽出された場合は、ハザード遅延解析部500は、抽出された基本ブロックごとに、記述内容が同じ基本ブロックに対して命令実行遅延時間が算出済みであるか否かを判定する。そして、ハザード遅延解析部500は、記述内容が同じ基本ブロックに対して命令実行遅延時間が算出済みである基本ブロックに対しては命令実行遅延時間の算出を省略して、算出済みの命令実行遅延時間を適用する。
 次に、遅延時間加算部700が、ステップS107において、基本ブロックごとに、メモリアクセス遅延時間と命令実行遅延時間との加算を行う。加算により、遅延時間加算部700は、基本ブロックの総遅延時間を得る。そして、遅延時間加算部700は、先行する基本ブロックの総遅延時間の累計値に、ステップS107で得られた基本ブロックの総遅延時間を加算する。
 なお、ステップS105でNOと判定された基本ブロックについては命令実行遅延時間が算出されないので、遅延時間加算部700は、メモリアクセス遅延時間を基本ブロックの総遅延時間として扱う。そして、遅延時間加算部700は、この総遅延時間を、先行する基本ブロックの総遅延時間の累計値に加算する。
 ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700は、これら一連の処理をプログラム100の最後に至るまで(ステップS108でYES)繰り返し、プログラム100の総遅延時間を得る。
***実施の形態の効果の説明***
 以上、本実施の形態によれば、測定区間に含まれない基本ブロックの命令実行遅延時間の計算を省略することができる。このため、プログラムの性能見積もりを効率的に行うことができる。
 従って、本実施の形態によれば、例えば、大規模なソフトウェアの実行性能見積もり、特にOSを含むような大規模なシステムの性能見積もりにおいて、性能見積もりの必要性が小さいが性能見積もり処理の負荷が比較的重い処理、例えば、システム全体の初期化処理の性能見積もりを省略することが可能となる。そして、性能見積もりの必要性の大きい、初期化処理完了後のシステム動作時の性能見積もり結果を従来よりも早期に得ることができる。
 このように、本実施の形態では、性能見積もりが効率的に行える。
***ハードウェア構成の説明***
 最後に、プログラム性能見積もり装置10のハードウェア構成の補足説明を行う。
 図10に示すプロセッサ900は、プロセッシングを行うIC(Integrated Circuit)である。
 プロセッサ900は、CPU、DSP(Digital Signal Processor)等である。
 図10に示す記憶装置901は、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)、フラッシュメモリ等である。
 図10に示す通信インタフェース902は、データを受信するレシーバー及びデータを送信するトランスミッターを含む。
 通信インタフェース902は、例えば、通信チップ又はNIC(Network Interface Card)である。
 通信インタフェース902は、ネットワークに接続される。通信インタフェース902は、例えば、IP-VPN(Internet Protocol Virtual Private Network)、広域LAN(Local Area Network)、ATM(Asynchronous Transfer Mode)ネットワークといったWAN(Wide Area Network)、あるいは、インターネットに接続される。
 また、図10には、図示していないが、ディスクドライブ、ディスプレイ、マウス、キーボード、プリンタ等を備えていてもよい。ディスクドライブは、Compact Disc(CD)、DVD、ブルーレイ(登録商標)ディスク、Floppy Disk(FD)等のディスクに対してデータのリード/ライトを制御する。また、プログラム性能見積もり装置10は、マウスの代わりに、タッチパネル、タッチパッド、トラックボール、ペンタブレット、その他ポインティングデバイスを備えてもよい。また、プログラム性能見積もり装置10は、プリンタに接続していてもよい。
 また、記憶装置901には、ブートプログラム、OS(Operating System)等のプログラムも記憶されている。
 OSの少なくとも一部は、プロセッサ900により実行される。
 プロセッサ900はOSの少なくとも一部を実行しながら、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の機能を実現するプログラムを実行する。
 プロセッサ900がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。
 また、プログラム性能見積もり装置10は、プロセッサ900を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の機能を実現するプログラムの実行を分担する。それぞれのプロセッサは、プロセッサ900と同じように、プロセッシングを行うICである。
 また、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の処理の結果を示す情報、データ、信号値及び変数値の少なくともいずれかが、記憶装置901、プロセッサ900内のレジスタ及びキャッシュメモリの少なくともいずれかに記憶される。
 また、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の機能を実現するプログラムは、磁気ディスク、FD、光ディスク、CD、ブルーレイ(登録商標)ディスク、DVD等の可搬記憶媒体に記憶されてもよい。
 また、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700の「部」を、「回路」又は「工程」又は「手順」又は「処理」に読み替えてもよい。
 また、プログラム性能見積もり装置10は、ロジックIC(Integrated Circuit)、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)といった電子回路により実現されてもよい。
 この場合は、プログラム分割部200、実行順序解析部300、アクセス先解析部400、ハザード遅延解析部500、解析実施判定部510、メモリアクセス遅延時間算出部600及び遅延時間加算部700は、それぞれ電子回路の一部として実現される。
 なお、プロセッサ及び上記の電子回路を総称してプロセッシングサーキットリーともいう。
 10 プログラム性能見積もり装置、50 命令実行遅延時間算出部、100 プログラム、200 プログラム分割部、201 基本ブロック情報、300 実行順序解析部、301 実行順序情報、310 周辺装置/IO情報、400 アクセス先解析部、401 アクセス先情報、500 ハザード遅延解析部、501 実行遅延情報、510 解析実施判定部、520 測定区間情報、530 CPU構成情報、600 メモリアクセス遅延時間算出部、601 メモリアクセス遅延情報、610 キャッシュ構成情報、700 遅延時間加算部、701 プログラム実行性能情報、900 プロセッサ、901 記憶装置、902 通信インタフェース、903 入出力インタフェース、904 バス。

Claims (7)

  1.  複数の命令列が含まれるプログラムを複数のブロックに分割するプログラム分割部と、
     前記プログラム内で命令実行遅延時間の算出の対象の範囲として指定された算出対象範囲が示される算出対象範囲情報を取得し、前記複数のブロックから前記算出対象範囲に含まれるブロックを抽出し、抽出したブロックの命令実行遅延時間を算出する命令実行遅延時間算出部とを有する解析装置。
  2.  前記命令実行遅延時間算出部は、
     抽出したブロックを実行する際のパイプラインハザードの発生状況を推定して、抽出したブロックの命令実行遅延時間を算出する請求項1に記載の解析装置。
  3.  前記解析装置は、更に、
     ブロックごとに、ブロックを実行する際のキャッシュヒット状況を推定して、メモリアクセス遅延時間を算出するメモリアクセス遅延時間算出部と、
     ブロックごとに、前記命令実行遅延時間算出部により算出された命令実行遅延時間と、前記メモリアクセス遅延時間算出部により算出されたメモリアクセス遅延時間とを加算する遅延時間加算部とを有する請求項1に記載の解析装置。
  4.  前記命令実行遅延時間算出部は、
     前記算出対象範囲に含まれるブロックとして複数のブロックを抽出した場合に、抽出したブロックごとに、記述内容が同じブロックに対して命令実行遅延時間が算出済みであるか否かを判定し、記述内容が同じブロックに対して命令実行遅延時間が算出済みであるブロックに対しては命令実行遅延時間の算出を省略して、算出済みの命令実行遅延時間を適用する請求項1に記載の解析装置。
  5.  前記メモリアクセス遅延時間算出部は、
     命令メモリへのアクセスでのキャッシュヒット状況及びデータメモリへのアクセスでのキャッシュヒット状況を推定して、前記命令メモリへのアクセスでのメモリアクセス遅延時間及び前記データメモリへのアクセスでのメモリアクセス遅延時間を算出する請求項3に記載の解析装置。
  6.  コンピュータが、複数の命令列が含まれるプログラムを複数のブロックに分割し、
     前記コンピュータが、前記プログラム内で命令実行遅延時間の算出の対象の範囲として指定された算出対象範囲が示される算出対象範囲情報を取得し、前記複数のブロックから前記算出対象範囲に含まれるブロックを抽出し、抽出したブロックの命令実行遅延時間を算出する解析方法。
  7.  複数の命令列が含まれるプログラムを複数のブロックに分割するプログラム分割処理と、
     前記プログラム内で命令実行遅延時間の算出の対象の範囲として指定された算出対象範囲が示される算出対象範囲情報を取得し、前記複数のブロックから前記算出対象範囲に含まれるブロックを抽出し、抽出したブロックの命令実行遅延時間を算出する命令実行遅延時間算出処理とをコンピュータに実行させる解析プログラム。
PCT/JP2017/009613 2017-03-09 2017-03-09 解析装置、解析方法及び解析プログラム WO2018163387A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017548252A JPWO2018163387A1 (ja) 2017-03-09 2017-03-09 解析装置、解析方法及び解析プログラム
PCT/JP2017/009613 WO2018163387A1 (ja) 2017-03-09 2017-03-09 解析装置、解析方法及び解析プログラム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/009613 WO2018163387A1 (ja) 2017-03-09 2017-03-09 解析装置、解析方法及び解析プログラム

Publications (1)

Publication Number Publication Date
WO2018163387A1 true WO2018163387A1 (ja) 2018-09-13

Family

ID=63448733

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/009613 WO2018163387A1 (ja) 2017-03-09 2017-03-09 解析装置、解析方法及び解析プログラム

Country Status (2)

Country Link
JP (1) JPWO2018163387A1 (ja)
WO (1) WO2018163387A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03282642A (ja) * 1990-03-29 1991-12-12 Nec Corp 実行命令数カウントシステム
JPH10240582A (ja) * 1997-03-03 1998-09-11 Toshiba Corp 計算機システムの性能評価方法及び装置
JP2006023852A (ja) * 2004-07-06 2006-01-26 Handotai Rikougaku Kenkyu Center:Kk ソフトウェア検証モデル生成方法
JP2010009175A (ja) * 2008-06-25 2010-01-14 Panasonic Corp プログラム性能見積もり装置
JP2011258058A (ja) * 2010-06-10 2011-12-22 Mitsubishi Electric Corp 性能予測装置及びコンピュータプログラム及び性能予測方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03282642A (ja) * 1990-03-29 1991-12-12 Nec Corp 実行命令数カウントシステム
JPH10240582A (ja) * 1997-03-03 1998-09-11 Toshiba Corp 計算機システムの性能評価方法及び装置
JP2006023852A (ja) * 2004-07-06 2006-01-26 Handotai Rikougaku Kenkyu Center:Kk ソフトウェア検証モデル生成方法
JP2010009175A (ja) * 2008-06-25 2010-01-14 Panasonic Corp プログラム性能見積もり装置
JP2011258058A (ja) * 2010-06-10 2011-12-22 Mitsubishi Electric Corp 性能予測装置及びコンピュータプログラム及び性能予測方法

Also Published As

Publication number Publication date
JPWO2018163387A1 (ja) 2019-03-14

Similar Documents

Publication Publication Date Title
US10360322B2 (en) Simulation of virtual processors
TWI410864B (zh) 在一處理環境中控制指令執行
US8291359B2 (en) Array concatenation in an integrated circuit design
US8336016B2 (en) Eliminating, coalescing, or bypassing ports in memory array representations
US8307313B2 (en) Minimizing memory array representations for enhanced synthesis and verification
US11734480B2 (en) Performance modeling and analysis of microprocessors using dependency graphs
US20110016455A1 (en) Power Profiling for Embedded System Design
US10437949B1 (en) Scheduling events in hardware design language simulation
Sridharan et al. Using pvf traces to accelerate avf modeling
US10380313B1 (en) Implementation and evaluation of designs for heterogeneous computing platforms with hardware acceleration
US8484591B2 (en) Enhancing redundancy removal with early merging
CN117113890B (zh) 一种cpu芯片设计方法及系统
US6775810B2 (en) Boosting simulation performance by dynamically customizing segmented object codes based on stimulus coverage
US9448909B2 (en) Randomly branching using performance counters
US9280626B2 (en) Efficiently determining Boolean satisfiability with lazy constraints
WO2018163387A1 (ja) 解析装置、解析方法及び解析プログラム
JP6818568B2 (ja) 通信装置、通信仕様差分抽出方法及び通信仕様差分抽出プログラム
US9852259B2 (en) Area and/or power optimization through post-layout modification of integrated circuit (IC) design blocks
WO2018150588A1 (ja) 情報処理装置、情報処理方法及び情報処理プログラム
JP5390464B2 (ja) シミュレーション装置、シミュレーション装置の制御方法およびプログラム
JP7210917B2 (ja) 検証情報生成装置、検証情報生成方法、及び検証情報生成プログラム
JP5233354B2 (ja) プロパティ検証システム、プロパティ検証方法、及びプログラム
JP6234640B2 (ja) シミュレーション装置及びシミュレーション方法及びシミュレーションプログラム
US20200174072A1 (en) Stabilised failure estimate in circuits
Béchennec et al. Improving Processor Hardware Compiled Cycle Accurate Simulation using Program Abstraction

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2017548252

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17900263

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17900263

Country of ref document: EP

Kind code of ref document: A1