Improved fast binary positioning method and system for anti-shake kernel performance degradation patches

Through the improved rapid bisection positioning method of patches with degraded anti-shake kernel performance and automatic calculation of device performance fluctuation intervals and secondary bisection positioning process, the problem of low locating efficiency of patches with degraded core performance in the existing technology is solved, achieving more efficient and accurate results. The patch positioning improves R&D efficiency and kernel quality.

CN118964113BActive Publication Date: 2025-01-21KYLIN CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411456280.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-21
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The existing technology lacks efficient and robust methods when monitoring kernel performance degradation, and cannot quickly identify and locate problem patches, resulting in delays in kernel performance testing and affecting development efficiency.

Method used

The improved anti-shake kernel performance degradation patch fast binary location method is used to quickly locate the problem patch by automatically calculating the reasonable performance fluctuation range of the device, combined with the secondary binary positioning process and the relative fluctuation judgment index.

Benefits of technology

It effectively reduces the problem of inaccurate positioning caused by jitter in performance test results, reduces the degree of missed patches, improves overall R&D efficiency, and ensures kernel quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964113B_ABST
    Figure CN118964113B_ABST
Patent Text Reader

Abstract

The present invention discloses an improved method and system for fast binary positioning of anti-shake kernel performance degradation patches, which includes sending the first performance test task of the current patch point to the test equipment, and updating the baseline patch and its baseline performance score if the performance test fluctuation amplitude is greater than the upper limit value; if the performance test fluctuation amplitude is greater than the preset performance fluctuation threshold, the performance test task is sent, and if the performance is degraded, the first binary test is performed to obtain a patch list, and the second binary test is selectively performed to obtain a patch list, and the patch point with performance degradation is selected to be added to the performance degradation patch list, and then the right endpoint of the binary test is removed and output. The present invention aims to achieve fast binary positioning of kernel performance degradation patches, reduce the problem of inaccurate positioning introduced by jitter of performance test results, reduce the degree of underreporting of problem patches, improve overall R&D efficiency, and ensure kernel quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of kernel performance testing, and in particular to an improved method and system for fast binary positioning of an anti-shake kernel performance degradation patch. Background Art

[0002] With the increasing complexity of upper-layer application software, the operating system needs to ensure low latency and high throughput when processing large data sets, which requires the operating system kernel to provide more excellent performance. The kernel is the core of the operating system, and its performance and stability play a key role. Therefore, the performance and high stability of the kernel have become the focus of the operating system. Since the kernel version release process includes multiple steps such as compilation, upgrade, testing, analysis and positioning, monitoring the performance of the massive patches submitted by developers one by one will greatly increase the time and manpower investment costs. Therefore, according to the optimal testing strategy, integration testing is performed when the new kernel version is released; however, when testing in the above way, the following two problems are faced: first, the delay in kernel integration testing leads to late discovery of problem patches, which may hinder the smooth progress of continuous integration and thus affect the overall development efficiency; second, when monitoring kernel performance, it is necessary to consider the reasonable performance fluctuation range of the machine itself. On this basis, if the performance of the new version of the kernel degrades, developers urgently need an efficient and robust method to quickly identify and locate the problem patch in the huge patch library.

[0003] The Chinese patent application with publication number CN113268248A (application number 202110630233.X) discloses a method for locating software non-repeatable compilation faults and automatically generating patches, which includes: first, building a compilation environment, obtaining a source code package generation artifact, and then determining whether the two generated artifacts are consistent; by calling the compilation tracking program, the compilation process of the source code package is tracked to locate the location of the non-repeatable compilation fault; obtaining historical repair patches and automatically generating repair patches for the software source code package; repairing the software source code package; and repairing the software soundness detection. The inventive method can locate software non-repeatable compilation faults and automatically generate repair patches. However, the above-mentioned existing methods only locate and repair the code that cannot be compiled at the code level, and cannot monitor the kernel version performance through integrated testing.

[0004] The Chinese patent application with publication number CN115658514A (application number 202211341575.0) discloses a vulnerability patch location method, which includes: first, obtaining vulnerabilities and codes; extracting submission similarity features of the vulnerabilities and codes to obtain file-level and code-level vulnerabilities and codes; secondly, extracting vulnerability semantic features and code submission semantic features of the vulnerabilities and codes; then, obtaining all features of the vulnerabilities and codes based on the file-level, code-level, vulnerability semantic features and code submission semantic features; finally, determining the patch with the highest correlation with the vulnerability based on all features of the vulnerabilities and codes. However, the above method is a method for locating patches by detecting the similarity between other files and files with vulnerabilities, and cannot handle the situation where the vulnerability location is unknown.

