Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for detecting code compiling result

A detection method and code technology, applied in the field of code compilation results detection, can solve problems such as inaccurate statistical results, and achieve the effect of solving inaccurate statistical results and improving accuracy

Active Publication Date: 2016-08-10
TENCENT TECH (SHENZHEN) CO LTD
View PDF3 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Embodiments of the present invention provide a method and device for detecting code compilation results, so as to at least solve the technical problem of inaccurate statistical results of code line execution in the process of code compilation in related technologies

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 detecting code compiling result
  • Method and device for detecting code compiling result
  • Method and device for detecting code compiling result

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] According to an embodiment of the present invention, a method embodiment of a method for detecting a code compilation result is provided.

[0033] Optionally, in this embodiment, the method for detecting the result of code compilation above can be applied to such as figure 2 In the hardware environment constituted by the server 102 and the terminal 104 as shown. Such as figure 2 As shown, the server 102 is connected to the terminal 104 through a network. The above-mentioned network includes but not limited to: a wide area network, a metropolitan area network or a local area network. The terminal 104 is not limited to a PC, a mobile phone, a tablet computer, and the like. The data processing method in the embodiment of the present invention may be executed by the server 102, may also be executed by the terminal 104, and may also be executed jointly by the server 102 and the terminal 104. Wherein, the execution of the data processing method of the embodiment of the pr...

Embodiment 2

[0067] According to an embodiment of the present invention, a device for detecting a code compilation result for implementing the above method for detecting a code compilation result is also provided. Figure 9 is a schematic diagram of a detection device for code compilation results according to an embodiment of the present invention, such as Figure 9 As shown, the device may include:

[0068] The first obtaining module 22 is used to obtain the information of the basic block from the compilation information file generated by compiling the source code, wherein the information of each basic block includes: a section of code in the source code that is recorded as compiled The line number of code line; The second acquisition module 24 is used to obtain the line number of effective code line from source code; Detection module 26 is used to detect whether there is a line number of missing record in the line number of effective code line, wherein, The line number of missing record...

Embodiment 3

[0091] According to an embodiment of the present invention, there is also provided a server or a terminal for implementing the method for detecting the above code compilation result.

[0092] Figure 14 is a structural block diagram of a terminal according to an embodiment of the present invention, such as Figure 14 As shown, the terminal may include: one or more (only one is shown in the figure) processor 201, memory 203, and transmission device 205 (such as the sending device in the above-mentioned embodiment), such as Figure 14 As shown, the terminal may also include an input and output device 207 .

[0093] Wherein, the memory 203 can be used to store software programs and modules, such as program instructions / modules corresponding to the method and device for detecting code compilation results in the embodiment of the present invention, and the processor 201 runs the software programs and modules stored in the memory 203, In this way, various functional applications a...

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 detecting a code compiling result. The method comprises the following steps of obtaining information of basic blocks from a compiler information file generated by compiling a source code, wherein information of each basic block comprises a line number of a code line which is recorded to be complied in a piece of code in the source code; obtaining a line number of an effective code line from the source code; detecting whether a line number which is left out exists in the line number of the effective code line, wherein the line number which is left out is a line number which is not recorded in the information of the basic blocks and is located in a line number interval formed by the recorded minimum line number and maximum line number which are included by the information of the basic blocs; and recording the line number which is left out as a line number of the compiled code line when detecting that the line number which is left out exists in the line number of the effective code line. According to the method and the device, a technical problem that the correlation technique has an inaccurate statistical result for the executive condition of the code line in the code compiling process is solved.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for detecting code compilation results. Background technique [0002] At present, in order to ensure the stability of software applications, it is usually necessary to test the software code. Among them, the test code coverage rate is an important test link in the software code test process, and the test code coverage rate is the code line during the code compilation process. Statistics about the execution of the code, such as counting the execution times of the code line. Existing technologies usually use the instrumentation method to count the execution of code lines. The instrumentation method can be specifically described as: adding counting code segments to the source code during the code compilation process, that is, performing instrumentation operations on the source code; And execute the software application after the instrumentation; after the software appli...

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/3616
Inventor 刘华星唐志彬朱乔
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products