Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

97 results about "Code coverage" patented technology

In computer science, test coverage is a measure used to describe the degree to which the source code of a program is executed when a particular test suite runs. A program with high test coverage, measured as a percentage, has had more of its source code executed during testing, which suggests it has a lower chance of containing undetected software bugs compared to a program with low test coverage. Many different metrics can be used to calculate test coverage; some of the most basic are the percentage of program subroutines and the percentage of program statements called during execution of the test suite.

Full-process automatic unit testing method and device for AI chip operator and medium

The invention discloses a full-process automatic unit testing method, device and equipment for an AI chip operator, a medium and a product. The method comprises the following steps: generating an engineering directory and a test framework design document through an architect agent according to operator interface information and a DSL operator design document knowledge base; the method comprises the following steps of: generating a test code for unit test by a software engineer agent according to a test framework design document and a domain knowledge base, and storing the test code in an engineering directory; multiple rounds of interaction are carried out through a software engineer agent and a test engineer agent, a test code is gradually corrected into a target test code which can be successfully compiled, a generated test case can be successfully executed and the generated test case meets the code coverage rate requirement, and a target operator code passing a unit test is obtained; and submitting the target operator code and the target test code which pass the normativity check to a code warehouse through a code auditing engineer agent so as to automatically realize the whole-process unit test of the AI chip operator.
Owner:SHANGHAI YUNSUI TECHNOLOGY CO LTD

Chaotic test scene supplementing method and device, equipment and storage medium

The invention discloses a chaos test scene supplementing method and device, equipment and a storage medium. The method comprises the steps that a software system is analyzed through a micro-service analysis tool, and a chaos test scene corresponding to the software system is generated in combination with a rule engine tool; executing the chaos test scene on a chaos engineering platform, and obtaining scene data when the chaos test scene is executed in combination with a code coverage rate tool; and when the current code coverage rate of the software system does not reach the expectation, inputting the scene data into a pre-trained machine learning model, and supplementing a new chaos test scene based on the machine learning model. According to the method, when the current code coverage rate of the software system does not reach the expectation, a new chaos test scene is supplemented through the machine learning model, and the code coverage rate of the chaos test scene can be improved.
Owner:AGRICULTURAL BANK OF CHINA

Method and system for evaluating test coverage rate based on Java call link

The invention discloses a method and a system for evaluating a test coverage rate based on a Java call link, and relates to the field of software testing. The method comprises the following steps: identifying a difference function according to a first comparison result, and constructing a call chain tree structure by taking the difference function as a root node based on a code call relation graph; analyzing the difference function to obtain a direct code change line of the difference function, based on a call chain tree structure, identifying a related code line on a call chain where each call point is located as a call point code line, and summarizing the direct code change line and the call point code line; and analyzing the code coverage rate data to obtain an actually covered code line, comparing the to-be-tested code line with the actually covered code line, determining coverage rate index data based on a call chain according to a second comparison result, and determining a test coverage rate evaluation result according to the coverage rate index data. The test coverage rate can be evaluated more comprehensively and accurately.
Owner:BEIJING YULORE INNOVATION TECH

Automatic calculation method, system and equipment for incremental code coverage rate and program product

The invention provides an automatic calculation method, system, equipment and program product for incremental code coverage rate, which are applied to the field of software testing, and the method comprises the following steps: receiving a code version change event, collecting and merging binary coverage rate data, obtaining an incremental code change set, and generating a structured coverage rate report. According to the scheme, the incremental code coverage rate can be accurately calculated, and the code quality measurement efficiency is improved.
Owner:CTRIP TRAVEL NETWORK TECH SHANGHAI0

Method and system for testing coverage rate of incremental code

The invention discloses a coverage rate testing method and system for incremental codes, and the method comprises the steps: analyzing a current version code and a reference version code of a target project, so as to recognize a change function; performing influence range analysis on the change function to determine an associated code directly or indirectly influenced by the change function, and taking the change function and the associated code as a target monitoring code; executing acquisition logic at a preset position of the target monitoring code through instrumentation implantation so as to collect execution data of the target monitoring code in the running process; and calculating an incremental coverage rate of the target monitoring code based on the execution data. By analyzing and identifying a change function, analyzing and locking associated codes in combination with an influence range, collecting execution data through instrumentation, calculating an incremental coverage rate, accurately positioning a change point and determining a test range, the problems of resource redundancy and low efficiency of a full test are solved, and the defects of insufficient change positioning and coverage analysis are overcome; and precise quantification of incremental code testing is realized.
Owner:BEIJING FUYOUDUODUO INFORMATION TECH CO LTD