[0005] The Chinese patent application with publication number CN107341110A (application number 201710561299.1) discloses a tool and implementation method for locating patch modifications and impact scopes for software testing, the method comprising a source code change analysis component, a metadata change analysis component, an SQL standardization check component, and an impact function menu intelligent summary component; wherein the source code change analysis component is used to receive the patch file passed in by the user, copy the patch to a specified directory and decompress it, extract all request files with the suffix dll in the decompressed path, and start preprocessing all request files; the metadata change analysis component is used to obtain a list of metadata information contained in the patch by querying the product database, and obtain the information of ID, number, name, path and type for each metadata to form a list and display it on the interface; the SQL standardization check component is used to capture all files with the suffix .sql in the patch file, and verify the syntax standardization according to multiple rules combined with regular matching technology; the impact function menu intelligent summary component is used to write the key information of dll, metadata and function menu list into a separate file, and display all menu lists affected by the patch in the summary component by reading the file. However, the above method is a method of locating the patch modification position and its impact range through code comparison, but it is unable to analyze the fluctuations in system performance caused by the patch modification.

[0006] The Chinese patent application with publication number CN117234765A (application number 202311012148.2) discloses a method for automatically locating a kernel performance degradation patch of a domestic operating system in two parts, the method comprising: S1, obtaining parameter data; S2, sending a pre-task with execution parameters to the execution end, obtaining a list corresponding to all patches, and returning the list to the server end; S3, the server end creates kernel compilation, upgrade, and test tasks and sends them to the execution end; S4, the execution end sequentially performs kernel compilation, kernel upgrade, and performance testing, and sends the test results to the server end; S5, judging whether to perform performance fluctuation calculation, if not, returning to S3, if yes, performing performance fluctuation calculation, and obtaining the performance fluctuation type of the patch node; S6, judging whether to input the unique identifier and performance fluctuation node type corresponding to the current patch node into the automatic two-part positioning model, if yes, obtaining the next patch node to be tested, returning to S3, until the test ends, if no, entering S7; S7, ending the test and outputting the information corresponding to the last performance degradation patch node. However, the above method is a method for finding the problem patch by manually setting the positioning problem patch interval. This method does not take into account the reasonable jitter of the test equipment itself; in addition, it cannot handle the performance degradation caused by the accumulation of multiple problematic patches.

[0007] In summary, the above existing methods have the following problems: (1) They are only applicable to locating fault locations in source code that cannot pass the compilation process correctly, and cannot monitor the performance degradation of kernel versions through integrated testing. (2) When monitoring kernel performance degradation, they lack agility and cannot timely monitor changes in kernel performance and provide timely feedback in an automated manner, which increases the R&D quality cost. (3) When monitoring kernel performance changes, they ignore the reasonable fluctuations caused by individual differences of different machines, and do not perform anti-shake processing on the performance test results of the initial binary positioning. The performance fluctuation data lacks necessary analysis and appropriate processing, thereby reducing the robustness of the binary positioning algorithm. Therefore, in order to improve the efficiency of binary problem patch positioning testing, it is urgent for developers to introduce an automated method that significantly improves the efficiency and accuracy of testing, and quickly improves the efficiency and accuracy of problem patch positioning. Summary of the invention

[0008] The technical problem to be solved by the present invention is as follows: In view of the above-mentioned problems in the prior art, an improved method and system for fast binary positioning of anti-shake kernel performance degradation patches are provided. The present invention aims to achieve fast binary positioning of kernel performance degradation patches, reduce the problem of inaccurate positioning introduced by jitter in performance test results, reduce the degree of underreporting of problem patches, improve overall R&D efficiency, and ensure kernel quality.

[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0010] An improved method for fast binary location of anti-shake kernel performance degradation patches includes the following steps:

[0011] S1, send the current patch point P to the test device test The first performance test task, combined with the first performance score V test Calculate the performance test fluctuation range W of the current patch point test , determine the performance test fluctuation range W test Greater than the upper limit value W of the performance test fluctuation of the test equipment top Is it true? If so, jump to step S2; otherwise, jump to step S3;

[0012] S2, the current patch point P test Changed to new baseline patch P base , the current patch point P test Performance score V test Changed to new baseline performance score V base ;

[0013] S3, determine the performance test fluctuation range W of the current patch point test Is it less than or equal to the preset performance fluctuation threshold TS? If yes, jump to step S4; otherwise, jump to step S1;

[0014] S4: Send the performance test task of the current patch point to the test device again, and combine the obtained retest performance score V testcheck Calculate the retest volatility W testcheck and performance degradation indicator valuePro flag ; Determine the performance degradation indicator value Pro flag Is it equal to 1? If yes, jump to step S5; otherwise, jump to step S1;

[0015] S5, combined with the current patch point P test and its first performance score V test , baseline patch P base and the baseline performance score V base Perform the first binary test to get the patch list DB first , in the patch list DB first Select the patch point with the performance degradation flag value of 1 and add it to the performance degradation patch list DB set ;

[0016] S6, determine the performance degradation patch list DB set Contains only the right endpoint P of the bisection test end Is it true? If true, combine with patch list DB first , baseline patch P base and the baseline performance score Vbase Perform the second binary test to get the patch list DB second , and the left endpoint of the second round of binary test is the left endpoint of the first round of binary test, and the right endpoint of the second round of binary test is the relative volatility value in the first round of binary test The smallest patch point in the patch list DB second Select Left Relative Difference The smallest patch point, the relative difference on the right Minimum patch point, relative fluctuation value The smallest patch point and the patch point with a performance score less than the threshold TL are added to the performance degradation patch list DB set ;

