Data processing method and device, equipment, storage medium and product

By simulating the basic block of the run agent load in the second running environment and analyzing its running results, the problem of low simulation testing efficiency in the prior art is solved, and a faster simulation testing process is achieved.

CN119493713APending Publication Date: 2025-02-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311044491.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The prior art is less efficient when running loads in simulation environments and usually takes longer (days or even months) to perform simulation testing.

Method used

By obtaining the preprocessing results of the agent load in the first running environment and simulate the running basic blocks in the second running environment, obtaining the associated data of each basic block, and analyzing the simulation running results of the agent load in the second running environment.

Benefits of technology

Improves the efficiency of simulation testing, reduces simulation testing time, and allows analysis without the need to run the entire agent load in the second running environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493713A_ABST
    Figure CN119493713A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device, equipment, a storage medium and a product. The method comprises the steps that a preprocessing result of an agent load in a first operation environment is obtained, the preprocessing result comprises first microstructure data of each basic block, the basic blocks in the agent load are operated in a simulation mode in a second operation environment, and associated data of each basic block are obtained in the simulation operation process; the associated data comprises second microstructure data of each basic block and the number of times of operation of each basic block in the second operation environment, and analyzing a simulation operation result of the proxy load in the second operation environment based on the first microstructure data and the second microstructure data of the M basic blocks and the number of times of operation in the second operation environment. Therefore, the simulation operation result of the proxy load is analyzed through the microstructure data of the basic block in different operation environments and the operation times of the basic block in the second operation environment, so that the simulation test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, a data processing apparatus, a computer device, a computer-readable storage medium, and a data processing product. Background Art

[0002] With the progress of scientific and technological research, computer-related technologies are developing rapidly. The performance of computer equipment is closely related to the central processing unit. During the design process of the central processing unit, it is necessary to perform performance analysis on the load running on the central processing unit so that designers can improve the design of the central processing unit based on the performance analysis results. Studies have found that running the load directly in the simulation environment usually takes a long time (several days or even months), and the simulation test efficiency is low. Summary of the invention

[0003] The embodiments of the present application provide a data processing method, apparatus, device, computer-readable storage medium and product, which can improve the efficiency of simulation testing.

[0004] On the one hand, an embodiment of the present application provides a data processing method, including:

[0005] Obtaining a preprocessing result of the proxy load in the first operating environment, the proxy load includes M basic blocks, and the preprocessing result includes first microstructure data of each basic block; the first microstructure data of any basic block is the operating data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment reaches a corresponding preset value, and M is a positive integer;

[0006] Simulating and running M basic blocks in a second operating environment, and obtaining associated data of each basic block during the simulation running process; the associated data includes second microstructure data of each basic block and the number of times each basic block is run in the second operating environment; wherein the second microstructure data of any basic block is the running data obtained when the basic block is run once in the second operating environment; the number of times any basic block is run in the second operating environment is determined based on the first microstructure data of the basic block; the first operating environment and the second operating environment are different;

[0007] Based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second running environment, the simulation running results of the proxy load in the second running environment are analyzed.

[0008] On the one hand, an embodiment of the present application provides a data processing device, the data processing device comprising:

[0009] an acquisition unit, configured to acquire a preprocessing result of the proxy load in the first operating environment, the proxy load comprising M basic blocks, and the preprocessing result comprising first microstructure data of each basic block; the first microstructure data of any basic block is operating data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment reaches a corresponding preset value, and M is a positive integer;

[0010] A processing unit, configured to simulate and run the M basic blocks in a second running environment;

[0011] The acquisition unit is further used to acquire the associated data of each basic block during the simulation operation; the associated data includes the second microstructure data of each basic block and the number of operations of each basic block in the second operation environment; wherein the second microstructure data of any basic block is the operation data obtained when the basic block is operated once in the second operation environment; the number of operations of any basic block in the second operation environment is determined based on the first microstructure data of the basic block; the first operation environment and the second operation environment are different;

[0012] The processing unit is also used to analyze the simulation running results of the proxy load in the second operating environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment.

[0013] In one embodiment, the process of the acquisition unit acquiring the associated data of each basic block includes:

[0014] Obtaining third microstructure data of the i-th basic block, the third microstructure data of the i-th basic block being operation data when the i-th basic block is run N times in the second operation environment; i is a positive integer less than or equal to M, and N is a positive integer;

[0015] If the difference between the third microstructure data of the i-th basic block and the first microstructure data of the i-th basic block is less than the difference threshold, the number of executions of the i-th basic block in the second execution environment is determined based on the number of executions N.

[0016] In one implementation, the processing unit is configured to determine the number of times the i-th basic block is run in the second running environment based on the number of runs N, specifically to:

[0017] Select at least one sampling value in the range of (N, N+P], where P is a positive integer;

[0018] Obtaining microstructure data of the i-th basic block at each sampling value, the microstructure data of the i-th basic block at the sampling value N+j is the running data of the i-th basic block when it runs N+j times in the second running environment, where j is a positive integer less than or equal to P;

[0019] If the difference between the microstructure data of the i-th basic block at each sampling value and the first microstructure data of the i-th basic block is less than the difference threshold, the number of times the i-th basic block is run in the second running environment is set to N.

[0020] In one embodiment, the preprocessing result further includes each basic block detection point, and the detection point of any basic block is generated when the number of times the basic block is run in the first running environment reaches a corresponding preset value; when M is an integer greater than 1, the processing unit is used to simulate and run M basic blocks in the second running environment, specifically to:

[0021] The checkpoints of the M basic blocks are restored in the second execution environment, and the M basic blocks are executed in parallel in the second execution environment based on the checkpoints of the M basic blocks.

[0022] In one embodiment, the first micro-structure data of each basic block includes the first number of instructions of the basic block and the first number of cycles of the basic block; the second micro-structure data of each basic block includes the second number of instructions of the basic block and the second number of cycles of the basic block; the simulation operation result includes the cycle instruction throughput;

[0023] The processing unit is used to analyze the simulation running results of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the running times of the M basic blocks in the second running environment, specifically for:

[0024] The sum of the numbers of instructions of the M basic blocks is summed to obtain the total number of instructions; the sum of the number of instructions of the i-th basic block is obtained by summing the first number of instructions of the i-th basic block and the first product, where the first product is the product of the second number of instructions of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M;

[0025] The sum of the loop counts of the M basic blocks is summed to obtain a total loop count; the sum of the loop count of the i-th basic block is obtained by summing the first loop count of the i-th basic block and the second product, where the second product is the product of the second loop count of the i-th basic block and the number of times the i-th basic block is run in the second running environment;

[0026] Calculate the ratio of the total number of instructions to the total number of cycles to get the cycle instruction throughput.

[0027] In one embodiment, the first micro-structure data of each basic block includes a first access number of the basic block to the data cache memory during operation and a first miss number of the basic block to the data cache memory during operation; the second micro-structure data of each basic block includes a second access number of the basic block to the data cache memory during operation and a second miss number of the basic block to the data cache memory during operation; the simulation operation result includes a miss rate;

[0028] The processing unit is used to analyze the simulation running results of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the running times of the M basic blocks in the second running environment, specifically for:

[0029] The sum of the access counts of the M basic blocks is summed to obtain the total access count; the sum of the access count of the i-th basic block is obtained by summing the first access count of the i-th basic block and the third product, where the third product is the product of the second access count of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M;

[0030] The sum of the missing times of the M basic blocks is summed to obtain the total missing times; the sum of the missing times of the i-th basic block is obtained by summing the first missing times of the i-th basic block and the fourth product, where the fourth product is the product of the second missing times of the i-th basic block and the number of times the i-th basic block is run in the second running environment;

[0031] The ratio of the total number of misses to the total number of accesses is calculated to obtain the miss rate.