Code coverage rate statistical method and device

The invention discloses a code coverage rate statistical method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: in response to a received software code coverage rate statistical request, implanting a monitoring code into a code of to-be-tested software; obtaining pre-recorded online traffic of the to-be-tested software, performing analysis processing on the online traffic, and starting and executing a code of the to-be-tested software according to an analysis processing result; and obtaining the code execution condition of each component code of the to-be-tested software through the monitoring code, and obtaining the code coverage rate of the to-be-tested software according to the obtained code execution condition. According to the implementation mode, the code coverage rate is reliably and accurately counted, the code of the to-be-tested software is started and executed by using the real online flow, the accuracy and authenticity of the statistical result are ensured, a test case is omitted, and the statistical efficiency is improved.
Owner:BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1

Code coverage rate file superposition method and system

The embodiment of the invention provides a code coverage rate file superposition method and system, and relates to the technical field of software test.The method comprises the steps that an initial code version is tested for the first time to generate a full coverage rate file; testing the new code version updated each time to generate an incremental coverage rate file; wherein the byte quantity of the incremental coverage rate file is smaller than the byte quantity of the full coverage rate file; and carrying out file superposition on the full coverage rate file and the incremental coverage rate file generated by each update test to generate a complete coverage rate file. Through the embodiment of the invention, the problems of long time consumption and large occupied storage space in the superposition process of the code coverage rate file in the related technology are at least solved, and the effect of reducing the time consumption and the occupied storage space in the superposition process of the code coverage rate file is further realized.
Owner:CHINA EVERBRIGHT BANK

Coverage-Guided Code Generation and Fuzzing Methods Based on Large Models

A coverage-guided code generation and fuzzing method based on a large model is proposed to address the problems of existing large model fuzzers, which not only ignore the guiding role of coverage information in the fuzzing loop but also generate prompts too hastily. This invention comprises four stages: prompt generation, fuzzing loop, mutation operator selection, and vulnerability detection. This method proposes a prompt generation method based on expert templates and a fuzzing loop method guided by unequal interval coverage information. The former lowers the barrier to entry for users of CoverFuzz and improves the quality of initial prompts; the latter, guided by coverage information, better covers the object under test to detect vulnerabilities. This invention significantly improves the effectiveness of programs generated by fuzzing based on large models, solves the problem of existing large model-based fuzzers ignoring coverage information, and also achieves higher code coverage.
Owner:HANGZHOU DIANZI UNIV +2

Firmware code coverage statistics method and electronic device

The application discloses a firmware code coverage statistics method and electronic equipment, and relates to the technical field of program detection, and comprises the following steps: responding to a first script construction command, calling an automatic script to insert a stub point code in a firmware code file, and the stub point code comprising a file index, a statistics function and a macro definition; wherein, a first array created by the macro definition records a code line number and an execution frequency, a second array created by the macro definition records a file index, a line number limit value and a first array address; when executing the firmware code file, the statistics function is called when executing the stub point position, the statistics function counts the executed code in the firmware code file according to the first array and the second array, and the firmware coverage is calculated by combining the executed code with the total code of the firmware code file, thereby solving the problems that the related art occupies a large amount of storage and memory and affects the running performance, and achieving the technical effects of reducing the firmware resource occupation and not affecting the firmware running performance.
Owner:INSPUR SUZHOU INTELLIGENT TECH CO LTD

Software testing method, equipment, medium and product

The invention discloses a software testing method and device, a medium and a product, and relates to the technical field of software test.The software testing method includes the steps that coverage rate data of unit testing, integration testing and system testing of target software are collected through a code coverage rate analysis tool, and the coverage rate data are converted into target text files; the coverage rate data comprises execution times and coverage rates of the codes; storing each target text file in a corresponding target directory, and reading and analyzing the target text file in each target directory to obtain corresponding analyzed data; the analyzed data comprises a total row number, a total branch number, a total function number, a total coverage row number, a total coverage branch number and a total coverage function number; and merging and storing the analyzed data into a preset nested dictionary, traversing the preset nested dictionary to determine the code coverage rate of the target software based on the traversed analyzed data, and determining the software defect of the target software by using the code coverage rate. The quality and stability of software can be improved through testing.
Owner:SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD

A vulnerability-oriented regional fuzzing method

The application discloses a kind of efficient regional fuzzy test methods with vulnerability as guide, including the following steps: S1, the target program with vulnerability as guide is plugged in and is compiled, and the target program after plugging in containing code coverage information and potential vulnerability position information is obtained;S2, the target program after plugging in is run regional fuzzy test by the core link of fuzzy test based on seed selection;S3, according to the corresponding processing of regional fuzzy test running result;S4, after the end of regional fuzzy test running, target seed is screened and deduplicated, and potential vulnerability analysis is carried out to the seed after screening and deduplicating.The application can effectively reduce the number of seeds in seed queue in the process of regional fuzzy test while keeping the coverage basically unchanged, reduce the cost of fuzzy test, and then improve the efficiency of fuzzy test.
Owner:TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL

Parameter sensitive database fuzz testing method and system based on combinatorial testing

The invention discloses a parameter sensitive database fuzzy testing method and system based on combination testing, and the method comprises the steps: obtaining a coverage basic block set of each parameter through static taint analysis, generating a weight value of each parameter, and further determining a priority parameter combination set; training the condition generation probability of each SQL characteristic class under specific parameters through coverage rate feedback, and constructing a test sample generation scheme corresponding to the parameters; and finally, generating parameters and corresponding test samples through the weight data generated in the training stage, and checking execution results of the test samples through an oracle machine. According to the method, the parameter weight and the characteristic generation probability are adjusted through static analysis and the code coverage rate, intelligent scheduling of high-value test paths is achieved, the test efficiency and the coverage rate are improved, meanwhile, the problem of parameter combination space explosion is solved, and an innovative solution is provided for quality assurance and performance optimization of a database system.
Owner:SOUTHEAST UNIV +1

Test file generation method and device, equipment and storage medium

A test file generation method, apparatus and device, and a storage medium, the method comprising: analyzing a to-be-tested code file to obtain output information and input information in the to-be-tested code file; the input information is input into a case operation tested module to obtain output information after the case operation tested module outputs operation, and the output information after the operation comprises a code coverage rate; according to the output information after operation and preset output information, a comparison result is obtained, and the preset output information is expected information obtained through calculation according to the logic of the tested code and the input information; and performing output integration according to the comparison result and the code coverage rate, and generating a test file so as to be suitable for various embedded projects, so that the technical problem that the existing test file is tedious to use and not easy to understand is solved, and the effects of simplifying the use complexity and being easy to understand are realized.
Owner:DONGFENG AUTOMOBILE ELECTRONICS

Hardware-assisted software code coverage rate optimization method

The invention discloses a hardware-assisted software code coverage rate optimization method, which is characterized in that an INT3 breakpoint is set at a target function, a comparison instruction and a condition jump instruction, and a probe table is generated, so that an original instruction can be recovered in real time and an execution path can be accurately recorded during operation, and missed recording and wrong statistics are avoided; a subprocess is generated through a cloning mechanism, an operation value is modified at a branch point, an uncovered path can be actively explored, it is guaranteed that a key branch path is not missed, and the comprehensiveness of the code coverage rate is improved; by configuring the pre-timer to trigger the VMExit and combining the probe table and the branch tracking table to carry out statistics, the function level code coverage rate can be periodically output, and real-time monitoring and feedback of the coverage rate are realized.
Owner:CHINA UNIV OF MINING & TECH

A fuzzing method and process based on a deep reinforcement learning model

The application discloses a kind of fuzzy test method and process based on deep learning model.First, different formats of Linux application are collected, and the application collected and seed file with the same format are saved;Second, the variation model under fixed variation strategy is constructed based on value-oriented DQN algorithm and strategy-oriented TRPO algorithm, and the improved Thompson sampling algorithm is used to construct Havoc random variation model, to output the effective variation operator and variation strategy chain information of test sample;Then, the AFL source code is modified, the two proposed variation models are embedded, and the interaction between the model and AFL is realized using shared memory;Finally, for the AFL embedded with the model obtained in the last step, an automated execution script is written and its execution time is set, and the afl-fuzz, afl-showmap and afl-cov instructions are executed to train the embedded two models and perform automated fuzz testing, and according to the fuzz testing execution result, the code coverage, the number of crashes, the use of variation operator and other results are visualized.
Owner:BEIHANG UNIV