[0017] S7, performance degradation patch list DB set Remove the right endpoint P of the binary test end After output.

[0018] Optionally, before step S1, the method further includes: based on the initial baseline patch P base Perform N tests on the test equipment and calculate the standard deviation of the N test results according to the following formula :

[0019] ,

[0020] In the above formula, is the performance score of the ith test, is based on the initial baseline patch P base The average performance score obtained by performing N tests on the test equipment is calculated using the following function expression:

[0021] ;

[0022] The performance test fluctuation upper limit value W of the test equipment is calculated according to the following formula top And the performance test fluctuation lower limit W bottom :

[0023] ,

[0024] ,

[0025] In the above formula, is a coefficient greater than 1, thus obtaining the performance fluctuation range of the corresponding test case on the test device:

[0026] .

[0027] Optionally, the performance test fluctuation range W of the current patch point in step S1 testThe calculation function expression is:

[0028] ,

[0029] In the above formula, is the first performance score, is based on the initial baseline patch P base The average performance score obtained by performing N tests on the test device.

[0030] Optionally, in step S4, the fluctuation amplitude W is tested again testcheck The calculation function expression is:

[0031] ,

[0032] In the above formula, To test the performance score again, This is the first performance score.

[0033] Optionally, the performance degradation indicator value Pro in step S4 flag The calculation function expression is:

[0034] ,

[0035] In the above formula, To test the volatility again, is the preset performance fluctuation threshold, is based on the initial baseline patch P base The performance fluctuation range obtained by performing N tests on the test device.

[0036] Optionally, in step S5, the current patch point P test and its first performance score V test , baseline patch P base and the baseline performance score V base Perform the first binary test to get the patch list DB first include:

[0037] S5.1, set the baseline patch P base is the left endpoint P of the binary test interval start , baseline performance score V base is the left endpoint baseline value V of the binary test interval start , the current patch point P test is the right endpoint P of the binary test interval end , first performance score V test is the right endpoint baseline value V of the binary test interval end ;

[0038] S5.2, calculate the interval [P by the binary algorithm start , P end ] is the position P of the next patch point to be tested mid , if position P mid With the left endpoint P start or right endpoint P end If they overlap, the binary test is considered complete and the patch list DB is output first ; Otherwise jump to step S5.3;

[0039] S5.3, send position P to the test equipment mid The performance test task corresponding to the patch point is combined with the obtained performance score to calculate the position P mid Performance test fluctuation range corresponding to the patch point , if position P mid Performance test fluctuation range corresponding to the patch point If the performance fluctuation threshold TS is greater than the preset value, the position P is calculated. mid Performance degradation indicator value corresponding to the patch point If the performance degradation indicator value If it is equal to 1, then the position P is determined mid If the corresponding patch point is a performance degradation point, jump to step S5.4; otherwise, jump to step S5.5;

[0040] S5.4, calculate the position P according to the following formula mid Relative fluctuation value of the corresponding patch point :

[0041] - ,

[0042] In the above formula, For position P mid The performance score of the corresponding patch point; the position P mid The corresponding patch point is added to the patch list DB first , Patch List DB first Any patch point The expression is:

[0043] ,

[0044] In the above formula, For position P mid Corresponding patch point; jump to step S5.2.

[0045] Optionally, in step S6, the patch list DB first , baseline patch P base and the baseline performance score V base Perform a second bisection test to obtain the patch list DBsecond include:

[0046] S6.1, in the patch list DB first Select the relative volatility value The smallest patch point is used as the right boundary point of the second bisection test , the performance score corresponding to the patch is the right endpoint baseline value V of the binary test interval end ; The baseline patch P base Set to the left endpoint of the second binary test , baseline performance score V base is the left endpoint baseline value V of the binary test interval start , the right boundary point The corresponding patch points are stored in the performance degradation patch list DB set ;

[0047] S6.2, calculate the interval [P by the binary algorithm start , P end ] is the position P of the next patch point to be tested mid , if position P mid With the left endpoint P start or right endpoint P end If they overlap, the binary test is considered complete and the process goes to step S6.5; otherwise, the process goes to step S6.3;

[0048] S6.3, send position P to the test equipment mid The performance test task corresponding to the patch point, combined with the obtained performance score Calculate the position P mid Performance test fluctuation range corresponding to the patch point And the relative volatility ; Calculate the position P according to the following formula mid The relative difference on the left side of the corresponding patch point The relative difference with the right side :

[0049] ,

[0050] ,

[0051] In the above formula, V start is the left endpoint baseline value, V end is the baseline value of the right endpoint; mid The corresponding patch point is added to the patch list DB second , Patch List DB second Any patch point The expression is:

[0052] ,

[0053] In the above formula, For position P mid Corresponding patch point;