[0032] In one embodiment, the first micro-structure data of the i-th basic block includes at least one of the following parameters: the first instruction number of the i-th basic block, the first loop number of the i-th basic block, the first access number of the i-th basic block to the data cache memory during the running process, the first miss number of the i-th basic block to the data cache memory during the running process, the first branch instruction number of the i-th basic block, and the first error number of branch prediction errors occurring during the running process of the i-th basic block; i is a positive integer less than or equal to M;

[0033] The second microstructure data of the i-th basic block includes at least one of the following parameters: a second number of instructions of the i-th basic block, a second number of loops of the i-th basic block, a second number of accesses of the i-th basic block to the data cache memory during operation, a second number of misses of the i-th basic block to the data cache memory during operation, a second number of branch instructions of the i-th basic block, and a second number of branch prediction errors of the i-th basic block during operation.

[0034] In one embodiment, the proxy load is obtained by performing cloud hybrid processing on the original load;

[0035] The preset value corresponding to each basic block satisfies the preheating condition, and the preset value corresponding to the i-th basic block satisfies the preheating condition if: when the number of runs of the i-th basic block in the first running environment falls within a target range, the difference between the running data of the i-th basic block at different running times is less than a difference threshold, and the target range is determined based on the preset value corresponding to the i-th basic block.

[0036] Accordingly, the present application provides a computer device, the computer device comprising:

[0037] a memory, wherein a computer program is stored in the memory;

[0038] The processor is used to load a computer program to implement the above data processing method.

[0039] Accordingly, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned data processing method.

[0040] Accordingly, the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned data processing method.

[0041] In the embodiment of the present application, the preprocessing result of the proxy load in the first operating environment is obtained, the proxy load includes M basic blocks, the preprocessing result includes the first microstructure data of each basic block, the M basic blocks are simulated and run in the second operating environment, and in the simulation process, the associated data of each basic block is obtained, the associated data includes the second microstructure data of each basic block and the number of times each basic block is run in the second operating environment, and the simulation running result of the proxy load in the second operating environment is analyzed based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment. It can be seen that the simulation running result of the proxy load in the second operating environment is analyzed by the microstructure data of the M basic blocks in different operating environments and the number of times each basic block is run in the second operating environment, (there is no need to run the entire proxy load in the second operating environment), thereby improving the efficiency of simulation testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A data processing scenario diagram provided for an embodiment of the present application;

[0044] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;

[0045] Figure 3 A flowchart of another data processing method provided in an embodiment of the present application;

[0046] Figure 4a A framework diagram for obtaining simulation operation results provided in an embodiment of the present application;

[0047] Figure 4b A simulation process comparison diagram provided for an embodiment of the present application;

[0048] Figure 5 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0049] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] This application involves load-related technologies. The following is a brief introduction to the related technologies involved:

[0052] Basic block: A basic block refers to a sequence of instructions in program execution. A basic block includes entry instructions and exit instructions. The entry instruction can be the first instruction in a sequence of instructions. Specifically, the entry instruction is the first instruction of a slice, or the instruction pointed to by the target address of a jump instruction, or the first instruction after a jump instruction. The exit instruction can be the last instruction in a sequence of instructions. Specifically, the exit instruction is a branch instruction. Branch instructions are used to jump between basic blocks.

[0053] CloudMix: refers to reducing the instructions in the original load based on one or more alignment indicators (such as branch instruction ratio, branch unpredicted rate, operation instruction ratio, instruction number ratio, etc.) to obtain a proxy load.

