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

Code tracking method and device

A code and target technology, applied in the field of code tracking methods and devices, can solve problems such as inaccessibility, heavy code transformation workload, and inability to further dig down the code path, achieving the effect of high tracking accuracy and strong flexibility

Active Publication Date: 2018-06-29
CHINA MOBILE COMM GRP CO LTD +1
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the process of realizing the embodiment of the present invention, the inventor found that the C++ code instrument analysis framework has great defects: such as a large amount of code transformation work, calls to operating system-level components, and some encapsulated dynamic libraries cannot further dig down the code Path, the granularity of performance positioning can only go to the function level, but not to the specific code level

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

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] figure 1 It shows a schematic flowchart of a code tracking method provided by an embodiment of the present invention, see figure 1 , the method includes the following steps:

[0050] 110. Obtain the data collected by the pre-built plug-in, the pre-built plug-in is attached to the target process running on the production environment;

[0051] It should be noted that when performing code tracking, the plug-in is first attached to the target process when the production environment is running through the JVM code instrument; then, when the business is opened to the outside world, the parameters and return values ​​are captured to provide performance hotspot analysis. data support.

[0052] 120. Perform performance hotspot analysis on the acquired data, and determine the target interface according to the analysis results;

[0053] It should be noted that, based on the data obtained in step 110, the target interface is determined through preset criteria;

[0054] Wherein,...

Embodiment 2

[0061] figure 2 It shows a schematic diagram of the principle of a code tracking method provided by an embodiment of the present invention, see figure 2 , the principle of the method is as follows:

[0062] 210. Attach the plug-in to the running process of the production environment through the JVM code instrument, capture parameters and return values, provide data support for finding the target injection point, and improve the search efficiency of the target injection point;

[0063] 220. Find and obtain the target injection point based on the parameters and return values ​​captured by the plug-in; the JVM code instrument injects the predefined sensor into the target injection point, and the sensor captures the transaction middleware interface parameter value;

[0064] 230. The code slicing program assembles and generates test cases according to the transaction middleware interface parameter values;

[0065] 240-250. Perform service detection processing on the production ...

Embodiment 3

[0072] The web front-end system indirectly invokes the transaction middle layer by calling some encapsulation interfaces. There are two technical implementation methods here: first, the JVM directly calls the production isolation middleware CICS / test transaction middleware Tuxedo through the transaction gateway; second, indirectly through the enterprise bus Call CICS / Tuxedo. Among them, the first method includes three steps.

[0073] see image 3 , the first step specifically includes:

[0074] 310. Perform stack analysis on the call stack obtained by the code instrument suite;

[0075] 320. On the entire call stack, select the lowest-end performance hotspot;

[0076] It should be noted that the lower-level business implementation often has wider implantation capabilities and can cover most business scenarios. If the prompt is that the ongoing thread is waiting for Object.wait(), it is actually waiting for the return of a synchronous or asynchronous call, which is of littl...

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 code tracking method and device. The method comprises the steps of obtaining data collected by a pre-established plug-in, wherein the pre-established plug-in is attached to a target process; conducting performance hotspot analysis on the obtained data, and determining a target interface according to the analysis result; under a production environment, slicing the target interface to extract program segments corresponding to performance hotspots; under a testing environment, tracking the program segments in the running state to obtain path tracking information. By means of the code tracking method and device, the performance hotspots are separated from massive running codes in a slicing mode, and are separately run under the testing environment; compared with the prior art, an existing application does not need to be subjected to any code transformation, and the code tracking method and device have the advantages of having high tracking precision and high flexibility.

Description

technical field [0001] The embodiment of the present invention relates to the field of communication technologies, and in particular to a code tracking method and device. Background technique [0002] Trading applications based on the J2EE architecture can implement code injection at runtime through JVM Instrumentation (code instrumentation), which can selectively trace the code path without changing the original appearance of the program, and capture parameters and return values, which can help operation and maintenance personnel quickly find Performance hotspots to quickly improve user experience. At present, most core transactions of operators’ networks in the traditional mode are implemented based on native applications, such as programs developed in C / C++ running on transaction middleware CICS or Tuxedo. level cannot drill down further to native. [0003] In the face of native applications, the existing technical means are implemented through the Basic Instrumentation...

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/3628
Inventor 何启明
Owner CHINA MOBILE COMM GRP CO LTD