[0054] S6.4, Judgment Is it true? If so, change position P mid The corresponding patch point is used as the new right endpoint P end To update the interval [P start , P end ], position P mid The performance score of the corresponding patch point is the new right endpoint baseline value V end , otherwise position P mid The corresponding patch point is used as the new left endpoint P start To update the interval [P start , P end ], position P mid The performance score of the corresponding patch point is the new left endpoint baseline value V start ; Jump to step S6.2;

[0055] S6.5, in the patch list DB second Select Left Relative Difference The smallest patch point, the relative difference on the right Minimum patch point, relative fluctuation value The smallest patch point and the patch point with a performance score less than the threshold TL are added to the performance degradation patch list DB set , where the calculation function expression of the threshold TL is:

[0056] ,

[0057] In the above formula, is the baseline performance score, is the preset performance fluctuation threshold, This is the upper limit of the performance test fluctuation of the test equipment.

[0058] In addition, the present invention also provides an improved anti-shake kernel performance degradation patch fast binary positioning system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method.

[0059] In addition, the present invention also provides a computer-readable storage medium, in which a computer program or instruction is stored, and the computer program or instruction is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method through a processor.

[0060] In addition, the present invention also provides a computer program product, including a computer program or an instruction, wherein the computer program or the instruction is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method through a processor.

[0061] Compared with the prior art, the present invention mainly has the following advantages: the improved fast binary positioning method for anti-shake kernel performance degradation patches of the present invention can realize the positioning of the final problem patch from a large number of patches; in the performance comparison process, the improved fast binary positioning method for anti-shake kernel performance degradation patches of the present invention takes into account the reasonable performance jitter of different test devices, adds a performance anti-shake mechanism, and reduces the problem of inaccurate positioning introduced by the jitter of performance test results; at the same time, when screening the target problem patch, the improved fast binary positioning method for anti-shake kernel performance degradation patches of the present invention adds a secondary binary positioning process to address the problem of kernel performance degradation caused by the cumulative effect of patches, introduces a relative fluctuation judgment index, enhances the ability of the automatic positioning method to screen problem patches, greatly reduces the degree of underreporting of problem patches, further improves the overall research and development efficiency, and effectively guarantees the kernel quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention.

[0063] Figure 2 Schematic diagram of the process of the second binary test in an embodiment of the present invention.

[0064] Figure 3 In the embodiment of the present invention, there are other patches in the interval after the first binary test. flag When it is 1, the other patches are those that do not contain the right endpoint P of the bisection test. end Patch.

[0065] Figure 4 In the embodiment of the present invention, there is no other patch Pro in the interval after the second binary test. flag When it is 1, the other patches are those that do not contain the right endpoint P of the bisection test. end Patch. DETAILED DESCRIPTION

[0066] The improved anti-shake kernel performance degradation patch fast binary positioning method of the present invention is mainly used to solve the following problems existing in the existing kernel performance degradation patch binary positioning method: First, the performance of the kernel performance test has personalized differences under different device conditions. In the process of monitoring kernel performance changes, it is necessary to reduce the probability of misjudgment of performance degradation. Therefore, in the kernel testing process, it is necessary to consider that different machines have different reasonable performance jitters. Secondly, with the gradual iteration of the kernel, the kernel performance will also be optimized. When the monitoring baseline remains unchanged, it will affect the correct judgment of performance fluctuations. Therefore, it is necessary to set a reasonable way to automatically change the baseline to improve the intelligence of performance monitoring. Finally, due to the use of binary method to realize the problem patch positioning process, there is a patch accumulation effect that causes kernel performance degradation. In this case, the existing method cannot handle such problems. In response to the above problems, the improved anti-shake kernel performance degradation patch fast binary positioning method of the present invention automatically calculates the reasonable performance fluctuation range of different devices to realize automatic compilation, upgrade, startup, testing of kernel source code and intelligent positioning of performance test fluctuations. Specifically, Figure 1 As shown, the improved anti-shake kernel performance degradation patch fast binary positioning method of this embodiment includes the following steps:

[0067] S1, send the current patch point P to the test device test The first performance test task, combined with the first performance score V test Calculate the performance test fluctuation range W of the current patch point test , determine the performance test fluctuation range W test Greater than the upper limit value W of the performance test fluctuation of the test equipment top Is it true? If so, jump to step S2; otherwise, jump to step S3;

[0068] S2, the current patch point P test Changed to new baseline patch P base , the current patch point P test Performance score V test Changed to new baseline performance score V base ;

[0069] S3, determine the performance test fluctuation range W of the current patch point test Is it less than or equal to the preset performance fluctuation threshold TS? If yes, jump to step S4; otherwise, jump to step S1;

[0070] S4: Send the performance test task of the current patch point to the test device again, and combine the obtained retest performance score V testcheck Calculate the retest volatility W testcheck and performance degradation indicator valuePro flag ; Determine the performance degradation indicator value Proflag Is it equal to 1? If yes, jump to step S5; otherwise, jump to step S1;

[0071] S5, combined with the current patch point P test and its first performance score V test , baseline patch P base and the baseline performance score V base Perform the first binary test to get the patch list DB first , in the patch list DB first Select the patch point with the performance degradation flag value of 1 and add it to the performance degradation patch list DB set ;