[0054] Based on the above-mentioned load-related technologies, an embodiment of the present application provides a data processing solution that can improve the efficiency of simulation testing. Figure 1 A data processing scenario diagram provided in an embodiment of the present application, such as Figure 1 As shown, the data processing scenario provided by the present application includes computer devices 101 and computer devices 102, and the data processing scheme provided by the present application can be executed by computer device 101. Computer devices 101 and computer devices 102 can be terminal devices or servers. Among them, terminal devices can include but are not limited to: smart phones (such as Android phones, IOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (Mobile Internet Devices, referred to as MID), vehicle terminals, smart home appliances, wearable devices, etc., and the embodiments of the present application do not limit this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and basic cloud computing services such as big data and artificial intelligence platforms, and the embodiments of the present application do not limit this.

[0055] It should be noted that Figure 1 The number of computer devices is only used as an example and does not constitute an actual limitation of this application; for example, Figure 1 The computer device 103, the computer device 104, etc. may also be included. The computer device 101 and the computer device 102 may be connected via a wired or wireless manner, which is not limited in the present application.

[0056] The following is a description of the general process of the data processing solution provided by this application:

[0057] (1) The computer device 101 obtains the preprocessing result of the proxy load in the first operating environment. The proxy load includes M basic blocks, where M is a positive integer. The proxy load can be obtained by the computer device 102 performing cloud hybrid processing (CloudMix) on the original load. The preprocessing result includes the first microstructure data of each basic block. The first microstructure data of any basic block is the operation data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment (such as a functional simulator) reaches a corresponding preset value.

[0058] In one embodiment, the first microstructure data of the i-th basic block includes at least one of the following parameters: the first number of instructions of the i-th basic block, the first number of loops of the i-th basic block, the first number of accesses of the i-th basic block to the data cache memory during operation, the first number of misses of the i-th basic block to the data cache memory during operation, the first number of branch instructions of the i-th basic block, and the first number of branch prediction errors of the i-th basic block during operation; i is a positive integer less than or equal to M.

[0059] (2) The computer device simulates and runs M basic blocks in a second operating environment (such as a central processing unit simulation platform), and obtains the associated data of each basic block during the simulation process. The first operating environment and the second operating environment are different. The associated data of any basic block include the second microstructure data of the basic block and the number of times the basic block is run in the second operating environment. Specifically, the second microstructure data of any basic block is the operating data obtained when the basic block is run once (such as the first run) in the second operating environment. The second microstructure data of the i-th basic block includes at least one of the following parameters: the second number of instructions of the i-th basic block, the second number of loops of the i-th basic block, the second number of accesses of the i-th basic block to the data cache memory during the operation, the second number of misses of the i-th basic block to the data cache memory during the operation, the second number of branch instructions of the i-th basic block, and the second number of branch prediction errors of the i-th basic block during the operation.

[0060] The number of (repeated) runs of any basic block in the second operating environment is determined based on the first microstructure data of the basic block. In one embodiment, the computer device 101 repeatedly runs the basic block in the second operating environment (when M>1, each basic block can run in parallel in the second operating environment based on the basic detection point), and collects the running data (microstructure data) of each basic block at different repeated running times according to the sampling rule (such as equal interval sampling). When the number of runs of the i-th basic block is N, if the difference between the collected running data (microstructure data) and the first microstructure data of the i-th basic block is less than the difference threshold, the computer device 101 sets the value of the number of runs of the i-th basic block in the second operating environment to N.

[0061] (3) The computer device 101 analyzes the simulation running results of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the number of times the M basic blocks are run in the second running environment. The simulation running results may include but are not limited to: Instructions Per Cycle (IPC) and Miss Rate.

[0062] In one embodiment, the first microstructure data of each basic block includes the first number of instructions of the basic block and the first number of loops of the basic block. The second microstructure data of each basic block includes the second number of instructions of the basic block and the second number of loops of the basic block. The simulation operation result includes the cycle instruction throughput. On the one hand, the computer device 101 sums the sum of the instruction numbers of the M basic blocks to obtain the total number of instructions; wherein, the sum of the instruction numbers of the i-th basic block is obtained by summing the first number of instructions of the i-th basic block and the first product, and the first product is the product of the second number of instructions of the i-th basic block and the number of times the i-th basic block is run in the second operating environment; i is a positive integer less than or equal to M. On the other hand, the computer device 101 sums up the summed results of the number of loops of the M basic blocks to obtain the total number of loops; wherein the summed result of the number of loops of the i-th basic block is obtained by summing up the first number of loops of the i-th basic block and the second product, and the second product is the product of the second number of loops of the i-th basic block and the number of times the i-th basic block is run in the second running environment. After obtaining the total number of instructions and the total number of loops, the computer device 101 calculates the ratio of the total number of instructions to the total number of loops to obtain the cycle instruction throughput.

[0063] In another embodiment, the first microstructure data of each basic block includes the first access number of the basic block to the data cache memory during operation and the first miss number of the basic block to the data cache memory during operation. The second microstructure data of each basic block includes the second access number of the basic block to the data cache memory during operation and the second miss number of the basic block to the data cache memory during operation. The simulation operation result includes the miss rate. On the one hand, the computer device 101 sums the access number summation results of the M basic blocks to obtain the total access number; wherein, the access number summation result of the i-th basic block is obtained by summing the first access number of the i-th basic block and the third product, and the third product is the product of the second access number of the i-th basic block and the number of operations of the i-th basic block in the second operating environment; i is a positive integer less than or equal to M. On the other hand, the computer device 101 sums up the summed results of the number of misses of the M basic blocks to obtain the total number of misses; wherein the summed result of the number of misses of the i-th basic block is obtained by summing the first number of misses of the i-th basic block and the fourth product, and the fourth product is the product of the second number of misses of the i-th basic block and the number of times the i-th basic block is run in the second running environment. After obtaining the total number of misses and the total number of accesses, the computer device 101 calculates the ratio of the total number of misses to the total number of accesses to obtain the miss rate.

[0064] In the embodiment of the present application, the preprocessing result of the proxy load in the first operating environment is obtained, the proxy load includes M basic blocks, the preprocessing result includes the first microstructure data of each basic block, the M basic blocks are simulated and run in the second operating environment, and in the simulation process, the associated data of each basic block is obtained, the associated data includes the second microstructure data of each basic block and the number of times each basic block is run in the second operating environment, and based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment, the simulation running result of the proxy load in the second operating environment is analyzed. It can be seen that by collecting the microstructure data of the M basic blocks in different operating environments and the number of times each basic block is run in the second operating environment, the simulation running result of the proxy load in the second operating environment is analyzed (without running the entire proxy load in the second operating environment), thereby improving the efficiency of simulation testing.

[0065] Based on the above data processing scheme, the embodiment of the present application proposes a more detailed data processing method. The data processing method proposed in the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.

[0066] See also Figure 2 , Figure 2A flowchart of a data processing method provided in an embodiment of the present application, the data processing method can be executed by a computer device; for example, Figure 1 The computer device 101 shown in FIG. Figure 2 As shown, the data processing method may include the following steps S201-S203:

[0067] S201. Obtain a preprocessing result of the proxy load in the first operating environment.

[0068] The proxy load contains M basic blocks, where M is a positive integer. The proxy load can be obtained by performing cloud hybrid processing (CloudMix) on the original load. The proxy load has the following three characteristics: (1) If the number of instructions in a basic block changes proportionally, the numerator and denominator of the indicators that need to be aligned (such as branch instruction ratio, branch unpredicted rate, operation instruction ratio, instruction number ratio, etc.) will also change proportionally, but the indicator itself remains unchanged; for example, assuming that the number of instructions in a basic block is 10,000, the numerator of the indicator that needs to be aligned is 100 and the denominator is 1000; when the number of instructions in a basic block changes from 10,000 to 20,000, the numerator of the indicator that needs to be aligned changes from 100 to 200, and the denominator changes from 1000 to 2000. (2) When two basic blocks are spliced ​​together, the numerator and denominator of the indicator will be added separately. For example, assuming that the alignment index 1 of basic block 1 is 100 / 1000 and the alignment index 1 of basic block 2 is 40 / 200, then after concatenating basic block 1 and basic block 2, the alignment index 1 of the concatenated basic block is (100+40) / (1000+200). (3) There is no data dependency between basic blocks; that is, for two basic blocks that are executed one after the other, the execution flow of the latter will not change due to the data written to the memory by the former.

[0069] The preprocessing result includes the first microstructure data of each basic block, and the first microstructure data of any basic block is the operation data of the basic block obtained by statistics when the number of operations of the basic block in the first operation environment (such as a functional simulator) reaches the corresponding preset value. In one embodiment, the corresponding preset value of each basic block satisfies the preheating condition, and the corresponding preset value of the i-th basic block satisfies the preheating condition when: when the number of operations of the i-th basic block in the first operation environment falls within the target range, the difference between the microstructure data (operation data) of the i-th basic block at different operation times (all within the target range) is less than the difference threshold, and the target range is determined based on the corresponding preset value of the i-th basic block; for example, assuming that N is the corresponding preset value of the i-th basic block, the target range can be [N, N+P] or [NP, N+P], and N and P are both positive integers.

[0070] In one implementation, the computer device obtains the original load, performs cloud hybrid processing on the original load, and obtains the proxy load; then preprocesses the proxy load in the first operating environment to obtain the preprocessing result of the proxy load in the first operating environment. Specifically, the computer device runs each basic block in the first operating environment according to the number of times indicated by the corresponding preset value of each basic block, and after reaching the number of times indicated by the corresponding preset value of the basic block, the computer device records the operation data of the basic block to obtain the first microstructure data of the basic block.

[0071] In one embodiment, the first microstructure data of the i-th basic block includes at least one of the following parameters: the first number of instructions of the i-th basic block, the first number of loops of the i-th basic block, the first number of accesses of the i-th basic block to the data cache memory during operation, the first number of misses of the i-th basic block to the data cache memory during operation, the first number of branch instructions of the i-th basic block, and the first number of branch prediction errors of the i-th basic block during operation; i is a positive integer less than or equal to M.

[0072] It should be noted that the preprocessing results of the proxy load in the first operating environment can be used for simulation result analysis in multiple operating environments (such as the second operating environment, the third operating environment, etc.).

[0073] S202: Simulate and run M basic blocks in the second running environment, and obtain associated data of each basic block during the simulation.

[0074] The first operating environment is different from the second operating environment. In one embodiment, the second operating environment may be a high-performance server cluster carrying a server operating system. The associated data of any basic block includes the second microstructure data of the basic block and the number of times the basic block is run in the second operating environment. Specifically, the second microstructure data of any basic block is the operating data obtained when the basic block is run once (such as the first run) in the second operating environment. The second microstructure data of the i-th basic block includes at least one of the following parameters: the second number of instructions of the i-th basic block, the second number of loops of the i-th basic block, the second number of accesses of the i-th basic block to the data cache memory during operation, the second number of misses of the i-th basic block to the data cache memory during operation, the second number of branch instructions of the i-th basic block, and the second number of branch prediction errors of the i-th basic block during operation.

[0075] The (repeated) running times of any basic block in the second running environment is determined based on the first microstructure data of the basic block. In one embodiment, the computer device repeatedly runs the basic block in the second running environment. In one embodiment, the preprocessing result also includes each basic detection point, and the detection point of any basic block is generated when the running times of the basic block in the first running environment reaches the corresponding preset value; when M is an integer greater than 1, the computer device restores the detection points of M basic blocks in the second running environment. Since there is no data dependency between the detection points of each basic block, the computer device can run M basic blocks in parallel in the second running environment based on the detection points of each basic block. Further, the computer device collects the running data (microstructure data) of each basic block under different repeated running times according to the sampling rule (such as equal interval sampling, random interval sampling, etc.). When the running times of the i-th basic block are within the range of [N, N+P], the difference between the collected running data (microstructure data) of multiple (at least two) i-th basic blocks and the first microstructure data of the i-th basic block is less than the difference threshold, then the computer device sets the value of the running times of the i-th basic block in the second running environment to N.

[0076] In another embodiment, the computer device repeatedly runs the basic blocks in the second operating environment, and collects the operating data (microstructure data) of each basic block at different repeated operating times according to a sampling rule (such as equal interval sampling, random interval sampling, etc.). When the difference between the operating data (microstructure data) of the i-th basic block collected when the i-th basic block is running for N times and the first microstructure data of the i-th basic block is less than a difference threshold, the computer device sets the value of the number of times the i-th basic block is running in the second operating environment to N.

[0077] S203, based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second running environment, analyzing the simulation running results of the proxy load in the second running environment.

[0078] The simulation operation result includes one or more indicators. The computer device can calculate the corresponding indicators based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment, so as to analyze the simulation operation result of the proxy load in the second operating environment. The simulation operation result may specifically include but is not limited to: Instructions Per Cycle (IPC) and Miss Rate.

[0079] In one embodiment, the first microstructure data of each basic block includes the first number of instructions of the basic block and the first number of loops of the basic block. The second microstructure data of each basic block includes the second number of instructions of the basic block and the second number of loops of the basic block. The simulation operation results include cycle instruction throughput. On the one hand, the computer device sums the summed results of the number of instructions of M basic blocks to obtain the total number of instructions; wherein, the summed result of the number of instructions of the i-th basic block is obtained by summing the first number of instructions of the i-th basic block and the first product, and the first product is the product of the second number of instructions of the i-th basic block and the number of times the i-th basic block is run in the second operating environment; i is a positive integer less than or equal to M. In one embodiment, M=3, the computer device sums the summed results of the number of instructions of 3 basic blocks, and the total number of instructions can be expressed as:

[0080] InstAll=(AC.inst+A.InstA*N1)+(BC.inst+B.InstB*N2)+(CC.inst+C.instC*N3)

[0081] Where, InstAll represents the total number of instructions, (AC.inst+A.InstA*N1) is the sum of the number of instructions of basic block A; where AC.inst represents the first number of instructions of basic block A (obtained when the number of operations in the first operating environment reaches the corresponding preset value), A.InstA represents the second number of instructions of basic block A (obtained after one operation in the second operating environment), and N1 is the number of operations of basic block A in the second operating environment. Similarly, (BC.inst+B.InstB*N2) is the sum of the number of instructions of basic block B; where BC.inst represents the first number of instructions of basic block B (obtained when the number of operations in the first operating environment reaches the corresponding preset value), B.InstB represents the second number of instructions of basic block B (obtained after one operation in the second operating environment), and N2 is the number of operations of basic block B in the second operating environment. (CC.inst+C.InstC*N3) is the sum of the number of instructions of the basic block C; wherein CC.inst represents the number of first instructions of the basic block C (obtained when the number of operations in the first operating environment reaches a corresponding preset value), C.InstC represents the number of second instructions of the basic block C (obtained when it is run once in the second operating environment), and N3 is the number of times the basic block C is run in the second operating environment.

[0082] On the other hand, the computer device sums up the sum of the cycle counts of the M basic blocks to obtain the total cycle count; wherein the sum of the cycle count of the i-th basic block is obtained by summing the first cycle count of the i-th basic block and the second product, and the second product is the product of the second cycle count of the i-th basic block and the number of times the i-th basic block is run in the second running environment. In one embodiment, M=3, the computer device sums up the sum of the cycle counts of the three basic blocks, and the total cycle count can be expressed as:

[0083] CycleAll=(AC.cycles+A.cycle*N1)+(BC.cycles+B.cycle*N2)+(CC.cycles+C.cycle*N3)

[0084] Wherein, CycleAll represents the total number of cycles, (AC.cycles+A.cycle*N1) is the sum of the number of cycles of basic block A; where AC.cycles represents the first number of cycles of basic block A (obtained when the number of runs in the first operating environment reaches the corresponding preset value), A.cycle represents the second number of cycles of basic block A (obtained when the number of runs in the second operating environment is once), and N1 is the number of runs of basic block A in the second operating environment. Similarly, (BC.cycles+B.cycle*N2) is the sum of the number of cycles of basic block B; where BC.cycles represents the first number of cycles of basic block B (obtained when the number of runs in the first operating environment reaches the corresponding preset value), B.cycle represents the second number of cycles of basic block B (obtained when the number of runs in the second operating environment is once), and N2 is the number of runs of basic block B in the second operating environment. (CC.cycles+C.cycle*N3) is the sum of the number of cycles of the basic block C; wherein CC.cycles represents the first number of cycles of the basic block C (obtained when the number of runs in the first operating environment reaches the corresponding preset value), C.cycle represents the second number of cycles of the basic block C (obtained when it is run once in the second operating environment), and N3 is the number of runs of the basic block C in the second operating environment.

[0085] After obtaining the total number of instructions and the total number of cycles, the computer device calculates the ratio of the total number of instructions to the total number of cycles to obtain the cycle instruction throughput, which can be specifically expressed as:

[0086] IPC=InstAll / CycleAll

[0087] Among them, IPC is the cycle instruction throughput, InstAll represents the total number of instructions, and CycleAll represents the total number of cycles.

[0088] In another embodiment, the first microstructure data of each basic block includes the first access number of the basic block to the data cache memory during operation and the first miss number of the basic block to the data cache memory during operation. The second microstructure data of each basic block includes the second access number of the basic block to the data cache memory during operation and the second miss number of the basic block to the data cache memory during operation. The simulation operation result includes the miss rate. On the one hand, the computer device sums the access number summation results of the M basic blocks to obtain the total access number; wherein the access number summation result of the i-th basic block is obtained by summing the first access number of the i-th basic block and the third product, and the third product is the product of the second access number of the i-th basic block and the number of times the i-th basic block runs in the second operating environment; i is a positive integer less than or equal to M. In one embodiment, M=3, the computer device sums the access number summation results of the 3 basic blocks to obtain the total access number, which can be expressed as:

[0089] DcacheAccessAll=(AC.DCaches+A.DCachesAccess*N1)+(BC.DCachess+B.DCachesAccess*N2)+(CC.DCaches+C.DCachesAccess*N3)

[0090] Wherein, DcacheAccessAll represents the total number of accesses, (AC.DCaches+A.DCachesAccess*N1) is the sum of the number of accesses of basic block A; wherein, AC.DCaches represents the first number of accesses of basic block A to the data cache memory (dcache) during operation (obtained by statistics when the number of operations in the first operation environment reaches the corresponding preset value), A.DCachesAccess represents the second number of accesses of basic block A to the data cache memory during operation (obtained by one operation in the second operation environment), and N1 is the number of operations of basic block A in the second operation environment. Similarly, (BC.DCaches+B.DCachesAccess*N2) is the sum of the number of accesses of basic block B; wherein, BC.DCaches represents the first number of accesses of basic block B to the data cache memory during operation (obtained by statistics when the number of operations in the first operation environment reaches the corresponding preset value), B.DCachesAccess represents the second number of accesses of basic block B to the data cache memory during operation (obtained by one operation in the second operation environment), and N2 is the number of operations of basic block B in the second operation environment. (CC.DCaches+C.DCachesAccess*N3) is the sum of the access times of the basic block C; wherein CC.DCaches represents the first access times of the basic block C to the data cache memory during operation (obtained when the number of operations in the first operating environment reaches the corresponding preset value), C.DCachesAccess represents the second access times of the basic block C to the data cache memory during operation (obtained once in the second operating environment), and N3 is the number of operations of the basic block C in the second operating environment.

[0091] On the other hand, the computer device sums up the sum of the number of misses (dcache misses) of the M basic blocks to obtain the total number of misses; wherein the sum of the number of misses of the i-th basic block is obtained by summing the first number of misses of the i-th basic block and the fourth product, and the fourth product is the product of the second number of misses of the i-th basic block and the number of times the i-th basic block is run in the second running environment. In one embodiment, M=3, the computer device sums up the sum of the number of misses of the three basic blocks, and the total number of misses can be expressed as:

[0092] DCacheMissAll=(AC.DCacheMiss+A.DCachesMiss*N1)+(BC.DCacheMiss+B.DCachesMiss*N2)+(CC.DCacheMiss+C.DCachesMiss*N3)

[0093] Wherein, DCacheMissAll represents the total number of misses, (AC.DCacheMiss+A.DCachesMiss*N1) is the sum of the number of misses of basic block A; wherein, AC.DCacheMiss represents the first number of misses of basic block A accessing the data cache memory (dcache) during operation (obtained when the number of operations in the first operating environment reaches the corresponding preset value), A.DCachesMiss represents the second number of misses of basic block A accessing the data cache memory during operation (obtained after one operation in the second operating environment), and N1 is the number of operations of basic block A in the second operating environment. Similarly, (BC.DCacheMiss+B.DCachesMiss*N2) is the sum of the number of misses of the basic block B; wherein BC.DCacheMiss represents the first number of misses of the basic block B accessing the data cache memory (dcache) during operation (obtained when the number of operations in the first operating environment reaches a corresponding preset value), B.DCachesMiss represents the second number of misses of the basic block B accessing the data cache memory during operation (obtained after one operation in the second operating environment), and N2 is the number of operations of the basic block B in the second operating environment. (CC.DCacheMiss+C.DCachesMiss*N3) is the sum of the number of misses of the basic block C; wherein CC.DCacheMiss represents the first number of misses of the basic block C accessing the data cache memory (dcache) during operation (obtained when the number of operations in the first operating environment reaches the corresponding preset value), C.DCachesMiss represents the second number of misses of the basic block C accessing the data cache memory during operation (obtained after one operation in the second operating environment), and N3 is the number of operations of the basic block C in the second operating environment.

[0094] After obtaining the total number of missing times and the total number of accesses, the computer device calculates the ratio of the total number of missing times to the total number of accesses to obtain the missing rate. Specifically, it can be expressed as:

[0095] Miss rate = DCacheMissAll / DcacheAccessAll

[0096] Among them, DCacheMissAll is the total number of misses, and DcacheAccessAll is the total number of accesses.

[0097] In the embodiment of the present application, the preprocessing result of the proxy load in the first operating environment is obtained, the proxy load includes M basic blocks, the preprocessing result includes the first microstructure data of each basic block, the M basic blocks are simulated and run in the second operating environment, and in the simulation process, the associated data of each basic block is obtained, the associated data includes the second microstructure data of each basic block and the number of times each basic block is run in the second operating environment, and based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment, the simulation running result of the proxy load in the second operating environment is analyzed. It can be seen that by collecting the microstructure data of the M basic blocks in different operating environments and the number of times each basic block is run in the second operating environment, the simulation running result of the proxy load in the second operating environment is analyzed (without running the entire proxy load in the second operating environment), thereby improving the efficiency of simulation testing.

[0098] See also Figure 3 , Figure 3 A flowchart of another data processing method provided in an embodiment of the present application, the data processing method can be executed by a computer device; for example, Figure 1 The computer device 101 shown in FIG. Figure 3 As shown, the data processing method may include the following steps S301-S304:

[0099] S301. Obtain a preprocessing result of the proxy load in the first operating environment.

[0100] For the specific implementation of step S301, please refer to Figure 2 The implementation of step S201 will not be repeated here.

[0101] S302: Obtain second microstructure data of each basic block.

[0102] The second microstructure data of any basic block is the operation data obtained when the basic block is run once in the second operation environment. In one embodiment, the preprocessing result also includes each basic detection point, and the detection point of any basic block is generated when the number of times the basic block is run in the first operation environment reaches a corresponding preset value; when M is an integer greater than 1, the computer device restores the detection points of M basic blocks in the second operation environment, and runs the M basic blocks in parallel in the second operation environment based on the detection points of the M basic blocks. The operation data obtained after each basic block is run once (such as the first run) in the second operation environment is counted to obtain the second microstructure data of the basic block.

[0103] It should be noted that running the M basic blocks in parallel in the second operating environment can save simulation time and further improve the efficiency of obtaining simulation results.

[0104] S303 : Determine the number of times the basic block is run using the first microstructure data of each basic block.

[0105] In one embodiment, the computer device obtains the third microstructure data of the i-th basic block, and the third microstructure data of the i-th basic block is the operation data when the i-th basic block is run N times in the second operating environment; i is a positive integer less than or equal to M, and N is a positive integer. If the difference between the third microstructure data of the i-th basic block and the first microstructure data of the i-th basic block is less than a difference threshold (such as a difference ratio of less than 1%), the computer device determines the number of times the i-th basic block is run in the second operating environment based on the number of runs N. In one embodiment, the computer device can directly determine the number of times the i-th basic block is run in the second operating environment using the number of runs N.

[0106] In another example, the computer device selects at least one sampling value in the range of (N, N+P], where P is a positive integer. Further, the computer device obtains microstructure data of the i-th basic block at each sampling value, and the microstructure data of the i-th basic block at the sampling value N+j is the operation data when the i-th basic block is run N+j times in the second operating environment, and j is a positive integer less than or equal to P. If the difference between the microstructure data of the i-th basic block at each sampling value and the first microstructure data of the i-th basic block is less than the difference threshold, the number of times the i-th basic block is run in the second operating environment is set to N. For example, let N=50 0, P = 100, starting from the 500th execution of the i-th basic block, the computer device collects the operation data of the i-th basic block at the current execution number (obtains the microstructure data of the i-th basic block at the current execution number) every 10th execution of the i-th basic block, until the execution number of the i-th basic block reaches 600. If the differences between the microstructure data collected by the computer device when the execution numbers of the i-th basic block are 500, 510, 520 ... 590, 600 respectively and the first microstructure data of the i-th basic block are all less than the difference threshold, then the execution number N is used to determine the execution number of the i-th basic block in the second execution environment.

[0107] Accordingly, if the difference between the microstructure data of the ith basic block under at least one sampling value and the first microstructure data of the ith basic block is greater than or equal to the difference threshold, the number of runs N is discarded, and the ith basic block continues to run until N' (N' is an integer greater than N) is found. When the number of runs of the ith basic block is within the range [N', N'+P], the difference between the microstructure data obtained by statistics and the first microstructure data of the ith basic block is less than the difference threshold. The computer device determines the number of runs of the ith basic block in the second running environment by the number of runs N'.