Test case generation method and device, electronic equipment, storage medium and program product

The present disclosure relates to a test case generation method and device, electronic equipment, storage medium and program product. The method comprises: obtaining target source code of a target interface, the target source code comprising an interface function and at least one function referenced by the interface function; obtaining initial test cases corresponding to the target interface and code coverage information; determining, based on the code coverage information, a target code line in the target source code that is not executed and a target function to which the target code line belongs; determining, from the initial test cases, a target nearest neighbor test case corresponding to the target code line; the target nearest neighbor test case being a test case of a target parent node of the target code line in the initial test cases; the target parent node being a code line in the target source code that is executed and closest to the target code line among parent nodes of the target code line; inputting the target source code, the target code line, the target function and the target nearest neighbor test case into a test case generation model, and outputting a target test case.
Owner:BEIJING ZITIAO NETWORK TECH CO LTD

Software code testing system and device and storage medium

The invention relates to the technical field of code testing, in particular to a software code testing system and device and a storage medium, and the testing system comprises a static analysis module which is used for carrying out grammar and semantic analysis on source codes and generating an abstract syntax tree and a control flow diagram; the dynamic test module is used for executing source codes, monitoring behaviors during operation and capturing behavior abnormal data and code performance data; the knowledge graph construction module is used for constructing a code defect knowledge graph based on a historical defect database, and the code defect knowledge graph comprises an incidence relation between a code mode and a defect type; the test optimization engine is used for dynamically adjusting a test case generation strategy according to the static analysis result and the code defect knowledge graph; and the multi-dimensional evaluation module outputs a code coverage rate, a defect detection rate and a performance bottleneck analysis report. According to the software code test system, the test efficiency of the test optimization engine is improved through combination of the static analysis module and the dynamic test module; 48% of redundancy tests are reduced through priority distribution, and the test efficiency is further improved.
Owner:SHANGHAI YUYU INFORMATION TECH CO LTD

Code testing method and device, equipment, medium and product

The invention discloses a code testing method, device and equipment, a medium and a product. The method comprises the following steps: determining a first to-be-tested code which is not covered by a to-be-used test case in a source code of to-be-tested software, and generating a case generation method based on the first to-be-tested code; generating a supplementary test case based on a case generation method, and testing the first to-be-tested code based on the supplementary test case to obtain first code coverage rate data; when the first code coverage rate data does not meet the preset test condition, determining a second to-be-tested code which is not covered by the supplementary test case in the first to-be-tested code based on the first code coverage rate data; adjusting a case generation method based on the first code coverage rate data, taking the second to-be-tested code as the first to-be-tested code again, and executing operations of generating a supplementary test case and obtaining the first code coverage rate data again based on the adjusted case generation method until the first code coverage rate data meets a preset test condition. And obtaining a target test result.
Owner:AGRICULTURAL BANK OF CHINA

Intelligent test case automatic generation method and system, electronic equipment and storage medium

The invention discloses an intelligent test case automatic generation method and system, electronic equipment and a storage medium, and relates to the field of automatic tests.The intelligent test case automatic generation method comprises the steps that 1, a case playback environment is prepared; step 2, executing the full-quantity automatic use cases one by one in the use case playback environment; 3, traversing a method call stack or defining a section by adopting a code call chain tool to obtain a method call relationship; step 4, obtaining a code diff after code modification; and step 5, integrating the basic case and the upstream and downstream cases to obtain a test case list influenced by code modification, and completing automatic generation of the intelligent test case. According to the scheme, the full-amount use cases and the full-amount codes are analyzed based on the code coverage rate technology, and the mapping relation between the use cases and the methods is obtained. Calling the calling relation between the chain technology analysis methods, and finally forming a plurality of lt; an upstream method-a basic method-a downstream method gt; a triple and a plurality of lt; a case-method gt; and a two-tuple.
Owner:CHINA FAW CO LTD +1

A C++ code coverage visualization detection method