[0072] S6, determine the performance degradation patch list DB set Contains only the right endpoint P of the bisection test end Is it true? If true, combine with patch list DB first , baseline patch P base and the baseline performance score V base Perform the second binary test to get the patch list DB second , and the left endpoint of the second round of binary test is the left endpoint of the first round of binary test, and the right endpoint of the second round of binary test is the relative volatility value in the first round of binary test The smallest patch point in the patch list DB second Select Left Relative Difference The smallest patch point, the relative difference on the right Minimum patch point, relative fluctuation value The smallest patch point and the patch point with a performance score less than the threshold TL are added to the performance degradation patch list DB set ;

[0073] S7, performance degradation patch list DB set Remove the right endpoint P of the binary test end After output.

[0074] Before step S1, the present embodiment further includes: based on the initial baseline patch P base Perform N tests on the test equipment and calculate the standard deviation of the N test results according to the following formula :

[0075] ,

[0076] In the above formula, is the performance score of the ith test, is based on the initial baseline patch P base The average performance score obtained by performing N tests on the test equipment is calculated using the following function expression:

[0077] ;

[0078] The performance test fluctuation upper limit value W of the test equipment is calculated according to the following formula top :

[0079] ,

[0080] In the above formula, is a coefficient greater than 1. For example, in this embodiment, the value is 3, then:

[0081] ,

[0082] And there is a performance test fluctuation upper limit value W of the test equipment top The value is greater than 0. In addition, this embodiment also includes calculating the performance test fluctuation lower limit value W of the test equipment bottom :

[0083] ,

[0084] Among them, W bottom is the lower limit of the performance fluctuation range. This value is less than 0, so as to obtain the performance fluctuation range of the corresponding test case on the test device:

[0085] .

[0086] In this embodiment, the baseline patch P base Each patch point is distinguished by the commit ID of the corresponding patch. The initial baseline patch P base , the performance fluctuation threshold TS and the number of tests N can be customized by the user, where TS is a decimal less than 0, such as TS=-0.03; N is a positive integer, such as N=10.

[0087] In step S1 of this embodiment, the performance test fluctuation amplitude W of the current patch point test The calculation function expression is:

[0088] ,

[0089] In the above formula, is the first performance score, is based on the initial baseline patch P base The average performance score obtained by performing N tests on the test device.

[0090] In step S4 of this embodiment, the fluctuation amplitude W is tested again. testcheck The calculation function expression is:

[0091] ,

[0092] In the above formula, To test the performance score again, This is the first performance score.

[0093] In this embodiment, the performance degradation indicator value Pro in step S4 flag The calculation function expression is:

[0094] ,

[0095] In the above formula, To test the volatility again, is the preset performance fluctuation threshold, is based on the initial baseline patch P base The performance fluctuation range obtained by performing N tests on the test device.

[0096] In step S5 of this embodiment, the current patch point P test and its first performance score V test , baseline patch P base and the baseline performance score V base Perform the first binary test to get the patch list DB first include:

[0097] S5.1, set the baseline patch P base is the left endpoint P of the binary test interval start , baseline performance score V base is the left endpoint baseline value V of the binary test interval start , the current patch point P test is the right endpoint P of the binary test interval end , first performance score V test is the right endpoint baseline value V of the binary test interval end ;

[0098] S5.2, calculate the interval [P by the binary algorithm start , P end ] is the position P of the next patch point to be tested mid , if position P mid With the left endpoint P start or right endpoint P end Coincidence (i.e. P mid =P end or P mid =P start ), then the binary test is determined to be completed and the patch list DB is output first ; Otherwise jump to step S5.3;

[0099] S5.3, send position P to the test equipment mid The performance test task corresponding to the patch point is combined with the obtained performance score to calculate the position P mid Performance test fluctuation range corresponding to the patch point , if position P mid Performance test fluctuation range corresponding to the patch point If the performance fluctuation threshold TS is greater than the preset value, the position P is calculated. mid Performance degradation indicator value corresponding to the patch point If the performance degradation indicator value If it is equal to 1, then the position P is determined mid If the corresponding patch point is a performance degradation point, jump to step S5.4; otherwise, jump to step S5.5;

[0100] S5.4, calculate the position P according to the following formula mid Relative fluctuation value of the corresponding patch point :

[0101] ,

[0102] In the above formula, For position P mid The performance score of the corresponding patch point; the position P mid The corresponding patch point is added to the patch list DB first , which can be expressed as:

[0103] ,

[0104] In the above formula, ~ Patch List DB first The 1st to nth patch points in ;

[0105] Patch List DB first Any patch point The expression is:

[0106] ,

[0107] In the above formula, For position P mid Corresponding patch point (the i-th patch point), The positions P mid The performance score, performance test fluctuation range, performance degradation mark value and relative fluctuation value of the corresponding patch point (the i-th patch point); jump to step S5.2.