[0108] S304, analyzing simulation running results of the proxy load in the second running environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second running environment.

[0109] For the specific implementation of step S304, please refer to Figure 2 The implementation of step S203 will not be repeated here.

[0110] Figure 4a A framework diagram for obtaining simulation operation results provided in an embodiment of the present application. Figure 4a As shown, from the timeline, first obtain the preprocessing result of the proxy load in the first operating environment, then obtain the associated data of each basic block (the associated data of any basic block includes the second microstructure data of the basic block and the number of times the basic block is run in the second operating environment). The specific implementation method can refer to step S302 and step S303, which will not be repeated here; finally, based on the first microstructure data of M basic blocks, the second microstructure data of M basic blocks, and the number of times the M basic blocks are run in the second operating environment, analyze the simulation running results of the proxy load in the second operating environment. In the preprocessing process, run each basic block (such as basic block A-basic block C) in parallel (or serially) in the first operating environment, and count the running data of each basic block when the number of times the basic block is run in the first operating environment reaches the corresponding preset value, and obtain the first microstructure data of the basic block (as the check point of the basic block). During the simulation process, the computer device can restore the detection points of each basic block in the second operating environment, and then run each basic block in the second operating environment. During the operation of each basic block in the second operating environment, the operation results (microstructure data) of each basic block at different operation times are collected according to the collection rules, and the operation results of each basic block at different operation times are compared with the first microstructure data of the basic block to determine the number of times each basic block is run in the second operating environment. The specific implementation method can refer to step S303 and will not be repeated here. Then the computer device analyzes the simulation operation results of the proxy load in the second operating environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment. The specific implementation method can refer to Figure 2 Step S203 will not be described in detail here.