The application discloses a C++ code coverage visual detection method and relates to the technical field of software testing.The method comprises the following steps: adopting ANTLR to generate a lexical analyzer and a syntax analyzer and constructing an abstract syntax tree; adopting an improved depth-first traversal algorithm with code structure information extraction to traverse C++ code, so as to obtain code structure information; performing code instrumentation on the C++ code, inserting probes into the code at appropriate positions to record code execution; running the code and waiting for the code to be executed, and then collecting code execution path information in the destructor of the class; calculating C++ code coverage including statement coverage and branch coverage based on the code structure information and the code execution path information; and finally visualizing the C++ code coverage.The application realizes automatic code instrumentation, accurate execution path data collection and intuitive coverage calculation and display, guarantees the accuracy of test data and reduces the influence on the program running efficiency.
Owner:NO 15 INST OF CHINA ELECTRONICS TECH GRP

Test case recommendation method, system and equipment

The invention relates to the technical field of software testing, in particular to a test case recommendation method, system and equipment. The method comprises the following steps: comparing a to-be-tested version code of a target application with a previous version code to obtain a difference code; inputting the difference code into a trained AI model to indicate the AI model to output an optimal test case suitable for the difference code according to the difference code and a pre-constructed knowledge base; wherein the knowledge base is obtained in the following mode: obtaining coverage rate data obtained based on the target test case, taking the target test case as a historical test case, associating the target test case with the corresponding coverage rate data, and storing the target test case in the knowledge base. Therefore, the problems that in the prior art, the test case maintenance cost is high, and the designed test case code coverage rate is low can be effectively solved.
Owner:KINCHENG BANK OF TIANJIN CO LTD

Code coverage rate statistical method, device and equipment

The invention relates to the technical field of software testing, provides a code coverage rate statistical method, device and equipment, is applied to a test server, and is used for efficiently and reliably carrying out code coverage rate statistics and ensuring software quality. The method comprises the following steps: receiving a trigger instruction for a test service assembly line, and constructing and deploying a tested service code through the test service assembly line; when the tested service code is started, a probe used for recording the code execution condition is loaded; receiving a test request triggered for the tested service code, and obtaining the execution condition of the tested service code in real time through a probe; and receiving an execution instruction for code coverage rate statistics, and executing by testing a coverage rate statistics assembly line, calling a pre-configured construction automation tool and combining a corresponding script configuration file: connecting a probe to obtain an execution condition, and performing code coverage rate data statistics based on the execution condition to generate a corresponding coverage rate statistics file.
Owner:CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1

Software code coverage rate testing method and terminal

The invention discloses a software code coverage rate testing method and a terminal, and the method comprises the steps: obtaining and recording the real-time execution information of a script code of target software in a running state during testing, and obtaining an actual execution path according to the real-time execution information; performing static analysis on the source code of the script code, and obtaining all possible paths according to a static analysis result; and calculating the coverage rate of the script code of the target software in combination with the actual execution path and all possible paths. According to the method, the execution condition of the script code of the target software is analyzed from two levels of a running stage and a static state, and then the coverage rate of the script code of the target software is calculated by combining an actual execution path and all possible paths, so that the conditions of new and old codes can be more comprehensively considered, the script code coverage rate is quickly analyzed, and the efficiency is improved. Therefore, whether potential problems exist or not is analyzed, and the quality and reliability of codes are ensured.
Owner:FUJIAN TQ DIGITAL

Linux kernel vulnerability mining method based on diversity guidance

The invention belongs to the technical field of computer software testing, and particularly relates to a Linux kernel vulnerability mining method based on diversity guidance. According to the method, firstly, collected PoCs are expressed by using a customized abstract syntax tree, clustering is carried out on the PoCs based on a Louvain community discovery algorithm, an initial diversity seed bank is constructed, and seeds are divided into a plurality of communities with different functions; in order to quantify seed diversity, a community prevalence rate index (CPR) is introduced; designing a double-layer multi-arm tiger machine scheduling framework based on the CPR, wherein the framework is used for efficiently allocating variable resources between communities and in the communities; a CPR-guided seed variation strategy is adopted to preferentially carry out rapid variation and expansion on high-diversity seeds, so that the coverage speed and efficiency of vulnerability triggering are improved. Experimental results show that compared with a current most advanced kernel fuzzy test tool, the method has the advantages that the code coverage rate is averagely increased by 17.4%, and the vulnerability discovery number is averagely increased by 9.1 times.
Owner:FUDAN UNIVERSITY

Code coverage generation through host-device coordination