[0108] In this embodiment, step S6 includes determining that the performance degradation point includes the right endpoint P of the binary test. end Is it true? If true, combine with patch list DBfirst , baseline patch P base and the baseline performance score V base Perform the second binary test, Figure 3 In this embodiment, there are other patches in the interval after the first binary test. flag When it is 1, the other patches are those that do not contain the right endpoint P of the bisection test. end Patch, according to Figure 3 There are three patch points for determining performance degradation points: P A , P B and the right endpoint P end , that is, the right endpoint P of the binary test end Established, needs to be combined with patch list DB first , baseline patch P base and the baseline performance score V base Perform a second dichotomy test. Figure 3 It can be seen that the performance degradation points are all located on the dotted line V base * Below the performance score corresponding to TS.

[0109] like Figure 2 As shown, in step S6 of this embodiment, the patch list DB first , baseline patch P base and the baseline performance score V base Perform a second bisection test to obtain the patch list DB second include:

[0110] S6.1, in the patch list DB first Select the relative volatility value The smallest patch point is used as the right boundary point of the second bisection test , the performance score corresponding to the patch is the right endpoint baseline value V of the binary test interval end ; The baseline patch P base Set to the left endpoint of the second binary test , baseline performance score V base is the left endpoint baseline value V of the binary test interval start , the right boundary point The corresponding patch points are stored in the performance degradation patch list DB set ;

[0111] S6.2, calculate the interval [P by the binary algorithm start , P end ] is the position P of the next patch point to be tested mid , if position P mid With the left endpoint P start or right endpoint P end Coincidence (i.e. Pmid =P end or P mid =P start ), if the binary test is determined to be completed, jump to step S6.5; otherwise, jump to step S6.3;

[0112] S6.3, send position P to the test equipment mid The performance test task corresponding to the patch point, combined with the obtained performance score Calculate the position P mid Performance test fluctuation range corresponding to the patch point And the relative volatility ; Calculate the position P according to the following formula mid The relative difference on the left side of the corresponding patch point The relative difference with the right side :

[0113] ,

[0114] ,

[0115] In the above formula, V start is the left endpoint baseline value, V end is the baseline value of the right endpoint; mid The corresponding patch point is added to the patch list DB second , which can be expressed as:

[0116] ,

[0117] In the above formula, ~ Patch List DB second The 1st to mth patch points in ;

[0118] Patch List DB second Any patch point The expression is:

[0119] ,

[0120] In the above formula, For position P mid Corresponding patch point;

[0121] S6.4, Judgment Is it true? If so, change position P mid The corresponding patch point is used as the new right endpoint P end To update the interval [P start , P end ], position P mid The performance score of the corresponding patch point is the new right endpoint baseline value Vend , otherwise position P mid The corresponding patch point is used as the new left endpoint P start To update the interval [P start , P end ], position P mid The performance score of the corresponding patch point is the new left endpoint baseline value V start ; Jump to step S6.2;

[0122] S6.5, in the patch list DB second Select Left Relative Difference The smallest patch point, the relative difference on the right Minimum patch point, relative fluctuation value The smallest patch point and the patch point with a performance score less than the threshold TL are added to the performance degradation patch list DB set , where the calculation function expression of the threshold TL is:

[0123] ,

[0124] In the above formula, is the baseline performance score, is the preset performance fluctuation threshold, This is the upper limit of the performance test fluctuation of the test equipment.

[0125] Figure 4 In this embodiment, there is no other patch Pro in the interval after the second binary test. flag When it is 1, the other patches are those that do not contain the right endpoint P of the bisection test. end Patch, P start is the left endpoint of the first binary test and the left endpoint of the second binary test, P min is the right endpoint of the second bisection test, P end is the right endpoint of the first binary test, and the left endpoint P start and position P mid The area between In the case of position P mid and the right endpoint P min The area between In the case of position P mid The relative difference on the left side of the corresponding patch point The relative difference with the right side , and the relative volatility All in Figure 4 The right endpoint P end Performance score V end Located between the dotted line TL (threshold line considering the normal jitter range) and the dotted line (The performance degradation threshold line) corresponds to the performance score. This round of binary positioning process ends, and the performance degradation patch tested last in the interval is output, that is, the performance degradation patch list DB set The patch in .

[0126] In summary, the improved anti-shake kernel performance degradation patch fast binary positioning method of this embodiment includes: Step 1, calculating the monitoring data of the test equipment. Specifically including:

[0127] Corresponding test case performance fluctuation range W range ; Monitoring baseline patch P base Performance test case baseline value V base ; Performance fluctuation threshold TS is defined by the user. Step 2: Select the latest patch P according to the set timing time test , send the performance test task to the test equipment, and output the performance fluctuation range W of the current test patch test Step 3: Determine whether to move the baseline patch and the baseline value according to the test result of the current test patch. Step 4: Determine the performance fluctuation of the current test patch W test Is it less than or equal to the specified threshold TS? If not, return to step 2. If yes, perform a second test on the current test patch, calculate whether to start the binary positioning test according to the judgment rule, and store all test results. Step 5. Enter P base ,P test ,V base ,V test Data, start the binary positioning test, repeat the test in the interval until the first binary test is completed, and output the binary test result data list DB first Step 6: Based on the result of step 5, DB first Determine whether to start the second binary test. If the interval [P start ,P end ] contains only P end This is the only performance degradation point, so the second binary test is started and step 7 is executed; if the interval contains all the values ​​except P end If there are other performance degradation points, go directly to step 8. Step 7: Enter DB first , start the second binary test, then filter all patches that meet the conditions and output DB set Step 8: From DB set Remove P from the list end Patch point, output DB set, and record the process log information for viewing. The advantages of the method of this embodiment include: the method of this embodiment can realize automatic compilation, upgrading, startup and testing of kernel source code, and intelligent positioning of performance test fluctuations by automatically calculating the reasonable performance fluctuation range of different devices, so as to realize the positioning of the final problem patch from a large number of patches; in the performance comparison process, the method of this embodiment considers the reasonable performance jitter of different test devices and adds a performance anti-shake mechanism to reduce the problem of inaccurate positioning caused by the jitter of performance test results; when screening the target problem patch, the method of this embodiment adds a secondary binary positioning process to the problem of kernel performance degradation caused by the cumulative effect of patches, introduces a relative fluctuation judgment index, enhances the ability of the automatic positioning method to screen problem patches, greatly reduces the degree of underreporting of problem patches, further improves the overall R&D efficiency, and effectively guarantees the kernel quality.

[0128] In addition, this embodiment also provides an improved anti-shake kernel performance degradation patch fast binary positioning system, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method.

[0129] In addition, this embodiment also provides a computer-readable storage medium, in which a computer program or instruction is stored. The computer program or instruction is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method through a processor.

[0130] In addition, this embodiment also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method through a processor.

[0131] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0132] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. An improved method for fast binary location of anti-shake kernel performance degradation patches, characterized in that: The steps include: S1, send the current patch point P to the test device test The first performance test task, combined with the first performance score V test Calculate the current patch point P test Performance test fluctuation range W test , determine the performance test fluctuation range W test Greater than the upper limit value W of the performance test fluctuation of the test equipment top Is it true? If so, jump to step S2; otherwise, jump to step S3; S2, the current patch point P test Changed to new baseline patch P base , the current patch point P test Performance score V test Changed to new baseline performance score V base ; S3, determine the performance test fluctuation range W of the current patch point test Is it less than or equal to the preset performance fluctuation threshold TS? If yes, jump to step S4; Otherwise, jump to step S1; S4: Send the performance test task of the current patch point to the test device again, and combine the obtained retest performance score V testcheck Calculate the retest volatility W testcheck and performance degradation indicator valuePro flag ; Determine the performance degradation indicator value Pro flag Is it equal to 1? If yes, jump to step S5; Otherwise, jump to step S1; S5, combined with the current patch point P test and its first performance score V test , baseline patch P base and the baseline performance score V base Perform the first binary test to get the patch list DB first , in the patch list DB first Select the patch point with the performance degradation flag value of 1 and add it to the performance degradation patch list DB set ; S6, determine the performance degradation patch list DB set Contains only the right endpoint P of the bisection test end Is it true? If true, combine with patch list DB first , baseline patch P base and the baseline performance score V base Perform the second binary test to get the patch list DB second , and the left endpoint of the second round of binary test is the left endpoint of the first round of binary test, and the right endpoint of the second round of binary test is the relative volatility value in the first round of binary test The smallest patch point in the patch list DB second Select Left Relative Difference The smallest patch point, the relative difference on the right Minimum patch point, relative fluctuation value The smallest patch point and the patch point with a performance score less than the threshold TL are added to the performance degradation patch list DB set ; Left relative difference , right relative difference And the relative volatility The superscript i in represents the i-th patch point; S7, will reduce performance patch list DB set Remove the right endpoint P of the binary test end After output.

2. The improved anti-shake kernel performance degradation patch fast binary positioning method according to claim 1, characterized in that: Before step S1, it also includes: based on the initial baseline patch P base Perform N tests on the test equipment and calculate the standard deviation of the N test results according to the following formula : , In the above formula, For the The performance score of the test, is based on the initial baseline patch P base The average performance score obtained by performing N tests on the test equipment is calculated using the following function expression: ; The performance test fluctuation upper limit value W of the test equipment is calculated according to the following formula top And the performance test fluctuation lower limit W bottom : , , In the above formula, is a coefficient greater than 1, thus obtaining the performance fluctuation range of the corresponding test case on the test device: 。 3. The improved anti-shake kernel performance degradation patch fast binary positioning method according to claim 1, characterized in that: The performance test fluctuation range W of the current patch point in step S1 test The calculation function expression is: , In the above formula, is the first performance score, is based on the initial baseline patch P base The average performance score obtained by performing N tests on the test device.

4. The improved anti-shake kernel performance degradation patch fast binary positioning method according to claim 1, characterized in that: In step S4, the fluctuation range W is tested again. testcheck The calculation function expression is: , In the above formula, To test the performance score again, This is the first performance score.