[0111] Figure 4b A simulation process comparison diagram provided in the embodiment of the present application. Figure 4bAs shown, the existing simulation method is to run each basic block one by one (serial) in the second operating environment, and the (repeated) running number of each basic block is the running number indicated in the proxy load. The simulation method provided by the present application is to generate a check point for each basic block in the first operating environment, and restore the check point of each basic block in the second operating environment (there is no data dependency between the check points of each basic block), so as to run each basic block in parallel in the second operating environment and obtain the associated data of each basic block. The simulation running results of the proxy load in the second operating environment are analyzed by the first microstructure data of each basic block in the first operating environment and the associated data of each basic block, (there is no need to run the entire proxy load in the second operating environment), thereby improving the efficiency of simulation testing.

[0112] In the embodiment of the present application, the preprocessing result of the proxy load in the first operating environment is obtained, the proxy load includes M basic blocks, the preprocessing result includes the first microstructure data of each basic block, the M basic blocks are simulated and run in the second operating environment, and in the simulation running process, the associated data of each basic block is obtained, the associated data includes the second microstructure data of each basic block and the number of operations of each basic block in the second operating environment, and the simulation running result of the proxy load in the second operating environment is analyzed based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of operations of the M basic blocks in the second operating environment. It can be seen that by collecting the microstructure data of the M basic blocks in different operating environments and the number of operations of each basic block in the second operating environment, the simulation running result of the proxy load in the second operating environment is analyzed (without running the entire proxy load in the second operating environment), thereby improving the efficiency of simulation testing. In addition, running M basic blocks in parallel in the second operating environment can save simulation time and further improve the efficiency of obtaining simulation results.