System and method of compiling a program having a mixture of host code and device code to enable code coverage data collection for device code execution. An exemplary integrated compiler can compile source code programmed to be executed by a host processor (e.g., CPU) and a co-processor (e.g., a GPU) concurrently. The compilation can generate an instrumented executable code which includes: coverage instrumentation counters for the device functions; mapping information that maps the counters with the instrumented source points; and instructions for the host processor to allocate and initialize device memory for the counters and to retrieve collected code coverage information from the device memory to the host memory. Execution of the instrumented executable can yield a coverage report on the device code functions.
Owner:NVIDIA CORP

A dynamic depth analysis engine construction method based on genetic evolutionary algorithm

ActiveCN115221067BAlgorithmSoftware analytics
The application discloses a kind of dynamic depth analysis engine construction methods based on genetic evolution algorithm, belong to software analysis technical field, main in solving the problem of low code coverage and malicious behavior trigger rate of existing dynamic analysis technology, main scheme includes step 1: the UI level capture of being tested Android application is carried out to obtain UI component information in the tested Android application, obtain UI level information.Step 2: specified UI event trigger is realized by injecting event function.Step 3: capture software dynamic behavior characteristic data and realize malicious behavior dynamic detection using neural network model.Step 4: event function sequence is generated and screened using genetic evolution algorithm, and the injected event function is changed by feedback regulation.The application finally realizes the dynamic optimization of UI event sequence by combining with feedback regulation while detecting malicious behavior, and realizes the identification of Android malicious software based on dynamic analysis with high trigger rate.
Owner:UNIV OF ELECTRONICS SCI & TECH OF CHINA

Risk management method and device for incremental code and storage medium

PendingCN121958059AReduce performance overheadImproved performance overheadError detection/correctionCode refactoringAlgorithmOriginal data
The invention relates to the field of data processing, and discloses a risk management method and device for incremental codes and a storage medium. The method comprises the following steps: receiving code change information, and filtering the code change information to obtain an analysis source file; according to the abstract syntax tree, performing syntax analysis processing on the analysis source file to obtain an incremental code list; performing collection instrumentation processing on the target code to obtain a target instrumentation code; based on a preset JaCoCo tool, collecting incremental code coverage data of the target instrumentation code to obtain collected original data; performing cleaning association processing on the collected original data to generate structured coverage rate data; according to a preset detection threshold value, performing threshold value analysis on the structured coverage rate data to generate a risk result; based on the risk result, a management action is performed on the target code. In the embodiment of the invention, fine analysis of the coverage rate of the incremental code in the target code is realized, the performance overhead is reduced, and the risk management of the target code is improved.
Owner:SHENZHEN DADAO CLOUD TECH CO LTD

Method and computer program, medium and device for testing code coverage

A method for testing code coverage of a software program executed by a machine in an industrial system, comprising: obtaining a first control flow model; obtaining a second control flow model; comparing the first control flow model with the second control flow model to identify one or more code changes; preparing a code set to be tested based on the identified one or more code changes; preparing test data for testing a coverage rate of the code set to be tested; compiling the second version into assembly code or binary machine code for execution by a runtime environment of the machine; adding a check point to a position in the assembly code or binary machine code corresponding to each code in the code set to be tested; starting execution of the assembly code or binary machine code in the runtime environment using the test data; and determining whether each code in the set of code to be tested is covered according to an indication from the runtime environment.
Owner:SCHNEIDER ELECTRIC IND SAS

Code coverage rate statistical method and device, computer equipment and storage medium

The invention discloses a code coverage rate statistical method and device, computer equipment and a storage medium, and relates to the technical field of embedded software, and the code coverage rate statistical method comprises the steps that in the SSD running process, through timer interruption of a CPU, a PC pointer before interruption is collected in an interruption processing function; recording the collected PC pointer and the corresponding access times in a preset coverage rate statistical table; storing the coverage rate statistical table into an NAND flash memory of the SSD; and reading the coverage rate statistical table from the NAND flash memory, and generating a coverage rate data file through an analysis tool based on the coverage rate statistical table and an executable program file of the firmware of the SSD. According to the method, the PC pointer before interruption is acquired in a non-intrusive manner through interruption of the CPU timer, so that code expansion and resource consumption caused by code instrumentation are avoided; recording a PC pointer and the number of access times in a statistical table and storing the statistical table in an NAND flash memory to realize data recovery after power failure; finally, the coverage rate report is generated by combining executable file analysis, and the method is suitable for embedded scenes such as an SSD controller with limited resources.
Owner:SUZHOU UNIONMEMORY INFORMATION SYST LTD