5. The improved anti-shake kernel performance degradation patch fast binary positioning method according to claim 1, characterized in that: The performance degradation indicator value Pro in step S4 flag The calculation function expression is: , In the above formula, To test the volatility again, is the preset performance fluctuation threshold, is based on the initial baseline patch P base The performance fluctuation range obtained by performing N tests on the test device.

6. The improved anti-shake kernel performance degradation patch fast binary positioning method according to claim 1, characterized in that: In step S5, the current patch point P is combined test and its first performance score V test , baseline patch P base and the baseline performance score V base Perform the first binary test to get the patch list DB first include: S5.1, set the baseline patch P base is the left endpoint P of the binary test interval start , baseline performance score V base is the left endpoint baseline value V of the binary test interval start , the current patch point P test is the right endpoint P of the binary test interval end , first performance score V test is the right endpoint baseline value V of the binary test interval end ; S5.2, calculate the interval [P by the binary algorithm start , P end ] is the position P of the next patch point to be tested mid , if position P mid With the left endpoint P start or right endpoint P end If they overlap, the binary test is considered complete and the patch list DB is output first ; Otherwise jump to step S5.3; S5.3, send position P to the test equipment mid The performance test task corresponding to the patch point is combined with the obtained performance score to calculate the position P mid Performance test fluctuation range corresponding to the patch point , if position P mid Performance test fluctuation range corresponding to the patch point If the performance fluctuation threshold TS is greater than the preset value, the position P is calculated. mid Performance degradation indicator value corresponding to the patch point If the performance degradation indicator value If it is equal to 1, then the position P is determined mid If the corresponding patch point is a performance degradation point, jump to step S5.4; otherwise, jump to step S5.5; S5.4, calculate the position P according to the following formula mid Relative fluctuation value of the corresponding patch point : - , In the above formula, For position P mid The performance score of the corresponding patch point; the position P mid The corresponding patch point is added to the patch list DB first , Patch List DB first Any patch point The expression is: , In the above formula, For position P mid Corresponding patch point; jump to step S5.

2.

7. The improved anti-shake kernel performance degradation patch fast binary positioning method according to claim 6, characterized in that: In step S6, the patch list DB is combined first , baseline patch P base and the baseline performance score V base Perform a second bisection test to obtain the patch list DB second include: S6.1, in the patch list DB first Select the relative volatility value The smallest patch point is used as the right boundary point of the second bisection test , the performance score corresponding to the patch is the right endpoint baseline value V of the binary test interval end ; The baseline patch P base Set to the left endpoint of the second binary test , baseline performance score V base is the left endpoint baseline value V of the binary test interval start , the right boundary point The corresponding patch points are stored in the performance degradation patch list DB set ; S6.2, calculate the interval [P by the binary algorithm start , P end ] is the position P of the next patch point to be tested mid , if position P mid With the left endpoint P start or right endpoint P end If they overlap, the binary test is considered complete and the process goes to step S6.5; otherwise, the process goes to step S6.3; S6.3, send position P to the test equipment mid The performance test task corresponding to the patch point, combined with the obtained performance score Calculate the position P mid Performance test fluctuation range corresponding to the patch point And the relative volatility ; Calculate the position P according to the following formula mid The relative difference on the left side of the corresponding patch point The relative difference with the right side : , , In the above formula, V start is the left endpoint baseline value, V end is the baseline value of the right endpoint; mid The corresponding patch point is added to the patch list DB second , Patch List DB second Any patch point The expression is: , In the above formula, For position P mid Corresponding patch point; S6.4, Judgment Is it true? If so, change position P mid The corresponding patch point is used as the new right endpoint P end To update the interval [P start , P end ], position P mid The performance score of the corresponding patch point is the new right endpoint baseline value V end , otherwise position P mid The corresponding patch point is used as the new left endpoint P start To update the interval [P start , P end ], position P mid The performance score of the corresponding patch point is the new left endpoint baseline value V start ; Jump to step S6.2; S6.5, in the patch list DB second Select Left Relative Difference The smallest patch point, the relative difference on the right Minimum patch point, relative fluctuation value The smallest patch point and the patch point with a performance score less than the threshold TL are added to the performance degradation patch list DB set , where the calculation function expression of the threshold TL is: , In the above formula, is the baseline performance score, is the preset performance fluctuation threshold, This is the upper limit of the performance test fluctuation of the test equipment.

8. An improved anti-shake kernel performance degradation patch fast binary positioning system, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the improved anti-shake core performance degradation patch fast binary positioning method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method as described in any one of claims 1 to 7 through a processor.

10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the improved anti-shake kernel performance degradation patch fast binary positioning method as described in any one of claims 1 to 7 through a processor.

Citation Information

Patent Citations

  • Software non-repeatable compilation fault location and patch automatic generation method

    CN113268248A

  • A method for locating software non-repeatable compilation faults and automatically generating patches

    CN113268248B

  • Vulnerability patch positioning method

    CN115658514A

  • Tool and realization method for positioning modification and influencing range of patch through software test

    CN107341110A

  • Automatic binary positioning method for domestic operating system kernel performance reduction patch

    CN117234765A