[0113] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.

[0114] See also Figure 5 , Figure 5 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application is shown in FIG. Figure 5 The data processing apparatus shown may be mounted in a computer device, which may specifically be a terminal device or a server. Figure 5 The data processing device shown can be used to perform the above Figure 2 and Figure 3 Some or all of the functions of the described method embodiments. Figure 5 , the data processing device comprises:

[0115] The acquisition unit 501 is used to acquire a preprocessing result of the proxy load in the first operating environment, where the proxy load includes M basic blocks, and the preprocessing result includes first microstructure data of each basic block; the first microstructure data of any basic block is the operation data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment reaches a corresponding preset value, and M is a positive integer;

[0116] A processing unit 502 is used for simulating and running M basic blocks in a second running environment;

[0117] The acquisition unit 501 is further used to acquire the associated data of each basic block during the simulation operation; the associated data includes the second microstructure data of each basic block and the number of operations of each basic block in the second operation environment; wherein the second microstructure data of any basic block is the operation data obtained when the basic block is operated once in the second operation environment; the number of operations of any basic block in the second operation environment is determined based on the first microstructure data of the basic block; the first operation environment and the second operation environment are different;

[0118] The processing unit 502 is also used to analyze the simulation running results of the proxy load in the second operating environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment.

[0119] In one implementation, the process of obtaining the associated data of each basic block by the obtaining unit 501 includes:

[0120] Obtaining third microstructure data of the i-th basic block, the third microstructure data of the i-th basic block being operation data when the i-th basic block is run N times in the second operation environment; i is a positive integer less than or equal to M, and N is a positive integer;

[0121] If the difference between the third microstructure data of the i-th basic block and the first microstructure data of the i-th basic block is less than the difference threshold, the number of executions of the i-th basic block in the second execution environment is determined based on the number of executions N.

[0122] In one implementation, the processing unit 502 is configured to determine the number of times the i-th basic block is run in the second running environment based on the number of runs N, specifically to:

[0123] Select at least one sampling value in the range of (N, N+P], where P is a positive integer;

[0124] Obtaining microstructure data of the i-th basic block at each sampling value, the microstructure data of the i-th basic block at the sampling value N+j is the running data of the i-th basic block when it runs N+j times in the second running environment, where j is a positive integer less than or equal to P;

[0125] If the difference between the microstructure data of the i-th basic block at each sampling value and the first microstructure data of the i-th basic block is less than the difference threshold, the number of times the i-th basic block is run in the second running environment is set to N.

[0126] In one implementation, the preprocessing result further includes each basic block detection point, and the detection point of any basic block is generated when the number of times the basic block is run in the first running environment reaches a corresponding preset value; when M is an integer greater than 1, the processing unit 502 is used to simulate and run M basic blocks in the second running environment, specifically to:

[0127] The checkpoints of the M basic blocks are restored in the second execution environment, and the M basic blocks are executed in parallel in the second execution environment based on the checkpoints of the M basic blocks.

[0128] In one embodiment, the first micro-structure data of each basic block includes the first number of instructions of the basic block and the first number of cycles of the basic block; the second micro-structure data of each basic block includes the second number of instructions of the basic block and the second number of cycles of the basic block; the simulation operation result includes the cycle instruction throughput;

[0129] The processing unit 502 is used to analyze the simulation running results of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the running times of the M basic blocks in the second running environment, specifically for:

[0130] The sum of the numbers of instructions of the M basic blocks is summed to obtain the total number of instructions; the sum of the number of instructions of the i-th basic block is obtained by summing the first number of instructions of the i-th basic block and the first product, where the first product is the product of the second number of instructions of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M;

[0131] The sum of the loop counts of the M basic blocks is summed to obtain a total loop count; the sum of the loop count of the i-th basic block is obtained by summing the first loop count of the i-th basic block and the second product, where the second product is the product of the second loop count of the i-th basic block and the number of times the i-th basic block is run in the second running environment;

[0132] Calculate the ratio of the total number of instructions to the total number of cycles to get the cycle instruction throughput.

[0133] In one embodiment, the first micro-structure data of each basic block includes a first access number of the basic block to the data cache memory during operation and a first miss number of the basic block to the data cache memory during operation; the second micro-structure data of each basic block includes a second access number of the basic block to the data cache memory during operation and a second miss number of the basic block to the data cache memory during operation; the simulation operation result includes a miss rate;

[0134] The processing unit 502 is used to analyze the simulation running results of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the running times of the M basic blocks in the second running environment, specifically for:

[0135] The sum of the access counts of the M basic blocks is summed to obtain the total access count; the sum of the access count of the i-th basic block is obtained by summing the first access count of the i-th basic block and the third product, where the third product is the product of the second access count of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M;

[0136] The sum of the missing times of the M basic blocks is summed to obtain the total missing times; the sum of the missing times of the i-th basic block is obtained by summing the first missing times of the i-th basic block and the fourth product, where the fourth product is the product of the second missing times of the i-th basic block and the number of times the i-th basic block is run in the second running environment;

[0137] The ratio of the total number of misses to the total number of accesses is calculated to obtain the miss rate.

[0138] In one embodiment, the first micro-structure data of the i-th basic block includes at least one of the following parameters: the first instruction number of the i-th basic block, the first loop number of the i-th basic block, the first access number of the i-th basic block to the data cache memory during the running process, the first miss number of the i-th basic block to the data cache memory during the running process, the first branch instruction number of the i-th basic block, and the first error number of branch prediction errors occurring during the running process of the i-th basic block; i is a positive integer less than or equal to M;

[0139] The second microstructure data of the i-th basic block includes at least one of the following parameters: a second number of instructions of the i-th basic block, a second number of loops of the i-th basic block, a second number of accesses of the i-th basic block to the data cache memory during operation, a second number of misses of the i-th basic block to the data cache memory during operation, a second number of branch instructions of the i-th basic block, and a second number of branch prediction errors of the i-th basic block during operation.

[0140] In one embodiment, the proxy load is obtained by performing cloud hybrid processing on the original load;

[0141] The preset value corresponding to each basic block satisfies the preheating condition, and the preset value corresponding to the i-th basic block satisfies the preheating condition if: when the number of runs of the i-th basic block in the first running environment falls within a target range, the difference between the running data of the i-th basic block at different running times is less than a difference threshold, and the target range is determined based on the preset value corresponding to the i-th basic block.

