Method and device for registering function to detection point, storage medium and terminal

A technology of detecting points and functions, which is applied in the computer field, can solve problems such as complex operations and damage to the code execution process, and achieve the effect of avoiding interruption overhead

Pending Publication Date: 2021-12-21
CHENGDU OPPO TELECOMM TECH CORP LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The simpler method is to add log printing information to the function corresponding to the kernel code, but this method often requires recompiling the kernel or modules, restarting the device, etc., the operation is more complicated and may even destroy the original code execution 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
  • Method and device for registering function to detection point, storage medium and terminal
  • Method and device for registering function to detection point, storage medium and terminal
  • Method and device for registering function to detection point, storage medium and terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] In order to make the purpose, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, The described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.

[0025] In the description of the present application, it should be understood that the terms "first", "second" and so on are used for descriptive purposes only, and should not be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise specified and ...

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 embodiment of the invention discloses a method and device for registering a function to a detection point, a storage medium and a terminal, and the method comprises the steps: obtaining an initial address of a determined target detection point function in a kernel symbol table, and obtaining the address length of any detection point function in the kernel symbol table, and obtaining addresses corresponding to a system entry function and a system exit function based on the initial address and the address length, and adding the addresses corresponding to the system entry function and the system exit function in a registration function for registering a hook function to the detection point. According to the method and the device, the corresponding addresses of the existing tracepoint (namely the system entry function and the system exit function) in the kernel symbol table can be found, the addresses of the tracepoint can be added in the registration function, namely, the addresses corresponding to the system entry function and the system exit function can be hooked to, and on the basis of not influencing the system performance, and all system calls of the monitoring kernel are realized.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular to a method, device, storage medium and terminal for registering a function to a detection point. Background technique [0002] During the debugging process of the kernel or modules, developers often need to know whether some of the functions are called, when they are called, whether the execution is correct, and what the input parameters and return values ​​of the functions are, and so on. The simpler method is to add log printing information to the corresponding function of the kernel code, but this method often requires recompiling the kernel or module, restarting the device, etc., the operation is more complicated and may even destroy the original code execution process. [0003] With the use of kprobes technology, users can define their own callback functions, and then dynamically insert probes into almost all functions (some functions are not detectable, such a...

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 Applications(China)
IPC IPC(8): G06F11/36
CPCG06F11/3624G06F11/3644
Inventor 李科
Owner CHENGDU OPPO TELECOMM TECH CORP 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