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

Statistical method and device

A statistical method and counter technology, applied in the computer field, can solve the problems of increasing the burden on the processor and reducing the efficiency of counting, and achieve the effect of reducing the burden and improving the efficiency.

Inactive Publication Date: 2014-04-30
HUAWEI TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Counting through variables in the software requires running a computer program, reducing the efficiency of counting and increasing the burden on the processor

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
  • Statistical method and device
  • Statistical method and device
  • Statistical method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] The embodiment of the present invention provides a statistical method, see figure 1 , figure 1 It is a flow chart of a statistical method provided by an embodiment of the present invention, and the method includes:

[0022] 101: Execute a first computer instruction.

[0023] During specific implementation, there may be multiple implementation manners for the processor to execute the first computer instruction, which is not specifically limited in the present invention. For example, after the program counter (program counter, PC) calculates the address of the first computer instruction, the address register (Address Register, AR) sends the address of the first computer instruction to the cache (cache) through the address bus. The instruction pipeline fetches the first computer instruction from the cache and sends it to an instruction register (Instruction Register, IR). An instruction decoder (Instruction Decoder, ID) decodes the first computer instruction. The post-...

Embodiment 2

[0051] An embodiment of the present invention provides a statistical device. see Figure 4 , Figure 4 It is a schematic diagram of the statistical device provided by the embodiment of the present invention. The unit includes:

[0052] The execution unit 401 is configured to execute a first computer instruction.

[0053] During specific implementation, there may be multiple implementation manners for the processor to execute the first computer instruction, which is not specifically limited in the present invention. For example, after the PC calculates the address of the first computer instruction, the AR sends the address of the first computer instruction to the cache through the address bus. The instruction pipeline fetches the first computer instruction from the cache and sends it to the IR. The ID decodes the first computer instruction. The post-decoding processor issues various control information needed to execute the first computer instruction through the control c...

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

Provided is a statistical method, including: executing a first computer instruction (101); the value of a first counter is increased by 1 when the first computer instruction has the corresponding first counter address, wherein the first computer instruction and the first counter address are stored in the cache of a processor (102). Furthermore, also provided is a corresponding device. By way of the statistical method and device, no computer program need run when counting the number of times the computer instruction is executed, improving the counting efficiency and reducing the load on the processor.

Description

technical field [0001] The embodiment of the present invention relates to computer technology, in particular to a statistical method and device. Background technique [0002] There are many scenarios in the communication field that need to be counted. For example, collect statistics on the number of packets forwarded by the outbound interface; collect statistics on the number of packets discarded due to packet header verification errors, etc. [0003] Counting through variables in communication software is the main way to realize counting. The characteristic of this scheme is that the counter is defined as a variable or an array. When counting is required, perform an accumulate operation on a variable, or perform an accumulate operation on an array member. [0004] The inventor has found that the prior art has the following technical problems: [0005] Counting through variables in the software requires running a computer program, which reduces the efficiency of counting...

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): G06F9/32
CPCG06F11/3466G06F2201/88
Inventor 薛蕴全
Owner HUAWEI TECH CO LTD