[0142] According to one embodiment of the present application, Figure 2 and Figure 3 Some of the steps involved in the data processing method shown can be represented by Figure 5 The data processing device shown in the figure is executed by each unit. For example, Figure 2 The step S201 shown in FIG. 1 can be performed by Figure 5 The acquisition unit 501 shown in FIG. 1 is executed, and step S203 can be performed by Figure 5 The processing unit 502 shown in FIG. 1 is executed, and step S202 may be performed by Figure 5 The acquisition unit 501 and the processing unit 502 shown are executed in coordination; Figure 3 Steps S301 and S302 shown in FIG. 1 can be represented by Figure 5 The acquisition unit 501 shown in FIG. 1 is executed, and step S303 and step S304 can be performed by Figure 5 Processing unit 502 is shown executing. Figure 5 The various units in the data processing device shown can be respectively or all combined into one or several other units to constitute, or some of the units (some) can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of the present application, the data processing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0143] According to another embodiment of the present application, the program can be executed by running a program on a general computing device such as a computer device including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 2 and Figure 3 A computer program (including program code) for each step involved in the corresponding method shown in Figure 5 The data processing device shown in and the data processing method of the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer readable recording medium, and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.

[0144] Based on the same inventive concept, the principles and beneficial effects of solving the problems by the data processing device provided in the embodiment of the present application are similar to the principles and beneficial effects of solving the problems by the data processing method in the method embodiment of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.

[0145] See also Figure 6 , Figure 6 The following is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a terminal device or a server. Figure 6 As shown, the computer device at least includes a processor 601, a communication interface 602 and a memory 603. The processor 601, the communication interface 602 and the memory 603 can be connected via a bus or other means. The processor 601 (or central processing unit (CPU)) is the computing core and control core of the computer device, which can parse various instructions in the computer device and process various data of the computer device. For example, the CPU can be used to parse the power on and off instructions issued by the object to the computer device, and control the computer device to perform power on and off operations; for example, the CPU can transmit various interactive data between the internal structures of the computer device, and so on. The communication interface 602 can optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), which can be used to send and receive data under the control of the processor 601; the communication interface 602 can also be used for the transmission and interaction of data within the computer device. The memory 603 (Memory) is a memory device in the computer device, which is used to store programs and data. It can be understood that the memory 603 here can include both the built-in memory of the computer device and the extended memory supported by the computer device. The memory 603 provides a storage space, which stores the operating system of the computer device, including but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in this application.

[0146] The embodiment of the present application also provides a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores the processing system of the computer device. In addition, a computer program suitable for being loaded and executed by the processor 601 is also stored in the storage space. It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer-readable storage medium located away from the aforementioned processor.

[0147] In one embodiment, the processor 601 performs the following operations by running the computer program in the memory 603:

[0148] Obtaining a preprocessing result of the proxy load in the first operating environment, the proxy load includes M basic blocks, and the preprocessing result includes first microstructure data of each basic block; the first microstructure data of any basic block is the operating data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment reaches a corresponding preset value, and M is a positive integer;

[0149] Simulating and running M basic blocks in a second operating environment, and obtaining associated data of each basic block during the simulation running process; the associated data includes second microstructure data of each basic block and the number of times each basic block is run in the second operating environment; wherein the second microstructure data of any basic block is the running data obtained when the basic block is run once in the second operating environment; the number of times any basic block is run in the second operating environment is determined based on the first microstructure data of the basic block; the first operating environment and the second operating environment are different;

[0150] Based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second running environment, the simulation running results of the proxy load in the second running environment are analyzed.

[0151] As an optional embodiment, the process of the processor 601 acquiring the associated data of each basic block includes:

[0152] Obtaining third microstructure data of the i-th basic block, the third microstructure data of the i-th basic block being operation data when the i-th basic block is run N times in the second operation environment; i is a positive integer less than or equal to M, and N is a positive integer;

[0153] If the difference between the third microstructure data of the i-th basic block and the first microstructure data of the i-th basic block is less than the difference threshold, the number of executions of the i-th basic block in the second execution environment is determined based on the number of executions N.

[0154] As an optional embodiment, a specific embodiment of the processor 601 determining the number of executions of the i-th basic block in the second execution environment based on the number of executions N is as follows:

[0155] Select at least one sampling value in the range of (N, N+P], where P is a positive integer;

[0156] Obtaining microstructure data of the i-th basic block at each sampling value, the microstructure data of the i-th basic block at the sampling value N+j is the running data of the i-th basic block when it runs N+j times in the second running environment, where j is a positive integer less than or equal to P;

[0157] If the difference between the microstructure data of the i-th basic block at each sampling value and the first microstructure data of the i-th basic block is less than the difference threshold, the number of times the i-th basic block is run in the second running environment is set to N.

[0158] As an optional embodiment, the preprocessing result further includes each basic block detection point, and the detection point of any basic block is generated when the number of times the basic block is run in the first running environment reaches a corresponding preset value; when M is an integer greater than 1, the specific embodiment of the processor 601 simulating and running M basic blocks in the second running environment is:

[0159] The checkpoints of the M basic blocks are restored in the second execution environment, and the M basic blocks are executed in parallel in the second execution environment based on the checkpoints of the M basic blocks.

[0160] As an optional embodiment, the first micro-structure data of each basic block includes the first instruction number of the basic block and the first loop number of the basic block; the second micro-structure data of each basic block includes the second instruction number of the basic block and the second loop number of the basic block; the simulation operation result includes the cycle instruction throughput;

[0161] A specific embodiment of the processor 601 analyzing the simulation running result of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the running times of the M basic blocks in the second running environment is as follows:

[0162] The sum of the numbers of instructions of the M basic blocks is summed to obtain the total number of instructions; the sum of the number of instructions of the i-th basic block is obtained by summing the first number of instructions of the i-th basic block and the first product, where the first product is the product of the second number of instructions of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M;

[0163] The sum of the loop counts of the M basic blocks is summed to obtain a total loop count; the sum of the loop count of the i-th basic block is obtained by summing the first loop count of the i-th basic block and the second product, where the second product is the product of the second loop count of the i-th basic block and the number of times the i-th basic block is run in the second running environment;

[0164] Calculate the ratio of the total number of instructions to the total number of cycles to get the cycle instruction throughput.

[0165] As an optional embodiment, the first micro-structure data of each basic block includes a first access number of the basic block to the data cache memory during operation and a first miss number of the basic block to the data cache memory during operation; the second micro-structure data of each basic block includes a second access number of the basic block to the data cache memory during operation and a second miss number of the basic block to the data cache memory during operation; the simulation operation result includes a miss rate;

[0166] A specific embodiment of the processor 601 analyzing the simulation running result of the proxy load in the second running environment based on the first micro-structure data of the M basic blocks, the second micro-structure data of the M basic blocks, and the running times of the M basic blocks in the second running environment is as follows:

[0167] The sum of the access counts of the M basic blocks is summed to obtain the total access count; the sum of the access count of the i-th basic block is obtained by summing the first access count of the i-th basic block and the third product, where the third product is the product of the second access count of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M;

[0168] The sum of the missing times of the M basic blocks is summed to obtain the total missing times; the sum of the missing times of the i-th basic block is obtained by summing the first missing times of the i-th basic block and the fourth product, where the fourth product is the product of the second missing times of the i-th basic block and the number of times the i-th basic block is run in the second running environment;

[0169] The ratio of the total number of misses to the total number of accesses is calculated to obtain the miss rate.

[0170] As an optional embodiment, the first micro-structure data of the i-th basic block includes at least one of the following parameters: the first instruction number of the i-th basic block, the first loop number of the i-th basic block, the first access number of the i-th basic block to the data cache memory during the running process, the first miss number of the i-th basic block to the data cache memory during the running process, the first branch instruction number of the i-th basic block, and the first error number of branch prediction errors occurring during the running process of the i-th basic block; i is a positive integer less than or equal to M;

[0171] The second microstructure data of the i-th basic block includes at least one of the following parameters: a second number of instructions of the i-th basic block, a second number of loops of the i-th basic block, a second number of accesses of the i-th basic block to the data cache memory during operation, a second number of misses of the i-th basic block to the data cache memory during operation, a second number of branch instructions of the i-th basic block, and a second number of branch prediction errors of the i-th basic block during operation.

[0172] As an optional embodiment, the proxy load is obtained by performing cloud hybrid processing on the original load;

