Method and apparatus for function running state statistics

A technology of statistical functions and running status, applied in the computer field, can solve problems such as complex implementation, and achieve the effect of simple implementation and strong versatility

Inactive Publication Date: 2009-07-08
NEW H3C TECH CO LTD
View PDF0 Cites 21 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the next time you encounter a situation where you need to count the running status of the function, you need to add the statistical code to the source code again
It

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
  • Method and apparatus for function running state statistics
  • Method and apparatus for function running state statistics
  • Method and apparatus for function running state statistics

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0050] The embodiment of the present invention provides a scheme for counting the running status of functions, the basic idea of ​​which is as follows:

[0051] Set the proxy function used to obtain the running status of the statistical function, as well as the first hook function and the second hook function.

[0052] Among them, the first hook function is called before the counted function, and records the current running information of the system when called; the second hook function is called after the counted function, records the current running information of the system when called, and according to itself and the first The current running information of the system recorded by the hook function counts the running status of the counted functions. A hook function refers to a class of functions that can be dynamically embedded into the source code when needed, which is equivalent to "hooking" on the source code, and the hook function can be "extracted" from the source code...

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 method and a device for recording function operation states. In the invention, a proxy function, a first hook function and a second hook function are preset. When the function states are recorded, the function states for recording are dynamically replaced by proxy function under the triggering of a guest replacement command, and the order of the proxy function change into the first hook function, the function for recording and the second hook function. Two hook functions have recording function, so that the state record to the function for recording can be conveniently realized through dynamic replacement.

Description

technical field [0001] The invention relates to a function statistics technology in the computer field, in particular to a method and a device for counting the running status of a function. Background technique [0002] Communication products are generally embedded systems based on task scheduling. A task is the smallest operating unit that gathers various system resources to realize a specific function in an embedded system. A task includes multiple functions, and the functions in the task can be considered as the smallest constituent unit of the task. [0003] Embedded systems usually rely on tasks to actively release CPU resources to implement inter-task scheduling. If one or some tasks take too long, other tasks will not be scheduled, resulting in an infinite loop. The clock interrupt provides a statistical function of the time occupied by each task. When it is detected that a task in the system takes too long, the call stack will be printed on the screen. The call ...

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
IPC IPC(8): G06F11/36G06F9/48
Inventor 陈世兴王森波
Owner NEW H3C TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products