Unlock instant, AI-driven research and patent intelligence for your innovation.

CPI (Cycle per Instruction) precise measurement method based on CPU (Central Processing Unit) hardware performance monitoring counter

A hardware performance monitoring and precise measurement technology, applied in software testing/debugging, etc., can solve problems such as misleading, poor accuracy, and unusability caused by tuning work, and achieve the effect of low resource overhead

Active Publication Date: 2015-05-20
TSINGHUA UNIV
View PDF2 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the accuracy of fine-grained CPI is poor
Even the CPI at the function level, its error is enough to mislead the programmer's tuning work
And for finer-grained CPI (such as basic block (the basic block refers to a continuous program statement sequence, the control flow enters from its beginning and leaves from its end, without interruption or branch in between) level CPI and instruction Level CPI), due to its poor accuracy, it has been completely unusable in the actual tuning process

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • CPI (Cycle per Instruction) precise measurement method based on CPU (Central Processing Unit) hardware performance monitoring counter
  • CPI (Cycle per Instruction) precise measurement method based on CPU (Central Processing Unit) hardware performance monitoring counter
  • CPI (Cycle per Instruction) precise measurement method based on CPU (Central Processing Unit) hardware performance monitoring counter

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0033] Fine-grained CPI is jointly obtained by fine-grained instruction frequency and fine-grained clock cycle. The method used in the present invention is still to separately sample the fine-grained instruction frequency and the fine-grained clock cycle, and then combine the two samples to obtain the fine-grained CPI. However, when acquiring the frequency of fine-grained instructions, the present invention samples jump history records, and obtains precise fine-grained instruction frequency through certain transformations. When acquiring a fine-grained clock cycle, the present invention uses a random sampling method to overcome possible system errors in the sampling proce...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a CPI (Cycle Per Instruction) precise measurement method based on a CPU (Central Processing Unit) hardware performance monitoring counter, which comprises the following steps of: S1, sampling jump history records to obtain jump frequencies and obtain fine-grained instruction frequencies according to the jump frequencies; S2, obtaining clock cycles by a random sampling method; and S3, obtaining fine-grained CPI by dividing the fine-grained instruction frequencies by the fine-grained clock cycles. By sampling a register for storing the jump history records, the precise fine-grained instruction frequencies are obtained, and the resource overhead of the sampling method is low; and by the random sampling method, the precise fine-grained clock cycles are obtained. The fine-grained instruction frequencies are combined with the fine-grained clock cycles to obtain the precise fine-grained CPI.

Description

technical field [0001] The invention relates to the technical field of computer software performance analysis, in particular to a CPI accurate measurement method based on a CPU hardware performance monitoring counter. Background technique [0002] The number of clock cycles (Cycle Per Instruction, CPI) consumed by each instruction is an important observation index in the process of program performance analysis. This indicator can visually show the average number of clock cycles required for each instruction in the program. If this metric is large, it indicates a performance problem in the program. This also means that the program has a greater opportunity for performance optimization. [0003] In the traditional program optimization process, CPI is often the first indicator that programmers observe when performing performance tuning. When programmers get the specific CPI value, they will use the program performance counter to divide it into a CPI stack, and specifically c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36
Inventor 郑纬民陈德颢陈文光
Owner TSINGHUA UNIV