[0173] The preset value corresponding to each basic block satisfies the preheating condition, and the preset value corresponding to the i-th basic block satisfies the preheating condition if: when the number of runs of the i-th basic block in the first running environment falls within a target range, the difference between the running data of the i-th basic block at different running times is less than a difference threshold, and the target range is determined based on the preset value corresponding to the i-th basic block.

[0174] Based on the same inventive concept, the principles and beneficial effects of solving the problems provided by the computer device in the embodiment of the present application are similar to the principles and beneficial effects of solving the problems provided by the data processing method in the method embodiment of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.

[0175] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the data processing method of the above method embodiment.

[0176] The embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned data processing method.

[0177] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0178] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0179] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the readable storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0180] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiment and equivalent changes made according to the claims of the present application are still within the scope covered by the application.

Claims

1. A data processing method, characterized in that: The method comprises: Obtaining a preprocessing result of the proxy load in the first operating environment, the proxy load comprising M basic blocks, the preprocessing result comprising first microstructure data of each basic block; the first microstructure data of any basic block is the operating data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment reaches a corresponding preset value, and M is a positive integer; The M basic blocks are simulated and run in a second operating environment, and during the simulation, associated data of each basic block is obtained; the associated data includes second microstructure data of each basic block and the number of times each basic block is run in the second operating environment; the second microstructure data of any basic block is the operating data obtained when the basic block is run once in the second operating environment; the number of times any basic block is run in the second operating environment is determined based on the first microstructure data of the basic block; the first operating environment and the second operating environment are different; Based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment, the simulation running results of the proxy load in the second operating environment are analyzed.

2. The method according to claim 1, characterized in that The process of obtaining the associated data of each basic block includes: Acquire third microstructure data of the i-th basic block, wherein the third microstructure data of the i-th basic block is operation data when the i-th basic block is run N times in the second operation environment; i is a positive integer less than or equal to M, and N is a positive integer; If the difference between the third microstructure data of the i-th basic block and the first microstructure data of the i-th basic block is less than a difference threshold, the number of times the i-th basic block is run in the second running environment is determined based on the number of runs N.

3. The method according to claim 2, characterized in that The determining, based on the execution number N, the execution number of the i-th basic block in the second execution environment comprises: Select at least one sampling value in the range of (N, N+P], where P is a positive integer; Acquire microstructure data of the i-th basic block at each sampling value, wherein the microstructure data of the i-th basic block at the sampling value N+j is operation data when the i-th basic block is run N+j times in the second operation environment, where j is a positive integer less than or equal to P; If the difference between the microstructure data of the i-th basic block at each sampling value and the first microstructure data of the i-th basic block is less than the difference threshold, the number of times the i-th basic block is run in the second running environment is set to N.

4. The method according to claim 2, characterized in that The preprocessing result also includes each basic block detection point, and the detection point of any basic block is generated when the number of operations of the basic block in the first operation environment reaches a corresponding preset value; When M is an integer greater than 1, the simulating and running the M basic blocks in the second operating environment includes: The checkpoints of the M basic blocks are restored in the second execution environment, and the M basic blocks are executed in parallel in the second execution environment based on the checkpoints of the M basic blocks.

5. The method according to claim 1, characterized in that The first micro-structure data of each basic block includes the first number of instructions of the basic block and the first number of cycles of the basic block; the second micro-structure data of each basic block includes the second number of instructions of the basic block and the second number of cycles of the basic block; the simulation operation result includes the cycle instruction throughput; The analyzing the simulation running result of the proxy load in the second running environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the running times of the M basic blocks in the second running environment includes: The sum of the numbers of instructions of the M basic blocks is summed to obtain a total number of instructions; the sum of the number of instructions of the i-th basic block is obtained by summing the first number of instructions of the i-th basic block and a first product, wherein the first product is the product of the second number of instructions of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M; The sum of the loop counts of the M basic blocks is summed to obtain a total loop count; the sum of the loop count of the i-th basic block is obtained by summing a first loop count of the i-th basic block and a second product, where the second product is a product of a second loop count of the i-th basic block and a number of times the i-th basic block is run in the second running environment; The ratio of the total number of instructions to the total number of cycles is calculated to obtain a cycle instruction throughput.

6. The method according to claim 1, characterized in that The first micro-structure data of each basic block includes a first access number of the basic block to the data cache memory during operation and a first miss number of the basic block to the data cache memory during operation; the second micro-structure data of each basic block includes a second access number of the basic block to the data cache memory during operation and a second miss number of the basic block to the data cache memory during operation; the simulation operation result includes a miss rate; The analyzing the simulation running result of the proxy load in the second running environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the running times of the M basic blocks in the second running environment includes: The sum of the access counts of the M basic blocks is summed to obtain a total access count; the sum of the access count of the i-th basic block is obtained by summing the first access count of the i-th basic block and a third product, wherein the third product is the product of the second access count of the i-th basic block and the number of times the i-th basic block is run in the second running environment; i is a positive integer less than or equal to M; The sum of the number of missing times of the M basic blocks is summed to obtain a total number of missing times; the sum of the number of missing times of the i-th basic block is obtained by summing the first number of missing times of the i-th basic block and a fourth product, wherein the fourth product is the product of the second number of missing times of the i-th basic block and the number of times the i-th basic block is run in the second running environment; The ratio of the total number of misses to the total number of accesses is calculated to obtain a miss rate.

7. The method according to claim 1, characterized in that The first micro-structure data of the ith basic block includes at least one of the following parameters: the first instruction number of the ith basic block, the first loop number of the ith basic block, the first access number of the ith basic block to the data cache memory during the running process, the first miss number of the ith basic block to the data cache memory during the running process, the first branch instruction number of the ith basic block, and the first error number of branch prediction errors occurring during the running process of the ith basic block; i is a positive integer less than or equal to M; The second microstructure data of the i-th basic block includes at least one of the following parameters: the second number of instructions of the i-th basic block, the second number of loops of the i-th basic block, the second number of accesses of the i-th basic block to the data cache memory during operation, the second number of misses of the i-th basic block to the data cache memory during operation, the second number of branch instructions of the i-th basic block, and the second number of branch prediction errors of the i-th basic block during operation.

8. The method according to claim 1, characterized in that The proxy load is obtained by performing cloud hybrid processing on the original load; The preset value corresponding to each basic block satisfies the preheating condition, and the preset value corresponding to the i-th basic block satisfies the preheating condition if: when the number of times the i-th basic block runs in the first running environment is within a target range, the difference between the running data of the i-th basic block at different running times is less than a difference threshold, and the target range is determined based on the preset value corresponding to the i-th basic block.

9. A data processing device, characterized in that: The data processing device comprises: an acquisition unit, configured to acquire a preprocessing result of the proxy load in the first operating environment, the proxy load comprising M basic blocks, the preprocessing result comprising first microstructure data of each basic block; the first microstructure data of any basic block is operation data of the basic block obtained by statistics when the number of operations of the basic block in the first operating environment reaches a corresponding preset value, and M is a positive integer; A processing unit, configured to simulate and run the M basic blocks in a second running environment; The acquisition unit is further used to acquire the associated data of each basic block during the simulation operation; the associated data includes the second microstructure data of each basic block and the number of times each basic block is run in the second operation environment; wherein the second microstructure data of any basic block is the operation data obtained when the basic block is run once in the second operation environment; the number of times any basic block is run in the second operation environment is determined based on the first microstructure data of the basic block; the first operation environment and the second operation environment are different; The processing unit is also used to analyze the simulation running results of the proxy load in the second operating environment based on the first microstructure data of the M basic blocks, the second microstructure data of the M basic blocks, and the number of times the M basic blocks are run in the second operating environment.

10. A computer device, characterized in that: include: a memory, wherein a computer program is stored in the memory; A processor, used to load the computer program to implement the data processing method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises a computer program, and the computer program is suitable for being loaded by a processor and executing the data processing method according to any one of claims 1 to 8.