WO2018103045A1 - Checkpoint creation method, device and system - Google Patents
Checkpoint creation method, device and system Download PDFInfo
- Publication number
- WO2018103045A1 WO2018103045A1 PCT/CN2016/109053 CN2016109053W WO2018103045A1 WO 2018103045 A1 WO2018103045 A1 WO 2018103045A1 CN 2016109053 W CN2016109053 W CN 2016109053W WO 2018103045 A1 WO2018103045 A1 WO 2018103045A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- process number
- test program
- simulator
- manager
- test
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 576
- 230000008569 process Effects 0.000 claims abstract description 611
- 230000006870 function Effects 0.000 claims description 155
- 238000012360 testing method Methods 0.000 claims description 77
- 238000010998 test method Methods 0.000 claims description 13
- 238000004088 simulation Methods 0.000 claims description 5
- 238000004891 communication Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000009471 action Effects 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000011056 performance test Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 239000000872 buffer Substances 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012938 design process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 101150108030 ppiD gene Proteins 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
Definitions
- the embodiments of the present invention relate to the field of computers, and in particular, to a method, an apparatus, and a system for creating a test point.
- An emulator is a program that simulates the functions of a hardware processor and the instruction system through software to obtain a predicted output based on a specific input.
- the simulator typically includes a functional simulator and a performance simulator.
- the function simulator is used to achieve the correctness of the processor function, and the performance simulator is used to achieve test data output for performance and efficiency.
- the simulator performance test is a method of running a standard checker on the simulator and getting test results to measure the performance of the simulator itself and whether the hardware parameter settings are reasonable.
- the function simulator test is generally performed first, and then the performance simulator test is performed. After running a basic block on the function simulator, the instruction block is sent to the performance simulator for running.
- a checkpoint is generally created to create a checkpoint at a fixed time or instruction execution interval.
- the function simulator warms up with the performance simulator for a period of time to fill in the data in the performance simulator, and then performs the checkpoint creation process to generate the checkpoint data. This only needs to run the benchmark test program completely and create a series of checkpoints.
- the performance simulator and function simulator can use the checkpoint data to restore the running state and execute some instruction block instructions. You can implement the benchmark test. Checkpoint can greatly shorten the test time and improve the test speed.
- the present invention discloses a method and apparatus for creating a test point, ensuring that the created checkpoint is related to the benchmark, thereby improving the accuracy of the test result.
- the present application provides a method for creating a test point.
- the simulator includes a function simulator, a performance simulator, and a manager.
- the method includes: the manager reads the T1 process number recorded in the process number register at the first time. And determining that the process indicated by the T1 process number is used to execute the test program, wherein the process number register holds the process number of the running process of the function simulator, and the manager sends at least one instruction block after the function simulator is run to the performance
- the simulator executes, the manager reads the T2 process number recorded in the process number register at the second time, and determines that the process indicated by the T2 process number is used to execute the test program, and then the manager creates the test point and records the test point data, wherein
- the test point data contains the snapshot of the function simulator and status information of the performance simulator.
- the manager confirms that the process running by the function simulator is the test program process, and then the test points are created, thus ensuring that the test point data is related to the test program, ensuring the accuracy of subsequent tests. Sex.
- the method before the first time, further includes: the manager reads and records the process number register when the function simulator is first detected to execute the test program.
- the root process number of the record, the process executing the test program is the root process indicated by the root process number or the descendant process of the root process; the manager determines the process indicated by the T1 process number according to the root process number and the interprocess relationship maintained by the function simulator
- the test program is executed, and according to the root process number and the interprocess relationship maintained by the function simulator, it is determined that the process indicated by the T2 process number is used to execute the test program.
- the manager can determine whether a process is a test program process according to the inter-process relationship maintained by the function simulator and the root process of the test program, thereby verifying whether the process running by the function simulator is related to the test program, and creating a checkpoint under relevant circumstances. .
- the method further includes: the inter-process relationship maintained by the manager according to the root process number and the function simulator Determining a test program process number set, the test program process number set containing the process number of the process for executing the test program; the manager determining that the process indicated by the T1 process number is used to execute the test program includes: the manager determines the T1 process number or the T1 process The parent process number of the number belongs to the test program process number set; the manager determines that the process indicated by the T2 process number is used to execute the test program includes: the manager determines that the parent process number of the T2 process number or the T2 process number belongs to the test program process number set.
- the manager determines the test program process number set according to the inter-process relationship and the root process. When verifying whether a process belongs to the test program process, it only needs to see whether the process number of the process belongs to the test program.
- the set of the program number, if it belongs, indicates that the test program process, if not, further determines whether the process is a test program process according to the interprocess relationship and the process number maintained by the function simulator, so that each verification process is not required Checking the interprocess relationship simplifies the verification process.
- the method further includes: if the T1 process number does not belong to the test program process number set, the manager The T1 process number is added to the test program process number set; if the T2 process number does not belong to the test program process number set, the manager adds the T2 process number to the test program process number set.
- the test program process number set is refreshed in real time. Further, if the parent process number of the T1 process number does not belong to the test program process number set, the manager also adds the parent process number of the T1 process number to the test program process. Number set; if the parent process number of the T2 process number does not belong to the test program process number set, the manager also adds the parent process number of the T2 process number to the test program process number set.
- the test program includes the instruction instruction, and the manager detects the function simulator to execute the test program for the first time.
- the root process number of the process number register record is read and recorded.
- the manager reads the process number register after detecting the instruction instruction, and records the root process number recorded by the process number register.
- the manager can monitor each instruction of the test program through the function simulator, and implement the test program by adding an instruction instruction to the test program.
- the monitoring more specifically, the instruction instruction can be added at the beginning of the test program, at which time the process executing the test program is the root process, and the subsequent execution of the test program is the root process or the descendant process of the root process.
- the inter-process relationship maintained by the function simulator is a proc in an operating system running on the function simulator Directory, the proc directory records the relationship between each thread and the parent process of each thread.
- the parent process ID (PPID) of the parent process of the process is recorded in the /proc/pid/stat file of each process. According to the proc directory, you can get a process number tree with the root process number as the root node to describe the relationship between the test program processes.
- the present application provides a readable medium, comprising: executing instructions, when the processor of the computing device executes the execution instruction, the computing device performs any of the first aspect or the first aspect The method in the implementation.
- the present application provides a computing device, including: a processor, and a a memory and a bus; a memory for storing execution instructions, the processor and the memory being connected by a bus, and when the computing device is running, the processor executing the memory stored execution instructions to cause the computing device to perform the above first aspect or the first aspect A method in a possible implementation.
- the application provides a device for creating a test point
- the simulator includes a function simulator and a performance simulator
- the device includes: a reading unit, configured to read the T1 process recorded by the process number register at the first time No., wherein the process number register holds the process number of the running process of the function simulator; the determining unit: the process for determining the T1 process number indication is used to execute the test program; and the scheduling unit is configured to run the function simulator At least one instruction block is sent to the performance simulator for execution; the reading unit is further configured to read the T2 process number recorded by the process number register at a second time; the determining unit is further configured to determine that the process indicated by the T2 process number is used to execute the test program Create a unit to create a test point and record test point data, where the test point data contains a snapshot of the function simulator and status information of the performance simulator.
- the reading unit is further configured to: read and record the process number register record when the function simulator is first detected to execute the test program
- the root process number, the process executing the test program is the root process indicated by the root process number or the descendant process of the root process
- the determining unit is configured to determine the process indicated by the T1 process number according to the root process number and the interprocess relationship maintained by the function simulator Used to execute the test program and used to determine the process indicated by the T2 process number to execute the test program based on the root process number and the interprocess relationship maintained by the function simulator.
- the determining unit is further configured to determine, according to the root process ID and the inter-process relationship maintained by the function simulator a test program process number set, the test program process number set includes a process number of a process for executing the test program; the determining unit is configured to determine a process indicated by the T1 process number for executing the test program, including: the determining unit is configured to determine the T1 process number or The parent process number of the T1 process number belongs to the test program process number set; the determining unit is configured to determine that the process indicated by the T2 process number is used to execute the test program, including: determining that the parent process number of the T2 process number or the T2 process number belongs to the test Program process number collection.
- the determining unit is further configured to use the T1 process. The number is added to the test program process number set; if the T2 process number does not belong to the test program process number set, the determining unit is also used to add the T2 process number to the test program process number set.
- the test program includes the instruction instruction, and the reading unit is configured to detect the function for the first time.
- the simulation executes the test program, the root process number of the process number register record is read and recorded.
- the read unit is configured to read the process number register after the instruction instruction is detected, and record the root process number recorded by the process number register.
- the inter-process relationship maintained by the function simulator is a proc in an operating system running on the function simulator Directory, the proc directory records the relationship between each thread and the parent process of each thread.
- the fourth aspect is the device implementation manner corresponding to the method of the first aspect, and the description in the first aspect or any possible implementation manner of the first aspect corresponds to the fourth aspect or any possible implementation manner of the fourth aspect, This will not be repeated here.
- the present application provides a test point creation system including a function simulator, a manager and a performance simulator, a function simulator for functional simulation of the processor, and a performance simulator for performance simulation of the processor,
- the manager is configured to read the T1 process number recorded by the process number register at the first time, and determine that the process indicated by the T1 process number is used to execute the test program, wherein the process number register holds the process number of the process that the function simulator is running.
- the manager before the first time, is further configured to: when the function simulator is first detected to execute the test program, read and record the process number register record.
- the root process number, the process executing the test program is the root process indicated by the root process number or the descendant process of the root process; the manager is used to determine the process indicated by the T1 process number according to the root process number and the interprocess relationship maintained by the function simulator.
- the test program is executed; the manager is configured to determine the process indicated by the T2 process number to execute the test program according to the root process number and the interprocess relationship maintained by the function simulator.
- the manager is further configured to determine, according to the root process number and the inter-process relationship maintained by the function simulator
- the test program process number set, the test program process number set contains the process number of the process for executing the test program; the manager is used to determine the process indicated by the T1 process number for executing the test program, including: the manager is used to determine the T1 process number or the T1 process The parent process number of the number belongs to the test program process number set; the manager is used to determine the process indicated by the T2 process number for executing the test program including: the manager is used to confirm The parent process number of the T2 process number or T2 process number belongs to the test program process number set.
- the manager is further configured to use the T1 process.
- the number is added to the test program process number set; if the T2 process number does not belong to the test program process number set, the manager is also used to add the T2 process number to the test program process number set.
- the test program includes the instruction instruction, and the manager is configured to read the process ID after detecting the instruction instruction. Register and record the root process number of the process number register record.
- the inter-process relationship maintained by the function simulator is a proc in an operating system running on the function simulator Directory, the proc directory records the relationship between each thread and the parent process of each thread.
- the fifth aspect is the apparatus implementation manner corresponding to the method of the first aspect, and the description in the first aspect or any possible implementation manner of the first aspect is applicable to any possible implementation manner of the fifth aspect or the fifth aspect, This will not be repeated here.
- test program process runs on the function simulator at the beginning and the end of the warm-up phase, thereby ensuring that the created checkpoints are all related to the test program, and the other process pairs are reduced.
- Checkpoint data interference which can improve the accuracy of the benchmark test.
- FIG. 1 is a schematic diagram showing the logical structure of a simulator system according to an embodiment of the present invention
- FIG. 2 is a schematic structural diagram of a host computer according to an embodiment of the invention.
- FIG. 3 is a scene diagram of a simulator warm-up phase according to an embodiment of the invention.
- FIG. 4 is an exemplary flowchart of a test point creation method according to an embodiment of the invention.
- FIG. 5 is a schematic diagram showing the logical structure of a test point creation apparatus according to an embodiment of the invention.
- the function simulator when the checkpoint is created, since the function simulator can only perceive the simulated hardware data and the instruction flow of the translation execution, the operating system cannot be perceived, and if the checkpoint is not related to the benchmark, the function is not performed.
- the simulator also performs checkpoint creation when running other user processes or kernel processes.
- the checkpoint data obtained at this time has nothing to do with the benchmark test. It takes time and space to create and save checkpoint data, and subsequent performance tests are performed. It also wastes system resources and affects the accuracy of test results and even affects the design of the hardware architecture.
- multi-level cache (cache) size For example, in the multi-core processor design process, various factors need to be considered: multi-level cache (cache) size, number of registers and bits, pipeline scheduling strategy, processor inter-core bus connections, floating-point modules, and so on.
- cache multi-level cache
- number of registers and bits For example, number of registers and bits, pipeline scheduling strategy, processor inter-core bus connections, floating-point modules, and so on.
- FIG. 1 is a schematic diagram showing the logical structure of a simulator system according to an embodiment of the present invention.
- the system includes a simulator 100 and a host 102.
- the host machine 102 is used to provide an operating environment for the simulator, and the simulator 100 is used to simulate a computer architecture, including a function simulator 104, a manager 112, and a performance simulator 114.
- the function simulator 104 is divided into two parts, the bottom layer being the processor simulator 106, and the virtual machine 108 running on the processor simulator 106.
- the processor emulator 106 is a software module running on the host machine for simulating the function of the processor architecture.
- the virtual machine 108 is a virtual machine running on the processor architecture simulated by the processor simulator 106, and runs thereon. There is a user operating system. When testing the performance of the simulator 100 using a performance tester, the first is to use the virtual machine 108 to run the benchmark code.
- the relationship between the running processes is maintained on the virtual machine 108.
- the /proc directory on the Linux operating system stores the file in the kernel running state
- the /proc directory is a file system, that is, the proc file system, which can be viewed through the files therein.
- Information about the system hardware and the currently running process is maintained.
- /proc/pid/stat records the process ID (process id of the parent process, ppid), which describes the pid indication.
- the parent process id value of the process so by scanning the proc directory, you can get the tree structure of all processes in the operating system, and you can get the relationship between all processes.
- the function simulator 104 only requires the function to be correct, that is, the execution result is correct, so the internal working principle of the processor is not simulated in detail, and the performance simulator 114 is generally used to simulate the behavior of the processor hardware, so the performance simulator 114 needs to be detailed.
- the various hardware components describing the processor architecture can obtain the operation of the various hardware simulated by the performance simulator 114 when the processor instructions are run.
- the performance simulator 114 may include (or simulate) the following functions: an instruction decoder, the performance simulator 114 decodes the instruction when the instruction is executed, and the generator generates a plurality of microinstructions from the decoded instruction. Execute under the scheduling of the scheduler (sequential or out-of-order); various arithmetic unit modules; concurrent scheduler, so that the micro-instructions on each pipeline can run concurrently; interconnect and clock; the area where the processor stores data, such as each processing Registers, buffers, conversion monitor buffers (TLBs) on the core, and various coprocessor registers, etc.; debug modules for debugging functions on the processor's own hardware. It should be understood that the embodiments of the present invention are merely illustrative and do not limit the functional modules included in the performance simulator 114. In a specific implementation process, the performance simulator 114 may include more or fewer functional modules.
- the manager 112 is a middleware that connects the function simulator 104 and the performance simulator 114 for instruction block forwarding and application program interface calls, and is also used to collect operational data of the performance simulator 114. After running an instruction block on the function simulator 104, the instruction block is sent to the performance simulator 114 through the manager 112, so that the function simulator 104 and the performance simulator 114 run the same instruction stream, and the function simulator 104 To achieve the correctness of the implementation of the function, the performance simulator 114 achieves test data output on performance and efficiency.
- the performance simulator 114 and the function simulator 104 are run together, executing the same instruction block and interface calls, it takes a long time to run a set of benchmarkamrk test programs, which may take several days, or even tens of days, if there is still a pair If the parameters of the performance simulator 114 are modified multiple times, the entire test cycle is longer. In order to speed up the test, a form of creating a checkpoint may be taken, and at a fixed time or an instruction execution interval, the manager 112 performs a create checkpoint action.
- the process of creating a checkpoint is: the function simulator 104 and the performance simulator 114 run together for a period of time, that is, a warm-up phase, during which the function simulator 104 runs through an instruction block and passes through the manager.
- 112 sends the instruction block to the performance simulator 114 for operation, such that the function simulator 104 and the performance simulator 114 run the same instruction stream to populate the state information of the performance simulator 114 (including the cache, TLB, registers, Coprocessor registers, etc.), then create a checkpoint to generate checkpoint data, wherein the checkpoint data includes a function simulator 104
- the snapshot and the status information of the performance simulator can be used to save and restore the state of the function of the function simulator 104 and the performance simulator 114.
- the warm-up is executed after a certain period of time or after the execution of the instruction number interval, and a checkpoints action is created, so that a series of checkpoint data can be obtained.
- Subsequent function simulator 104 and performance simulator 114 can use the checkpoint data to restore operational status and execute some instruction block instructions. This is the first time that the benchmark test program is completely run and a series of checkpoint data is created. After the performance simulator 114 modifies the parameter settings, the performance simulator and the function simulator only need to load the checkpoint data to implement the benchmark test. This can greatly increase the test speed and shorten the test time.
- FIG. 1 is merely an exemplary illustration of a simulator system.
- the simulator system may include more complicated components, and FIG. 1 does not impose any limitation on the specific implementation of the simulator system, for example, Some of the functionality of manager 112 may be nested within processor simulator 106 and/or processor simulator 116.
- FIG. 2 is a schematic diagram showing the hardware structure of a host computer 102 according to an embodiment of the invention.
- host machine 102 includes a processor 202, a memory 204, an input/output interface 206, a communication interface 208, and a bus 210.
- the processor 202, the memory 204, the input/output interface 206, and the communication interface 208 implement a communication connection with each other through the bus 210.
- the processor 202 is a control center of the host computer 102 for executing related programs to implement the technical solutions provided by the embodiments of the present invention.
- the processor 202 can be a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for executing related programs.
- CPU central processing unit
- ASIC application specific integrated circuit
- the technical solution provided by the embodiment of the present invention is implemented.
- the memory 204 can be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
- the memory 204 can store an operating system and other applications.
- the program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 204 and executed by the processor 202.
- the memory 204 can be integrated with or integrated with the processor 202, or it can be one or more memory units independent of the processor 202.
- Program code for execution by processor 202 may be stored in an external storage device or memory 204 coupled thereto.
- the memory 204 is a RAM, and program code (eg, a function simulator module, a manager module or a performance simulator module, etc.) stored inside the external storage device is copied into the memory 204 for execution by the processor 202.
- the memory 204 of the host 102 includes a function simulator module, a manager module, a performance simulator module, and the like, and the processor 202 executes a function simulator module, and the manager module and the performance simulator module implement test points.
- the function simulator module is used to implement the functions of the function simulator
- the manager module is used to implement the functions of the manager
- the performance simulator module is used to implement the functions of the performance simulator.
- a component for performing a specific function for example, the processor 202 or the memory 204, may be implemented by configuring a general-purpose component to perform a corresponding function, or may perform a specific function through a specific function.
- the specific components are implemented, and this application does not limit this.
- the input/output interface 206 is for receiving input data and information, and outputting data such as operation results.
- Communication interface 208 implements communication between host device 102 and other devices or communication networks using transceivers such as, but not limited to, transceivers.
- Bus 210 can include a path for communicating information between various components of host 102, such as processor 202, memory 204, input/output interface 206, and communication interface 208.
- meter host 102 shown in FIG. 2 only shows the processor 202, the memory 204, the input/output interface 206, the communication interface 208, and the bus 210, in a specific implementation process, those skilled in the art should It is understood that host 102 also contains other devices necessary to achieve proper operation. At the same time, those skilled in the art will appreciate that host machine 102 may also include hardware devices that implement other additional functions, depending on the particular needs. Moreover, those skilled in the art will appreciate that host 102 may also only include the components necessary to implement embodiments of the present invention, and does not necessarily include all of the devices shown in FIG.
- the hardware structure shown in FIG. 2 and the above description are applicable to various test point creation apparatuses provided by the embodiments of the present invention, and are applicable to performing various test point creation methods provided by the embodiments of the present invention.
- the function simulator Before the checkpoint is created, the function simulator needs to warm up the performance simulator for a period of time, that is, the manager needs to send at least one basic block after the function simulator is executed to the performance simulator for execution. Used to fill in the various data in the performance simulator, and then perform the creation of a checkpoint action to generate checkpoint data. Because the simulator system is not only used to run the test program process, but also to run other processes that are not related to the test program. If the function simulator is not running the process for executing test instructions during the warm-up phase, the function simulator and The various data filled in the performance simulator is independent of the test program.
- FIG. 3 is a scene diagram of a simulator warm-up phase according to an embodiment of the present invention, as shown in FIG. Show, there are four scenarios in the warm-up phase:
- the simulator runs the test program process, that is, the W1 and W5 warm-up phases shown in Figure 3. Because the entire warm-up phase simulator runs the test program process, after the warm-up phase is over, the data filled in the function simulator and performance simulator is related to the test program. In this case, the checkpoint created is accurate. .
- the simulator runs the test program process, and the process switch occurs during the warm-up phase. After the switch, the simulator runs other processes, that is, the W2 warm-up shown in Figure 3. stage. Because process switching occurs during the warm phase, the data filled in the function simulator and performance simulator is inaccurate after the end of the warm phase, and the checkpoint created is inaccurate.
- the simulator runs other processes.
- the process switch occurs.
- the simulator runs the test program process, that is, the W4 pre-show shown in Figure 3. Hot stage. Because in the initial stage of the warm, the simulator runs other processes, but switches to the test program process in the warm process, which will cause insufficient warm-up, and will lead to functional simulator and performance simulation after the end of the warm phase.
- the data filled in the device is not accurate, and the checkpoint created is also inaccurate.
- FIG. 4 is a schematic flowchart of a method 400 for creating a test point according to an embodiment of the present invention. As shown in FIG. 4, the method 400 includes:
- S402 The manager reads the T1 process number recorded in the process number (PID) register at the first time.
- the process number of the process that the function simulator is running is stored in the PID register.
- step S404 The manager determines whether the process indicated by the T1 process number is used to execute the test program. If the process indicated by the T1 process number is not used to execute the test program, the process returns to step S402. If the process indicated by the T1 process number is used to execute the test program, Then step S406 is performed.
- the manager When the manager first detects that the function simulator executes the test program, it reads and records the root process number of the process number register record. The process that executes the test program is the root process or the root process indicated by the root process number. In the descendant process, the manager determines whether the process indicated by the T1 process number is used to execute the test program according to the root process number and the interprocess relationship maintained by the function simulator.
- the operating system running on the function simulator is a Linux operating system
- the inter-process relationship maintained by the function simulator is a proc directory in an operating system running on the function simulator, and the proc directory records each thread and each one. The relationship between the parent processes of a thread.
- the proc directory can be exported by the operating system running on the function simulator through a shared directory for the manager to share.
- the parent process ID (PPID) of the parent process of the process is recorded in the /proc/pid/stat file of each process. According to the proc directory, you can get a process number tree with the root process number as the root node to describe the relationship between the test program processes. If the T1 process number is the root process or the descendant process of the root process, the process indicated by the T1 process number is the process used to execute the test program.
- the manager can determine the test program process number set according to the parent process number and the inter-process relationship maintained by the function simulator, and the test program process number set contains the process number of the process for executing the test program.
- the manager determines whether the parent process number of the T1 process number or the T1 process number belongs to the test program process number set. If the T1 process number or the parent process number of the T1 process number belongs to the test program process number set, the process indicated by the T1 process number is The process used to execute the test program.
- the manager determines whether the process indicated by the parent process number of the T1 process number is a test program process according to the inter-process relationship maintained by the function simulator.
- the descendant process if the process indicated by the parent process number of the T1 process number is a descendant process of the test program process, it indicates that the process indicated by the T1 process number is a process for executing the test program; if the parent process number of the T1 process number indicates The process is not a descendant process of the root process, indicating that the process indicated by the T1 process number is not a program for executing the test program.
- the manager also adds the T1 process number and its parent process number. Test program process number collection.
- step S406 the warm-up phase may be started, that is, step S406 is performed, and if it is determined that the progress of the T1 process number indication is not for executing the test program, the manager may wait for a certain time, Or after the function simulator executes a certain instruction block, step S402 is re-executed.
- S406 The manager sends at least one instruction block after the function simulator is executed to the performance simulator for execution.
- the manager can enter the warm-up phase by the controller simulator, and send the instruction block after the function simulator is executed to the performance simulator to perform the filling of the performance simulator.
- Various status data can be entered by the controller simulator, and send the instruction block after the function simulator is executed to the performance simulator to perform the filling of the performance simulator.
- S408 The manager reads the T2 process number recorded in the PID register at the second time.
- the manager reads the PID register again.
- step S410 The manager determines whether the process indicated by the T2 process number is used to execute the test program. If the process indicated by the T2 process number is not used to execute the test program, the process returns to step S402. If the process indicated by the T1 process number is used to execute the test program, Then step S412 is performed.
- the specific process for the manager to determine whether the process indicated by the T2 process number is used to execute the test program refers to the specific process of the manager for determining whether the process indicated by the T1 process number is used to execute the test program, and details are not described herein again.
- the manager will also have the T2 process number and its parent. The process number is added to the test program process number set.
- the duration of the warm-up phase is limited, there are very few cases where process switching occurs. If the process indicated by the T1 process number at the beginning of the warm-up phase and the process indicated by the T2 process number at the end of the warm-up phase are used to execute the test procedure. , it can be inferred that the entire warm-up phase simulator is running the test program process, the warm-up phase is valid, in this case, the checkpoint creation action can be performed; if the process indicated by the T2 process number is not used to perform the test The program indicates that the process switchover occurs during the warm-up phase, which will result in inaccurate data. The manager does not perform the checkpoint creation action, and can wait for a certain time, or wait for the function simulator to execute a certain instruction block and then re-execute. Step S402.
- T1 process number and the T2 process number are only process numbers stored in the PID registers at two different time points, and the two may be the same or different.
- test point data includes a snapshot of the function simulator and status information of the performance simulator.
- the created test point data is saved for use in subsequent benchmark tests.
- a series of accurate checkpoint data can be obtained, and the subsequent function simulator and performance simulator can use the checkpoint data to restore the running state and execute some instruction block instructions. This is only the first time you run the benchmark test program completely and create a series of checkpoint data. After the performance simulator changes the parameter settings, the performance simulator and function simulator only need to To load checkpoint data, you can implement the benchmark test.
- test program process runs on the function simulator at the beginning and the end of the warm-up phase, thereby ensuring that the created checkpoints are all related to the test program, and the other process pairs are reduced.
- Checkpoint data interference which can improve the accuracy of the benchmark test.
- FIG. 5 is a schematic diagram showing the logical structure of a test point creation apparatus 500 according to an embodiment of the present invention. As shown in FIG. 5, the apparatus 500 includes a reading unit 502, a determining unit 504, a scheduling unit 506, and a creating unit 508.
- the reading unit 502 is configured to read the T1 process number recorded by the process number register at the first time, wherein the process number register stores the process number of the process that the function simulator is running.
- Determination unit 504 The process for determining the T1 process number indication is used to execute the test procedure.
- the reading unit 502 is further configured to read and record the root process number of the process number register record when the function simulator is first detected to execute the test program, and the process of executing the test program is the root indicated by the root process number.
- the test program includes an instruction instruction
- the reading unit 502 is configured to read and record the root process number of the process number register record when the function simulator is first detected to execute the test program, where the reading unit 502 is configured to detect After the instruction is instructed, the process number register is read and the root process number recorded in the process number register is recorded.
- the determining unit 504 is configured to determine that the process indicated by the T1 process number is used to execute the test program, and the determining unit 504 is configured to determine, according to the root process number and the inter-process relationship maintained by the function simulator, that the process indicated by the T1 process number is used to execute the test program. .
- the inter-process relationship maintained by the function simulator may be a proc directory in an operating system running on the function simulator, and the proc directory records the relationship between each thread and the parent process of each thread.
- the determining unit 504 is further configured to determine, according to the parent process ID and the inter-process relationship maintained by the function simulator, a test program process number set, where the test program process number set includes a process number of a process for executing the test program.
- the determining unit 504 is configured to determine that the process indicated by the T1 process number is used to execute the test program.
- the determining unit 504 is configured to determine that the T1 process number or the parent process number of the T1 process number belongs to the test program process number set.
- the determining unit 504 is further configured to add the T1 process number to the test program process number set.
- a scheduling unit 506, configured to send at least one instruction block after the function simulator is run to the performance mode The simulator is executed.
- the reading unit 502 is further configured to read the T2 process number recorded by the process number register at the second time.
- the determining unit 504 is further configured to determine that the process indicated by the T2 process number is used to execute the test program.
- the determining unit 504 is configured to determine that the process indicated by the T2 process number is used to execute the test program, and the determining unit 504 is configured to determine, according to the root process number and the inter-process relationship maintained by the function simulator, that the process indicated by the T2 process number is used to execute the test program. .
- the determining unit 504 is configured to determine that the process indicated by the T2 process number is used to execute the test program, and the determining unit 504 is configured to determine that the parent process number of the T2 process number or the T2 process number belongs to the test program process number set.
- the determining unit 504 is further configured to add the T2 process number to the test program process number set.
- a creation unit 508 is configured to create a test point and record test point data, wherein the test point data includes a snapshot of the function simulator and status information of the performance simulator.
- the reading unit 502, the determining unit 504, the scheduling unit 506 and the creating unit 508 of the embodiment of the present invention may be implemented by the processor 202 and the memory 204 of the embodiment of FIG. 2, and more specifically, may be executed by the processor 202 in the memory 204.
- the embodiment of the present invention is an apparatus embodiment of the manager, and the feature description of the embodiment of FIG. 4 is applicable to the embodiment of the present invention, and details are not described herein again.
- the disclosed systems, devices, and methods may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of the modules is only a logical function division, and may be implemented in another manner, for example, multiple modules or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
- the modules described as separate components may or may not be physically separated.
- the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. in.
- the above integrated modules can be implemented in the form of hardware or in the form of hardware plus software function modules.
- the above-described integrated modules implemented in the form of software function modules can be stored in a computer readable storage medium.
- the software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform some of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a removable hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
An embodiment of the present invention provides a method, device and system for creating a checkpoint, wherein the method comprises: reading a T1 process number recorded by a process number register at a first time, determining that a process indicated by the T1 process number is used for executing a checking program, wherein the process number register holds a process number of a process currently being run by a function simulator, and at least one basic block resulting after running the function simulator is sent to a performance simulator for execution; reading a T2 process number recorded by the process number register at a second time, determining that a process indicated by the T2 process number is used for executing a checking program; creating a checkpoint and recording checkpoint data, wherein the checkpoint data comprises a snapshot of the function simulator and state information of the performance simulator. The technical solution disclosed by the embodiment of the present invention can increase the accuracy of the checkpoint data, thereby improving the checking accuracy of the simulator.
Description
本发明实施例涉及计算机领域,尤其涉及一种测试点的创建方法,装置和系统。The embodiments of the present invention relate to the field of computers, and in particular, to a method, an apparatus, and a system for creating a test point.
模拟器,是指通过软件模拟硬件处理器的功能和指令系统的程序,用于根据特定输入得到预测的输出。模拟器一般包含功能模拟器和性能模拟器。功能模拟器用于实现处理器功能的实现正确性,性能模拟器用于实现性能和效率的测试数据输出。An emulator is a program that simulates the functions of a hardware processor and the instruction system through software to obtain a predicted output based on a specific input. The simulator typically includes a functional simulator and a performance simulator. The function simulator is used to achieve the correctness of the processor function, and the performance simulator is used to achieve test data output for performance and efficiency.
模拟器性能测试是在模拟器上运行标准检查程序(benchmark),得到测试结果来衡量模拟器本身的性能和硬件参数设置是否合理的一种方法。在进行模拟器性能测试时,一般是先进行功能模拟器测试,然后进行性能模拟器测试,功能模拟器上运行完一个指令块(Basic Block)后,将这个指令块发送给性能模拟器运行。The simulator performance test is a method of running a standard checker on the simulator and getting test results to measure the performance of the simulator itself and whether the hardware parameter settings are reasonable. In the performance test of the simulator, the function simulator test is generally performed first, and then the performance simulator test is performed. After running a basic block on the function simulator, the instruction block is sent to the performance simulator for running.
随着模拟器和benchmark规模越来越大,为了节省测试时间,一般采用创建测试点(checkpoint)的方法,在固定的时间或者指令执行数间隔下,创建checkpoint。在创建checkpoint之前,功能模拟器带着性能模拟器预热(warm)一段时间,用来填充性能模拟器里的各个数据,然后执行创建checkpoint动作,生成checkpoint数据。这样只需要完整运行一次benchmark测试程序,并创建一系列的checkpoints数据,性能模拟器修改参数设定后,性能模拟器和功能模拟器可以使用checkpoint的数据恢复运行状态,并执行一些指令块指令,就可以实现benchmark测试。checkpoint可以大大的缩短测试时间,提高测试速度。As the size of the simulator and benchmark grows larger, in order to save test time, a checkpoint is generally created to create a checkpoint at a fixed time or instruction execution interval. Before the checkpoint is created, the function simulator warms up with the performance simulator for a period of time to fill in the data in the performance simulator, and then performs the checkpoint creation process to generate the checkpoint data. This only needs to run the benchmark test program completely and create a series of checkpoints. After the performance simulator changes the parameter settings, the performance simulator and function simulator can use the checkpoint data to restore the running state and execute some instruction block instructions. You can implement the benchmark test. Checkpoint can greatly shorten the test time and improve the test speed.
现有技术在创建checkpoint的时候,存在创建不准确的现象,不准确的checkpoint不但浪费了系统资源,而且在后续进行性能模拟器测试的时候也会影响测试的准确性。In the prior art, when creating a checkpoint, there is a phenomenon of inaccurate creation. Inaccurate checkpoint not only wastes system resources, but also affects the accuracy of the test in subsequent performance simulator tests.
发明内容
Summary of the invention
有鉴于此,本发明公开了一种测试点创建的方法和装置,确保创建的checkpoint是与benchmark相关的,从而提升了测试结果的准确性。In view of this, the present invention discloses a method and apparatus for creating a test point, ensuring that the created checkpoint is related to the benchmark, thereby improving the accuracy of the test result.
第一方面,本申请提供了一种测试点的创建方法,模拟器包含功能模拟器,性能模拟器和管理器,该方法包括:管理器在第一时间读取进程号寄存器记录的T1进程号,并确定T1进程号指示的进程用于执行测试程序,其中,进程号寄存器中保存有功能模拟器正在运行的进程的进程号,管理器将功能模拟器运行后的至少一个指令块发送给性能模拟器执行,管理器在第二时间读取进程号寄存器记录的T2进程号,并确定T2进程号指示的进程用于执行测试程序,随后,管理器创建测试点,并记录测试点数据,其中测试点数据包含功能模拟器的快照和性能模拟器的状态信息。In a first aspect, the present application provides a method for creating a test point. The simulator includes a function simulator, a performance simulator, and a manager. The method includes: the manager reads the T1 process number recorded in the process number register at the first time. And determining that the process indicated by the T1 process number is used to execute the test program, wherein the process number register holds the process number of the running process of the function simulator, and the manager sends at least one instruction block after the function simulator is run to the performance The simulator executes, the manager reads the T2 process number recorded in the process number register at the second time, and determines that the process indicated by the T2 process number is used to execute the test program, and then the manager creates the test point and records the test point data, wherein The test point data contains the snapshot of the function simulator and status information of the performance simulator.
管理器在预热开始和结束的时候,都确认了功能模拟器运行的进程是测试程序进程,然后才创建测试点,从而保证了测试点数据是与测试程序相关的,保证了后续测试的准确性。At the beginning and end of the warm-up, the manager confirms that the process running by the function simulator is the test program process, and then the test points are created, thus ensuring that the test point data is related to the test program, ensuring the accuracy of subsequent tests. Sex.
根据第一方面,在第一方面第一种可能的实现方式中,在第一时间之前,该方法还包括:管理器在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号,执行测试程序的进程为根进程号指示的根进程或根进程的后代进程;管理器根据根进程号和功能模拟器维护的进程间关系,确定T1进程号指示的进程用于执行测试程序,并根据根进程号和功能模拟器维护的进程间关系,确定T2进程号指示的进程用于执行测试程序。According to the first aspect, in a first possible implementation manner of the first aspect, before the first time, the method further includes: the manager reads and records the process number register when the function simulator is first detected to execute the test program. The root process number of the record, the process executing the test program is the root process indicated by the root process number or the descendant process of the root process; the manager determines the process indicated by the T1 process number according to the root process number and the interprocess relationship maintained by the function simulator The test program is executed, and according to the root process number and the interprocess relationship maintained by the function simulator, it is determined that the process indicated by the T2 process number is used to execute the test program.
管理器可以根据功能模拟器维护的进程间关系以及测试程序的根进程,确定一个进程是否是测试程序进程,从而验证功能模拟器运行的进程是否与测试程序相关,在相关的情况下才创建checkpoint。The manager can determine whether a process is a test program process according to the inter-process relationship maintained by the function simulator and the root process of the test program, thereby verifying whether the process running by the function simulator is related to the test program, and creating a checkpoint under relevant circumstances. .
根据第一方面或第一方面以上任一种可能的实现方式,在第一方面第二种可能的实现方式中,该方法还包括:管理器根据根进程号和功能模拟器维护的进程间关系,确定测试程序进程号集合,测试程序进程号集合包含用于执行测试程序的进程的进程号;管理器确定T1进程号指示的进程用于执行测试程序包括:管理器确定T1进程号或T1进程号的父进程号属于测试程序进程号集合;管理器确定T2进程号指示的进程用于执行测试程序包括:管理器确定T2进程号或T2进程号的父进程号属于测试程序进程号集合。According to the first aspect or any one of the foregoing possible implementation manners, in the second possible implementation manner of the first aspect, the method further includes: the inter-process relationship maintained by the manager according to the root process number and the function simulator Determining a test program process number set, the test program process number set containing the process number of the process for executing the test program; the manager determining that the process indicated by the T1 process number is used to execute the test program includes: the manager determines the T1 process number or the T1 process The parent process number of the number belongs to the test program process number set; the manager determines that the process indicated by the T2 process number is used to execute the test program includes: the manager determines that the parent process number of the T2 process number or the T2 process number belongs to the test program process number set.
管理器根据进程间关系和根进程,确定测试程序进程号集合,在验证一个进程是否属于测试程序进程时,只需要看该进程的进程号是否属于测试程序进
程号集合,如果属于,则说明是测试程序进程,如果不属于,在进一步根据功能模拟器维护的进程间关系和跟进程号确定该进程是否是测试程序进程,这样不需要每次验证过程都去查进程间关系,简化了验证的过程。The manager determines the test program process number set according to the inter-process relationship and the root process. When verifying whether a process belongs to the test program process, it only needs to see whether the process number of the process belongs to the test program.
The set of the program number, if it belongs, indicates that the test program process, if not, further determines whether the process is a test program process according to the interprocess relationship and the process number maintained by the function simulator, so that each verification process is not required Checking the interprocess relationship simplifies the verification process.
根据第一方面或第一方面以上任一种可能的实现方式,在第一方面第三种可能的实现方式中,该方法还包括:若T1进程号不属于测试程序进程号集合,管理器将T1进程号加入测试程序进程号集合;若T2进程号不属于测试程序进程号集合,管理器将T2进程号加入测试程序进程号集合。According to the first aspect or any one of the foregoing possible implementation manners, in a third possible implementation manner of the first aspect, the method further includes: if the T1 process number does not belong to the test program process number set, the manager The T1 process number is added to the test program process number set; if the T2 process number does not belong to the test program process number set, the manager adds the T2 process number to the test program process number set.
在每一次验证后,对测试程序进程号集合进行实时的刷新,进一步的若T1进程号的父进程号不属于测试程序进程号集合,管理器还将T1进程号的父进程号加入测试程序进程号集合;若T2进程号的父进程号不属于测试程序进程号集合,管理器还将T2进程号的父进程号加入测试程序进程号集合。After each verification, the test program process number set is refreshed in real time. Further, if the parent process number of the T1 process number does not belong to the test program process number set, the manager also adds the parent process number of the T1 process number to the test program process. Number set; if the parent process number of the T2 process number does not belong to the test program process number set, the manager also adds the parent process number of the T2 process number to the test program process number set.
根据第一方面或第一方面以上任一种可能的实现方式,在第一方面第四种可能的实现方式中,该测试程序包含指示指令;管理器在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号包括:管理器在检测到指示指令后,读取进程号寄存器,并记录进程号寄存器记录的根进程号。In a fourth possible implementation manner of the first aspect, the test program includes the instruction instruction, and the manager detects the function simulator to execute the test program for the first time. The root process number of the process number register record is read and recorded. The manager reads the process number register after detecting the instruction instruction, and records the root process number recorded by the process number register.
因为测试程序中的指令需要功能模拟器翻译后才可以真正的执行,所以管理器可以通过功能模拟器监控到测试程序的每一条指令,通过在测试程序中添加指示指令,从而实现了对测试程序的监控,更具体的,指示指令可以添加在测试程序的开始处,此时执行测试程序的进程为根进程,后续执行测试程序的程序为根进程或根进程的后代进程。Because the instructions in the test program need to be translated by the function simulator before they can be executed, the manager can monitor each instruction of the test program through the function simulator, and implement the test program by adding an instruction instruction to the test program. The monitoring, more specifically, the instruction instruction can be added at the beginning of the test program, at which time the process executing the test program is the root process, and the subsequent execution of the test program is the root process or the descendant process of the root process.
根据第一方面或第一方面以上任一种可能的实现方式,在第一方面第五种可能的实现方式中,功能模拟器维护的进程间关系为功能模拟器上运行的操作系统中的proc目录,proc目录记录有每一个线程与每一个线程的父进程之间的关系。According to the first aspect or any one of the foregoing possible implementation manners, in the fifth possible implementation manner of the first aspect, the inter-process relationship maintained by the function simulator is a proc in an operating system running on the function simulator Directory, the proc directory records the relationship between each thread and the parent process of each thread.
具体的,每一个进程的/proc/pid/stat文件中记录了该进程的父进程的父进程ID(PPID)。根据proc目录,可以得到一个以根进程号为根节点的进程号树,用于描述测试程序进程之间的关系。Specifically, the parent process ID (PPID) of the parent process of the process is recorded in the /proc/pid/stat file of each process. According to the proc directory, you can get a process number tree with the root process number as the root node to describe the relationship between the test program processes.
第二方面,本申请提供了一种可读介质,其特征在于,包括执行指令,当计算设备的处理器执行该执行指令时,该计算设备执行第一方面或第一方面的任一种可能的实现方式中的方法。In a second aspect, the present application provides a readable medium, comprising: executing instructions, when the processor of the computing device executes the execution instruction, the computing device performs any of the first aspect or the first aspect The method in the implementation.
第三方面,本申请提供了一种计算设备,其特征在于,包括:处理器、存
储器和总线;存储器用于存储执行指令,处理器与存储器通过总线连接,当计算设备运行时,处理器执行存储器存储的执行指令,以使计算设备执行以上第一方面或第一方面的任一种可能的实现方式中的方法。In a third aspect, the present application provides a computing device, including: a processor, and a
a memory and a bus; a memory for storing execution instructions, the processor and the memory being connected by a bus, and when the computing device is running, the processor executing the memory stored execution instructions to cause the computing device to perform the above first aspect or the first aspect A method in a possible implementation.
第四方面,本申请提供了一种测试点的创建装置,模拟器包含功能模拟器和性能模拟器,该装置包括:读取单元,用于在第一时间读取进程号寄存器记录的T1进程号,其中,进程号寄存器中保存有功能模拟器正在运行的进程的进程号;确定单元:用于确定T1进程号指示的进程用于执行测试程序;调度单元,用于将功能模拟器运行后的至少一个指令块发送给性能模拟器执行;读取单元还用于在第二时间读取进程号寄存器记录的T2进程号;确定单元还用于确定T2进程号指示的进程用于执行测试程序;创建单元,用于创建测试点,并记录测试点数据,其中测试点数据包含功能模拟器的快照和性能模拟器的状态信息。In a fourth aspect, the application provides a device for creating a test point, the simulator includes a function simulator and a performance simulator, the device includes: a reading unit, configured to read the T1 process recorded by the process number register at the first time No., wherein the process number register holds the process number of the running process of the function simulator; the determining unit: the process for determining the T1 process number indication is used to execute the test program; and the scheduling unit is configured to run the function simulator At least one instruction block is sent to the performance simulator for execution; the reading unit is further configured to read the T2 process number recorded by the process number register at a second time; the determining unit is further configured to determine that the process indicated by the T2 process number is used to execute the test program Create a unit to create a test point and record test point data, where the test point data contains a snapshot of the function simulator and status information of the performance simulator.
根据第四方面,在第四方面第一种可能的实现方式中,在第一时间之前,读取单元还用于在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号,执行测试程序的进程为根进程号指示的根进程或根进程的后代进程;确定单元用于根据根进程号和功能模拟器维护的进程间关系,确定T1进程号指示的进程用于执行测试程序,并用于根据根进程号和功能模拟器维护的进程间关系,确定T2进程号指示的进程用于执行测试程序。According to the fourth aspect, in a first possible implementation manner of the fourth aspect, before the first time, the reading unit is further configured to: read and record the process number register record when the function simulator is first detected to execute the test program The root process number, the process executing the test program is the root process indicated by the root process number or the descendant process of the root process; the determining unit is configured to determine the process indicated by the T1 process number according to the root process number and the interprocess relationship maintained by the function simulator Used to execute the test program and used to determine the process indicated by the T2 process number to execute the test program based on the root process number and the interprocess relationship maintained by the function simulator.
根据第四方面或第四方面以上任一种可能的实现方式,在第四方面第二种可能的实现方式中,确定单元还用于根据根进程号和功能模拟器维护的进程间关系,确定测试程序进程号集合,测试程序进程号集合包含用于执行测试程序的进程的进程号;确定单元用于确定T1进程号指示的进程用于执行测试程序包括:确定单元用于确定T1进程号或T1进程号的父进程号属于测试程序进程号集合;确定单元用于确定T2进程号指示的进程用于执行测试程序包括:确定单元用于确定T2进程号或T2进程号的父进程号属于测试程序进程号集合。According to the fourth aspect, or any one of the foregoing possible implementation manners of the fourth aspect, in the second possible implementation manner of the fourth aspect, the determining unit is further configured to determine, according to the root process ID and the inter-process relationship maintained by the function simulator a test program process number set, the test program process number set includes a process number of a process for executing the test program; the determining unit is configured to determine a process indicated by the T1 process number for executing the test program, including: the determining unit is configured to determine the T1 process number or The parent process number of the T1 process number belongs to the test program process number set; the determining unit is configured to determine that the process indicated by the T2 process number is used to execute the test program, including: determining that the parent process number of the T2 process number or the T2 process number belongs to the test Program process number collection.
根据第四方面或第四方面以上任一种可能的实现方式,在第四方面第三种可能的实现方式中,若T1进程号不属于测试程序进程号集合,确定单元还用于将T1进程号加入测试程序进程号集合;若T2进程号不属于测试程序进程号集合,确定单元还用于将T2进程号加入测试程序进程号集合。According to the fourth aspect or any one of the foregoing possible implementation manners, in the third possible implementation manner of the fourth aspect, if the T1 process number does not belong to the test program process number set, the determining unit is further configured to use the T1 process. The number is added to the test program process number set; if the T2 process number does not belong to the test program process number set, the determining unit is also used to add the T2 process number to the test program process number set.
根据第四方面或第四方面以上任一种可能的实现方式,在第四方面第四种可能的实现方式中,测试程序包含指示指令;读取单元用于在首次检测到功能
模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号包括:读取单元用于在检测到指示指令后,读取进程号寄存器,并记录进程号寄存器记录的根进程号。In a fourth possible implementation manner of the fourth aspect, the test program includes the instruction instruction, and the reading unit is configured to detect the function for the first time.
When the simulator executes the test program, the root process number of the process number register record is read and recorded. The read unit is configured to read the process number register after the instruction instruction is detected, and record the root process number recorded by the process number register.
根据第四方面或第四方面以上任一种可能的实现方式,在第四方面第五种可能的实现方式中,功能模拟器维护的进程间关系为功能模拟器上运行的操作系统中的proc目录,proc目录记录有每一个线程与每一个线程的父进程之间的关系。According to the fourth aspect or any one of the foregoing possible implementation manners of the fourth aspect, in the fifth possible implementation manner of the fourth aspect, the inter-process relationship maintained by the function simulator is a proc in an operating system running on the function simulator Directory, the proc directory records the relationship between each thread and the parent process of each thread.
第四方面为第一方面方法对应的装置实现方式,第一方面或第一方面任一种可能的实现方式中的描述对应适用于第四方面或第四方面任一种可能的实现方式,在此不再赘述。The fourth aspect is the device implementation manner corresponding to the method of the first aspect, and the description in the first aspect or any possible implementation manner of the first aspect corresponds to the fourth aspect or any possible implementation manner of the fourth aspect, This will not be repeated here.
第五方面,本申请提供了一种测试点的创建系统,该系统包括功能模拟器,管理器和性能模拟器,功能模拟器用于处理器的功能模拟,性能模拟器用于处理器的性能模拟,管理器用于在第一时间读取进程号寄存器记录的T1进程号,并确定T1进程号指示的进程用于执行测试程序,其中,进程号寄存器中保存有功能模拟器正在运行的进程的进程号,将功能模拟器运行后的至少一个指令块发送给性能模拟器执行,在第二时间读取进程号寄存器记录的T2进程号,并确定T2进程号指示的进程用于执行测试程序,创建测试点,并记录测试点数据,其中测试点数据包含功能模拟器的快照和性能模拟器的状态信息。In a fifth aspect, the present application provides a test point creation system including a function simulator, a manager and a performance simulator, a function simulator for functional simulation of the processor, and a performance simulator for performance simulation of the processor, The manager is configured to read the T1 process number recorded by the process number register at the first time, and determine that the process indicated by the T1 process number is used to execute the test program, wherein the process number register holds the process number of the process that the function simulator is running. Sending at least one instruction block after the function simulator is executed to the performance simulator, reading the T2 process number recorded in the process number register at the second time, and determining that the process indicated by the T2 process number is used to execute the test program, creating a test Point and record test point data, where the test point data contains a snapshot of the function simulator and status information of the performance simulator.
根据第五方面,在第五方面第一种可能的实现方式中,在第一时间之前,管理器还用于在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号,执行测试程序的进程为根进程号指示的根进程或根进程的后代进程;管理器用于根据根进程号和功能模拟器维护的进程间关系,确定T1进程号指示的进程用于执行测试程序;管理器用于根据根进程号和功能模拟器维护的进程间关系,确定T2进程号指示的进程用于执行测试程序。According to the fifth aspect, in the first possible implementation manner of the fifth aspect, before the first time, the manager is further configured to: when the function simulator is first detected to execute the test program, read and record the process number register record. The root process number, the process executing the test program is the root process indicated by the root process number or the descendant process of the root process; the manager is used to determine the process indicated by the T1 process number according to the root process number and the interprocess relationship maintained by the function simulator. The test program is executed; the manager is configured to determine the process indicated by the T2 process number to execute the test program according to the root process number and the interprocess relationship maintained by the function simulator.
根据第五方面或第五方面以上任一种可能的实现方式,在第五方面第二种可能的实现方式中,管理器还用于根据根进程号和功能模拟器维护的进程间关系,确定测试程序进程号集合,测试程序进程号集合包含用于执行测试程序的进程的进程号;管理器用于确定T1进程号指示的进程用于执行测试程序包括:管理器用于确定T1进程号或T1进程号的父进程号属于测试程序进程号集合;管理器用于确定T2进程号指示的进程用于执行测试程序包括:管理器用于确
定T2进程号或T2进程号的父进程号属于测试程序进程号集合。According to the fifth aspect or the fifth aspect, any one of the possible implementation manners, in the second possible implementation manner of the fifth aspect, the manager is further configured to determine, according to the root process number and the inter-process relationship maintained by the function simulator The test program process number set, the test program process number set contains the process number of the process for executing the test program; the manager is used to determine the process indicated by the T1 process number for executing the test program, including: the manager is used to determine the T1 process number or the T1 process The parent process number of the number belongs to the test program process number set; the manager is used to determine the process indicated by the T2 process number for executing the test program including: the manager is used to confirm
The parent process number of the T2 process number or T2 process number belongs to the test program process number set.
根据第五方面或第五方面以上任一种可能的实现方式,在第五方面第三种可能的实现方式中,若T1进程号不属于测试程序进程号集合,管理器还用于将T1进程号加入测试程序进程号集合;若T2进程号不属于测试程序进程号集合,管理器还用于将T2进程号加入测试程序进程号集合。According to the fifth aspect or the fifth aspect, the third possible implementation manner, in the third possible implementation manner of the fifth aspect, if the T1 process number does not belong to the test program process number set, the manager is further configured to use the T1 process. The number is added to the test program process number set; if the T2 process number does not belong to the test program process number set, the manager is also used to add the T2 process number to the test program process number set.
根据第五方面或第五方面以上任一种可能的实现方式,在第五方面第四种可能的实现方式中,测试程序包含指示指令;管理器用于在检测到指示指令后,读取进程号寄存器,并记录进程号寄存器记录的根进程号。In a fourth possible implementation manner of the fifth aspect, the test program includes the instruction instruction, and the manager is configured to read the process ID after detecting the instruction instruction. Register and record the root process number of the process number register record.
根据第五方面或第五方面以上任一种可能的实现方式,在第五方面第五种可能的实现方式中,功能模拟器维护的进程间关系为功能模拟器上运行的操作系统中的proc目录,proc目录记录有每一个线程与每一个线程的父进程之间的关系。According to the fifth aspect or the fifth aspect, in any one of the possible implementation manners, in the fifth possible implementation manner of the fifth aspect, the inter-process relationship maintained by the function simulator is a proc in an operating system running on the function simulator Directory, the proc directory records the relationship between each thread and the parent process of each thread.
第五方面为第一方面方法对应的装置实现方式,第一方面或第一方面任一种可能的实现方式中的描述对应适用于第五方面或第五方面任一种可能的实现方式,在此不再赘述。The fifth aspect is the apparatus implementation manner corresponding to the method of the first aspect, and the description in the first aspect or any possible implementation manner of the first aspect is applicable to any possible implementation manner of the fifth aspect or the fifth aspect, This will not be repeated here.
根据本发明实施例公开的技术方案,在预热阶段开始和结束的时候确定了功能模拟器上运行的是测试程序进程,从而保证创建的checkpoint都是与测试程序相关的,减少了其它进程对checkpoint数据的干扰,从而可以提升benchmark测试的精度。According to the technical solution disclosed in the embodiment of the present invention, it is determined that the test program process runs on the function simulator at the beginning and the end of the warm-up phase, thereby ensuring that the created checkpoints are all related to the test program, and the other process pairs are reduced. Checkpoint data interference, which can improve the accuracy of the benchmark test.
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying any creative work.
图1为依据本发明一实施例的模拟器系统的逻辑结构示意图;1 is a schematic diagram showing the logical structure of a simulator system according to an embodiment of the present invention;
图2为依据本发明一实施例的宿主机硬件结构示意图;2 is a schematic structural diagram of a host computer according to an embodiment of the invention;
图3为依据本发明一实施例的模拟器预热阶段的场景图;3 is a scene diagram of a simulator warm-up phase according to an embodiment of the invention;
图4为依据本发明一实施例的测试点创建方法的示范性流程图;4 is an exemplary flowchart of a test point creation method according to an embodiment of the invention;
图5为依据本发明一实施例的测试点创建装置的逻辑结构示意图。
FIG. 5 is a schematic diagram showing the logical structure of a test point creation apparatus according to an embodiment of the invention.
下面将结合附图,对本发明实施例进行描述。The embodiments of the present invention will be described below with reference to the accompanying drawings.
根据本发明实施例,在进行checkpoint创建的时候,由于功能模拟器只能感知模拟的硬件数据和翻译执行的指令流,无法感知操作系统的运行情况,如果不考虑checkpoint的是否与benchmark相关,功能模拟器在运行其它用户进程或者内核进程时也会进行checkpoint创建动作,这个时候获得的checkpoint数据和benchmark测试无关,还要花费时间和空间来创建和保存checkpoint数据,后续在进行模拟器性能测试时,也会浪费系统资源,且会影响测试结果的准确性,甚至影响硬件架构的设计。According to the embodiment of the present invention, when the checkpoint is created, since the function simulator can only perceive the simulated hardware data and the instruction flow of the translation execution, the operating system cannot be perceived, and if the checkpoint is not related to the benchmark, the function is not performed. The simulator also performs checkpoint creation when running other user processes or kernel processes. The checkpoint data obtained at this time has nothing to do with the benchmark test. It takes time and space to create and save checkpoint data, and subsequent performance tests are performed. It also wastes system resources and affects the accuracy of test results and even affects the design of the hardware architecture.
例如,在多核处理器设计过程中,需要考虑各种因素:多级缓存(cache)大小、寄存器个数和位数、流水线调度策略、处理器核间总线连接、浮点模块等等。这些参数设置将影响到处理器的性能,如何设置这些参数来达到最佳性能,这就需要模拟器参与处理器的设计和测试,如果创建的checkpoint不准确,则对模拟器的测试结果就会出现偏差,从而不能实际反映真实情况,影响到实际硬件架构的设计。For example, in the multi-core processor design process, various factors need to be considered: multi-level cache (cache) size, number of registers and bits, pipeline scheduling strategy, processor inter-core bus connections, floating-point modules, and so on. These parameter settings will affect the performance of the processor. How to set these parameters to achieve the best performance, this requires the simulator to participate in the design and test of the processor. If the checkpoint created is not accurate, the test result of the simulator will be Deviations occur so that they do not actually reflect the real situation and affect the design of the actual hardware architecture.
图1为依据本发明一实施例的一种模拟器系统的逻辑结构示意图,如图1所示,该系统包括模拟器100和宿主机102。其中宿主机102用于为模拟器提供运行环境,模拟器100用于模拟计算机架构,包含功能模拟器104,管理器112和性能模拟器114。FIG. 1 is a schematic diagram showing the logical structure of a simulator system according to an embodiment of the present invention. As shown in FIG. 1, the system includes a simulator 100 and a host 102. The host machine 102 is used to provide an operating environment for the simulator, and the simulator 100 is used to simulate a computer architecture, including a function simulator 104, a manager 112, and a performance simulator 114.
功能模拟器104分为两部分,底层为处理器模拟器106,以及运行在处理器模拟器106上的虚拟机108。其中,处理器模拟器106为运行在宿主机上的软件模块,用于模拟处理器架构的功能,虚拟机108为运行在处理器模拟器106模拟的处理器架构上的虚拟机,其上运行有用户操作系统,在使用性能测试程序(benchmark)对模拟器100的性能进行测试时,首先就是使用虚拟机108运行benchmark代码。The function simulator 104 is divided into two parts, the bottom layer being the processor simulator 106, and the virtual machine 108 running on the processor simulator 106. The processor emulator 106 is a software module running on the host machine for simulating the function of the processor architecture. The virtual machine 108 is a virtual machine running on the processor architecture simulated by the processor simulator 106, and runs thereon. There is a user operating system. When testing the performance of the simulator 100 using a performance tester, the first is to use the virtual machine 108 to run the benchmark code.
其中,虚拟机108上维护有运行的进程之间的关系。例如,如果虚拟机108上运行有Linux操作系统,则Linux操作系统上的/proc目录存储有内核运行状态的文件,/proc目录是一种文件系统,即proc文件系统,可以通过其中的文件查看有关系统硬件及当前正在运行进程的信息。其中,/proc/pid/stat中记录有父进程ID(process id of the parent process,ppid),描述的是该pid指示
的进程的父进程id值,所以通过扫描proc目录可以获取操作系统中所有进程的树状结构,也就可以获取所有进程之间的关系。Among them, the relationship between the running processes is maintained on the virtual machine 108. For example, if the Linux operating system runs on the virtual machine 108, the /proc directory on the Linux operating system stores the file in the kernel running state, and the /proc directory is a file system, that is, the proc file system, which can be viewed through the files therein. Information about the system hardware and the currently running process. Where /proc/pid/stat records the process ID (process id of the parent process, ppid), which describes the pid indication.
The parent process id value of the process, so by scanning the proc directory, you can get the tree structure of all processes in the operating system, and you can get the relationship between all processes.
功能模拟器104只要求功能正确,即执行结果正确,所以对于处理器的内部工作原理不会进行详细模拟,而性能模拟器114一般用于模拟处理器硬件的行为,所以性能模拟器114需要详细的描述处理器架构的各个硬件部分,在运行处理器指令的时候,可以获取性能模拟器114模拟的各个硬件的运行情况。The function simulator 104 only requires the function to be correct, that is, the execution result is correct, so the internal working principle of the processor is not simulated in detail, and the performance simulator 114 is generally used to simulate the behavior of the processor hardware, so the performance simulator 114 needs to be detailed. The various hardware components describing the processor architecture can obtain the operation of the various hardware simulated by the performance simulator 114 when the processor instructions are run.
性能模拟器114可以包含(或模拟)以下功能:指令译码器,性能模拟器114在执行指令的时候,会对指令进行译码;生成器,将译码后的指令生成多条微指令,在调度器的调度下执行(顺序或者乱序);各种运算单元模块;并发调度器,从而各个流水线上的微指令可以并发运行;互联和时钟;处理器内部存放数据的区域,如各个处理器核上的寄存器、缓存、转换监视缓冲器(TLB),以及各种协处理器寄存器等;调试模块,用于处理器自身硬件上的调试功能等。应理解,本发明实施例仅仅是举例说明,并不限定性能模拟器114包含的功能模块,在具体实现过程中,性能模拟器114可以包含更多或者更少的功能模块。The performance simulator 114 may include (or simulate) the following functions: an instruction decoder, the performance simulator 114 decodes the instruction when the instruction is executed, and the generator generates a plurality of microinstructions from the decoded instruction. Execute under the scheduling of the scheduler (sequential or out-of-order); various arithmetic unit modules; concurrent scheduler, so that the micro-instructions on each pipeline can run concurrently; interconnect and clock; the area where the processor stores data, such as each processing Registers, buffers, conversion monitor buffers (TLBs) on the core, and various coprocessor registers, etc.; debug modules for debugging functions on the processor's own hardware. It should be understood that the embodiments of the present invention are merely illustrative and do not limit the functional modules included in the performance simulator 114. In a specific implementation process, the performance simulator 114 may include more or fewer functional modules.
管理器112为连接功能模拟器104和性能模拟器114的中间件,用于指令块转发和应用程序接口调用,同时也用于收集性能模拟器114的运行数据。功能模拟器104上运行完一个指令块后,通过管理器112将这个指令块发送给性能模拟器114运行,这样功能模拟器104和性能模拟器114运行的是相同的指令流,功能模拟器104实现功能的实现正确性,性能模拟器114实现性能和效率上的测试数据输出。The manager 112 is a middleware that connects the function simulator 104 and the performance simulator 114 for instruction block forwarding and application program interface calls, and is also used to collect operational data of the performance simulator 114. After running an instruction block on the function simulator 104, the instruction block is sent to the performance simulator 114 through the manager 112, so that the function simulator 104 and the performance simulator 114 run the same instruction stream, and the function simulator 104 To achieve the correctness of the implementation of the function, the performance simulator 114 achieves test data output on performance and efficiency.
如果性能模拟器114和功能模拟器104全程一起运行,执行相同的指令块和接口调用,则运行一组benchamrk测试程序需要很长时间,可能长达数天,甚至数十天,如果还存在对性能模拟器114的参数多次修改设置的情况,则整个测试周期更长。为了加快测试速度,可以采取创建测试点(checkpoint)的形式,在固定的时间或者指令执行数间隔下,管理器112执行创建checkpoint动作。If the performance simulator 114 and the function simulator 104 are run together, executing the same instruction block and interface calls, it takes a long time to run a set of benchmarkamrk test programs, which may take several days, or even tens of days, if there is still a pair If the parameters of the performance simulator 114 are modified multiple times, the entire test cycle is longer. In order to speed up the test, a form of creating a checkpoint may be taken, and at a fixed time or an instruction execution interval, the manager 112 performs a create checkpoint action.
创建一个checkpoint的流程为:功能模拟器104和性能模拟器114一起运行一段时间,即预热(warm)阶段,在这段时间内,功能模拟器104上运行完一个指令块后,通过管理器112将这个指令块发送给性能模拟器114运行,这样功能模拟器104和性能模拟器114运行的是相同的指令流,以此来填充性能模拟器114的状态信息(包含cache,TLB,寄存器,协处理器寄存器等),然后创建checkpoint,生成checkpoint数据,其中,checkpoint数据包含功能模拟器104
的快照以及性能模拟器的状态信息,这些数据可以用来保存和恢复功能模拟器104和性能模拟器114运行的状态。The process of creating a checkpoint is: the function simulator 104 and the performance simulator 114 run together for a period of time, that is, a warm-up phase, during which the function simulator 104 runs through an instruction block and passes through the manager. 112 sends the instruction block to the performance simulator 114 for operation, such that the function simulator 104 and the performance simulator 114 run the same instruction stream to populate the state information of the performance simulator 114 (including the cache, TLB, registers, Coprocessor registers, etc.), then create a checkpoint to generate checkpoint data, wherein the checkpoint data includes a function simulator 104
The snapshot and the status information of the performance simulator can be used to save and restore the state of the function of the function simulator 104 and the performance simulator 114.
在一定的时间段或者执行指令数间隔后执行warm,创建checkpoints动作,这样可以得到一系列的checkpoint数据。后续功能模拟器104和性能模拟器114可以使用checkpoint数据恢复运行状态,并执行一些指令块指令。这样只有第一次完整运行benchmark测试程序并创建一系列的checkpoint数据,性能模拟器114修改参数设定后,性能模拟器和功能模拟器只需要加载checkpoint数据,就可以实现benchmark测试。从而可以大大的提高测试速度,缩短测试时间。The warm-up is executed after a certain period of time or after the execution of the instruction number interval, and a checkpoints action is created, so that a series of checkpoint data can be obtained. Subsequent function simulator 104 and performance simulator 114 can use the checkpoint data to restore operational status and execute some instruction block instructions. This is the first time that the benchmark test program is completely run and a series of checkpoint data is created. After the performance simulator 114 modifies the parameter settings, the performance simulator and the function simulator only need to load the checkpoint data to implement the benchmark test. This can greatly increase the test speed and shorten the test time.
应理解,图1仅仅是对模拟器系统的示例性说明,在具体实现过程中,该模拟器系统可以包含更复杂的组件,且图1并不对模拟器系统的具体实现进行任何限定,例如,管理器112的部分功能可以嵌套在处理器模拟器106和/或处理器模拟器116中实现。It should be understood that FIG. 1 is merely an exemplary illustration of a simulator system. In a specific implementation process, the simulator system may include more complicated components, and FIG. 1 does not impose any limitation on the specific implementation of the simulator system, for example, Some of the functionality of manager 112 may be nested within processor simulator 106 and/or processor simulator 116.
图2是依据本发明一实施例的宿主机102的硬件结构示意图。如图2所示,宿主机102包括处理器202、存储器204、输入/输出接口206、通信接口208和总线210。其中,处理器202、存储器204、输入/输出接口206和通信接口208通过总线210实现彼此之间的通信连接。FIG. 2 is a schematic diagram showing the hardware structure of a host computer 102 according to an embodiment of the invention. As shown in FIG. 2, host machine 102 includes a processor 202, a memory 204, an input/output interface 206, a communication interface 208, and a bus 210. Among them, the processor 202, the memory 204, the input/output interface 206, and the communication interface 208 implement a communication connection with each other through the bus 210.
处理器202是宿主机102的控制中心,用于执行相关程序,以实现本发明实施例所提供的技术方案。处理器202可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路(Application Specific Integrated Circuit,ASIC),或者一个或多个集成电路,用于执行相关程序,以实现本发明实施例所提供的技术方案。The processor 202 is a control center of the host computer 102 for executing related programs to implement the technical solutions provided by the embodiments of the present invention. The processor 202 can be a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for executing related programs. The technical solution provided by the embodiment of the present invention is implemented.
存储器204可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器204可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发明实施例提供的技术方案时,用于实现本发明实施例提供的技术方案的程序代码保存在存储器204中,并由处理器202来执行。存储器204可以与处理器202集成在一起或集成在处理器202的内部,也可以是独立于处理器202的一个或多个存储单元。The memory 204 can be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 204 can store an operating system and other applications. When the technical solution provided by the embodiment of the present invention is implemented by software or firmware, the program code for implementing the technical solution provided by the embodiment of the present invention is stored in the memory 204 and executed by the processor 202. The memory 204 can be integrated with or integrated with the processor 202, or it can be one or more memory units independent of the processor 202.
供处理器202执行的程序代码可以存储在与其连接的外部存储设备中或存储器204中。可选的,存储器204为RAM,存储在外部存储设备内部的程序代码(例如,功能模拟器模块,管理器模块或性能模拟器模块等)被拷贝到存储器204中,以供处理器202执行。
Program code for execution by processor 202 may be stored in an external storage device or memory 204 coupled thereto. Optionally, the memory 204 is a RAM, and program code (eg, a function simulator module, a manager module or a performance simulator module, etc.) stored inside the external storage device is copied into the memory 204 for execution by the processor 202.
如图2所示,宿主机102的存储器204中包含功能模拟器模块,管理器模块和性能模拟器模块等,处理器202执行功能模拟器模块,管理器模块和性能模拟器模块实现测试点的创建,其中功能模拟器模块用于实现功能模拟器的功能,管理器模块用于实现管理器的功能,性能模拟器模块用于实现性能模拟器的功能。As shown in FIG. 2, the memory 204 of the host 102 includes a function simulator module, a manager module, a performance simulator module, and the like, and the processor 202 executes a function simulator module, and the manager module and the performance simulator module implement test points. Created, where the function simulator module is used to implement the functions of the function simulator, the manager module is used to implement the functions of the manager, and the performance simulator module is used to implement the functions of the performance simulator.
除非另有说明,在本发明中,一个用于执行特定功能的组件,例如,处理器202或存储器204,可以通过配置一个通用的组件来执行相应功能来实现,也可以通过一个专门执行特定功能的专用组件来实现,本申请并不对此进行限定。Unless otherwise stated, in the present invention, a component for performing a specific function, for example, the processor 202 or the memory 204, may be implemented by configuring a general-purpose component to perform a corresponding function, or may perform a specific function through a specific function. The specific components are implemented, and this application does not limit this.
输入/输出接口206用于接收输入的数据和信息,输出操作结果等数据。The input/output interface 206 is for receiving input data and information, and outputting data such as operation results.
通信接口208使用例如但不限于收发器一类的收发装置,来实现宿主机102与其他设备或通信网络之间的通信。 Communication interface 208 implements communication between host device 102 and other devices or communication networks using transceivers such as, but not limited to, transceivers.
总线210可包括一通路,在宿主机102各个部件(例如处理器202、存储器204、输入/输出接口206和通信接口208)之间传送信息。Bus 210 can include a path for communicating information between various components of host 102, such as processor 202, memory 204, input/output interface 206, and communication interface 208.
应注意,尽管图2所示的计宿主机102仅仅示出了处理器202、存储器204、输入/输出接口206、通信接口208以及总线210,但是在具体实现过程中,本领域的技术人员应当明白,宿主机102还包含实现正常运行所必须的其他器件。同时,根据具体需要,本领域的技术人员应当明白,宿主机102还可包含实现其他附加功能的硬件器件。此外,本领域的技术人员应当明白,宿主机102也可仅仅包含实现本发明实施例所必须的器件,而不必包含图2中所示的全部器件。It should be noted that although the meter host 102 shown in FIG. 2 only shows the processor 202, the memory 204, the input/output interface 206, the communication interface 208, and the bus 210, in a specific implementation process, those skilled in the art should It is understood that host 102 also contains other devices necessary to achieve proper operation. At the same time, those skilled in the art will appreciate that host machine 102 may also include hardware devices that implement other additional functions, depending on the particular needs. Moreover, those skilled in the art will appreciate that host 102 may also only include the components necessary to implement embodiments of the present invention, and does not necessarily include all of the devices shown in FIG.
图2所示的硬件结构以及上述描述适用于本发明实施例所提供的各种测试点的创建装置,适用于执行本发明实施例所提供的各种测试点创建方法。The hardware structure shown in FIG. 2 and the above description are applicable to various test point creation apparatuses provided by the embodiments of the present invention, and are applicable to performing various test point creation methods provided by the embodiments of the present invention.
在创建checkpoint之前,功能模拟器带需要着性能模拟器预热(warm)一段时间,即管理器需要将将功能模拟器执行后的至少一个指令块(Basic Block)发送给性能模拟器来执行,用来填充性能模拟器里的各个数据,然后执行创建checkpoint动作,生成checkpoint数据。因为模拟器系统不仅仅用于运行测试程序进程,还用于运行其他与测试程序无关的进程,如果在预热阶段,功能模拟器运行的不是用于执行测试指令的进程,则功能模拟器和性能模拟器中填充的各种数据是与测试程序无关的,如果在这样的预热阶段结束后,创建checkpoint数据,就会生成与测试程序无关的测试数据,不仅仅浪费了系统资源,而却会造成后续测试的不准确性。为了保证创建的checkpoint的准确性,需要保证在warm阶段,功能模拟器运行的一直有测试程序进程。图3为依据本发明一实施例的模拟器预热阶段的场景图,如图3所
示,预热阶段有一下四种场景:Before the checkpoint is created, the function simulator needs to warm up the performance simulator for a period of time, that is, the manager needs to send at least one basic block after the function simulator is executed to the performance simulator for execution. Used to fill in the various data in the performance simulator, and then perform the creation of a checkpoint action to generate checkpoint data. Because the simulator system is not only used to run the test program process, but also to run other processes that are not related to the test program. If the function simulator is not running the process for executing test instructions during the warm-up phase, the function simulator and The various data filled in the performance simulator is independent of the test program. If the checkpoint data is created after the end of this warm-up phase, test data is generated that is not related to the test program, not only wasting system resources, but Will cause inaccuracies in subsequent tests. In order to ensure the accuracy of the created checkpoint, it is necessary to ensure that the test simulator process is always running in the warm phase of the function simulator. 3 is a scene diagram of a simulator warm-up phase according to an embodiment of the present invention, as shown in FIG.
Show, there are four scenarios in the warm-up phase:
(1)、在预热阶段,模拟器运行的都是测试程序进程,即图3所示的W1和W5预热阶段。因为整个预热阶段模拟器运行的都是测试程序进程,则预热阶段结束后,功能模拟器和性能模拟器中填充的数据是与测试程序有关的,这种情况下创建的checkpoint是准确的。(1) In the warm-up phase, the simulator runs the test program process, that is, the W1 and W5 warm-up phases shown in Figure 3. Because the entire warm-up phase simulator runs the test program process, after the warm-up phase is over, the data filled in the function simulator and performance simulator is related to the test program. In this case, the checkpoint created is accurate. .
(2)、在预热阶段的初始阶段,模拟器运行的是测试程序进程,在预热阶段过程中发生了进程切换,切换后模拟器运行是其他进程,即图3所示的W2预热阶段。因为在warm阶段发生了进程切换,会导致在warm阶段结束后,功能模拟器和性能模拟器中填充的数据不准确,创建的checkpoint是不准确的。(2) In the initial stage of the warm-up phase, the simulator runs the test program process, and the process switch occurs during the warm-up phase. After the switch, the simulator runs other processes, that is, the W2 warm-up shown in Figure 3. stage. Because process switching occurs during the warm phase, the data filled in the function simulator and performance simulator is inaccurate after the end of the warm phase, and the checkpoint created is inaccurate.
(3)、在整个预热阶段,模拟器运行的都是其他程序,即图3所示的W3预热阶段。因为整个预热阶段模拟器运行的都是其他进程,因此,预热阶段结束后,功能模拟器和性能模拟器中填充的数据是与测试程序无关的,这种情况下创建的checkpoint是不准确的。(3) During the entire warm-up phase, the simulator runs other programs, namely the W3 warm-up phase shown in Figure 3. Because the entire warm-up phase simulator runs other processes, after the warm-up phase is over, the data filled in the function simulator and performance simulator is independent of the test program. In this case, the checkpoint created is inaccurate. of.
(4)、在预热阶段的初始阶段,模拟器运行的是其他进程,在预热阶段过程中发生了进程切换,切换后模拟器运行的是测试程序进程,即图3所示的W4预热阶段。因为在warm初始阶段,模拟器运行的是其他进程,而是在warm过程中切换到测试程序进程,这样会造成预热的不充分,也会导致在warm阶段结束后,功能模拟器和性能模拟器中填充的数据不准确,创建的checkpoint也是不准确的。(4) In the initial stage of the warm-up phase, the simulator runs other processes. During the warm-up phase, the process switch occurs. After the switchover, the simulator runs the test program process, that is, the W4 pre-show shown in Figure 3. Hot stage. Because in the initial stage of the warm, the simulator runs other processes, but switches to the test program process in the warm process, which will cause insufficient warm-up, and will lead to functional simulator and performance simulation after the end of the warm phase. The data filled in the device is not accurate, and the checkpoint created is also inaccurate.
综上所述,只有预热阶段模拟器运行的都是测试程序进程的场景下,创建的checkpoint才是与测试程序准确相关的,其他场景下创建的checkpoint都会引入干扰,从而造成测试的不准确。In summary, only the preheating stage simulator runs in the test program process scenario, the checkpoint created is accurately related to the test program, and the checkpoint created in other scenarios will introduce interference, resulting in inaccurate testing. .
图4为依据本发明一实施例的测试点的创建方法400的示意性流程图,如图4所示,方法400包括:FIG. 4 is a schematic flowchart of a method 400 for creating a test point according to an embodiment of the present invention. As shown in FIG. 4, the method 400 includes:
S402:管理器在第一时间读取进程号(PID)寄存器记录的T1进程号。S402: The manager reads the T1 process number recorded in the process number (PID) register at the first time.
其中,PID寄存器中保存有功能模拟器正在运行的进程的进程号。Among them, the process number of the process that the function simulator is running is stored in the PID register.
S404:管理器判断T1进程号指示的进程是否用于执行测试程序,若T1进程号指示的进程不是用于执行测试程序,则返回步骤S402,若T1进程号指示的进程用于执行测试程序,则执行步骤S406。S404: The manager determines whether the process indicated by the T1 process number is used to execute the test program. If the process indicated by the T1 process number is not used to execute the test program, the process returns to step S402. If the process indicated by the T1 process number is used to execute the test program, Then step S406 is performed.
管理器在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号,执行测试程序的进程为根进程号指示的根进程或根进程的
后代进程,管理器根据根进程号和功能模拟器维护的进程间关系,判断T1进程号指示的进程是否用于执行测试程序。When the manager first detects that the function simulator executes the test program, it reads and records the root process number of the process number register record. The process that executes the test program is the root process or the root process indicated by the root process number.
In the descendant process, the manager determines whether the process indicated by the T1 process number is used to execute the test program according to the root process number and the interprocess relationship maintained by the function simulator.
可选的,功能模拟器上运行的操作系统为linux操作系统,则功能模拟器维护的进程间关系为功能模拟器上运行的操作系统中的proc目录,proc目录记录有每一个线程与每一个线程的父进程之间的关系。proc目录可以由功能模拟器上运行的操作系统通过共享目录的方式导出proc目录,以供管理器共享。Optionally, the operating system running on the function simulator is a Linux operating system, and the inter-process relationship maintained by the function simulator is a proc directory in an operating system running on the function simulator, and the proc directory records each thread and each one. The relationship between the parent processes of a thread. The proc directory can be exported by the operating system running on the function simulator through a shared directory for the manager to share.
每一个进程的/proc/pid/stat文件中记录了该进程的父进程的父进程ID(PPID)。根据proc目录,可以得到一个以根进程号为根节点的进程号树,用于描述测试程序进程之间的关系。如果T1进程号为根进程或者根进程的后代进程,则说明T1进程号指示的进程是用于执行测试程序的进程。The parent process ID (PPID) of the parent process of the process is recorded in the /proc/pid/stat file of each process. According to the proc directory, you can get a process number tree with the root process number as the root node to describe the relationship between the test program processes. If the T1 process number is the root process or the descendant process of the root process, the process indicated by the T1 process number is the process used to execute the test program.
更具体的,管理器可以根据父进程号和功能模拟器维护的进程间关系,确定测试程序进程号集合,测试程序进程号集合包含用于执行测试程序的进程的进程号。管理器判断T1进程号或T1进程号的父进程号是否属于测试程序进程号集,如果T1进程号或T1进程号的父进程号属于测试程序进程号集合,则说明T1进程号指示的进程是用于执行测试程序的进程。进一步的,如果T1进程号或T1进程号的父进程不属于测试程序集合,则管理器还根据功能模拟器维护的进程间关系,确定T1进程号的父进程号指示的进程是否是测试程序进程的后代进程,如果T1进程号的父进程号指示的进程是测试程序进程的后代进程,则说明T1进程号指示的进程是用于执行测试程序的进程;若T1进程号的父进程号指示的进程不是根进程的后代进程,则说明T1进程号指示的进程不是用于执行测试程序的程序。More specifically, the manager can determine the test program process number set according to the parent process number and the inter-process relationship maintained by the function simulator, and the test program process number set contains the process number of the process for executing the test program. The manager determines whether the parent process number of the T1 process number or the T1 process number belongs to the test program process number set. If the T1 process number or the parent process number of the T1 process number belongs to the test program process number set, the process indicated by the T1 process number is The process used to execute the test program. Further, if the parent process of the T1 process number or the T1 process number does not belong to the test program set, the manager determines whether the process indicated by the parent process number of the T1 process number is a test program process according to the inter-process relationship maintained by the function simulator. The descendant process, if the process indicated by the parent process number of the T1 process number is a descendant process of the test program process, it indicates that the process indicated by the T1 process number is a process for executing the test program; if the parent process number of the T1 process number indicates The process is not a descendant process of the root process, indicating that the process indicated by the T1 process number is not a program for executing the test program.
若T1进程号指示的进程以及其父进程是用于执行测试程序的进程,且T1进程号以及其父进程号不属于测试程序进程号集合,管理器还将T1进程号以及其父进程号加入测试程序进程号集合。If the process indicated by the T1 process number and its parent process are the processes used to execute the test program, and the T1 process number and its parent process number do not belong to the test program process number set, the manager also adds the T1 process number and its parent process number. Test program process number collection.
如果确定T1进程号指示的进程用于执行测试程序,则可以开始预热阶段,即执行步骤S406,如果确定T1进程号指示的进行不是用于执行测试程序,则管理器可以等待一定的时间,或者等功能模拟器执行一定的指令块后,重新执行步骤S402。If it is determined that the process indicated by the T1 process number is used to execute the test program, the warm-up phase may be started, that is, step S406 is performed, and if it is determined that the progress of the T1 process number indication is not for executing the test program, the manager may wait for a certain time, Or after the function simulator executes a certain instruction block, step S402 is re-executed.
S406:管理器将功能模拟器运行后的至少一个指令块发送给性能模拟器执行。
S406: The manager sends at least one instruction block after the function simulator is executed to the performance simulator for execution.
因为检测到功能模拟器当前运行的进程是属于测试程序进程,则管理器可以控制器模拟器进入预热阶段,将功能模拟器执行后的指令块发送给性能模拟器执行,从而填充性能模拟器的各个状态数据。Because it is detected that the currently running process of the function simulator belongs to the test program process, the manager can enter the warm-up phase by the controller simulator, and send the instruction block after the function simulator is executed to the performance simulator to perform the filling of the performance simulator. Various status data.
S408:管理器在第二时间读取PID寄存器记录的T2进程号。S408: The manager reads the T2 process number recorded in the PID register at the second time.
具体的,在预热阶段结束时,例如,在固定的时间或者指令执行数间隔后,管理器会再次读取PID寄存器。Specifically, at the end of the warm-up phase, for example, after a fixed time or instruction execution interval, the manager reads the PID register again.
S410:管理器判断T2进程号指示的进程是否用于执行测试程序,若T2进程号指示的进程不是用于执行测试程序,则返回步骤S402,若T1进程号指示的进程用于执行测试程序,则执行步骤S412。S410: The manager determines whether the process indicated by the T2 process number is used to execute the test program. If the process indicated by the T2 process number is not used to execute the test program, the process returns to step S402. If the process indicated by the T1 process number is used to execute the test program, Then step S412 is performed.
管理器判断T2进程号指示的进程是否用于执行测试程序的具体流程参照管理器判断T1进程号指示的进程是否用于执行测试程序的具体流程,在此不再赘述。The specific process for the manager to determine whether the process indicated by the T2 process number is used to execute the test program refers to the specific process of the manager for determining whether the process indicated by the T1 process number is used to execute the test program, and details are not described herein again.
同理,若T2进程号指示的进程以及其父进程是用于执行测试程序的进程,且T2进程号以及其父进程号不属于测试程序进程号集合,管理器还将T2进程号以及其父进程号加入测试程序进程号集合。Similarly, if the process indicated by the T2 process number and its parent process are the processes used to execute the test program, and the T2 process number and its parent process number are not part of the test program process number set, the manager will also have the T2 process number and its parent. The process number is added to the test program process number set.
因为预热阶段时长有限,很少会发生两次进程切换的情况,若预热阶段开始时的T1进程号指示的进程和预热阶段结束时的T2进程号指示的进程都用于执行测试程序,则可以推断出整个预热阶段模拟器都在运行测试程序进程,预热阶段是有效的,在这种情况下,可以进行checkpoint的创建动作;如果T2进程号指示的进程不是用于执行测试程序,则表明预热阶段发生了进程切换,由此会造成数据的不准确,则管理器不进行checkpoint创建动作,可以等待一定的时间,或者等功能模拟器执行一定的指令块后,重新执行步骤S402。Because the duration of the warm-up phase is limited, there are very few cases where process switching occurs. If the process indicated by the T1 process number at the beginning of the warm-up phase and the process indicated by the T2 process number at the end of the warm-up phase are used to execute the test procedure. , it can be inferred that the entire warm-up phase simulator is running the test program process, the warm-up phase is valid, in this case, the checkpoint creation action can be performed; if the process indicated by the T2 process number is not used to perform the test The program indicates that the process switchover occurs during the warm-up phase, which will result in inaccurate data. The manager does not perform the checkpoint creation action, and can wait for a certain time, or wait for the function simulator to execute a certain instruction block and then re-execute. Step S402.
应理解,T1进程号和T2进程号仅仅是表示两个不同时间点PID寄存器中保存的进程号,二者可以相同,也可以不同。It should be understood that the T1 process number and the T2 process number are only process numbers stored in the PID registers at two different time points, and the two may be the same or different.
S412:管理器创建测试点,并记录测试点数据,其中测试点数据包含功能模拟器的快照和性能模拟器的状态信息。S412: The manager creates a test point and records test point data, wherein the test point data includes a snapshot of the function simulator and status information of the performance simulator.
管理器创建测试点后,将创建的测试点数据保存起来,以供后续benchmark测试使用。根据以上方法可以得到一系列的准确的checkpoint数据,后续功能模拟器和性能模拟器可以使用checkpoint数据恢复运行状态,并执行一些指令块指令。这样只有第一次完整运行benchmark测试程序并创建一系列的checkpoint数据,性能模拟器修改参数设定后,性能模拟器和功能模拟器只需
要加载checkpoint数据,就可以实现benchmark测试。After the manager creates a test point, the created test point data is saved for use in subsequent benchmark tests. According to the above method, a series of accurate checkpoint data can be obtained, and the subsequent function simulator and performance simulator can use the checkpoint data to restore the running state and execute some instruction block instructions. This is only the first time you run the benchmark test program completely and create a series of checkpoint data. After the performance simulator changes the parameter settings, the performance simulator and function simulator only need to
To load checkpoint data, you can implement the benchmark test.
根据本发明实施例公开的技术方案,在预热阶段开始和结束的时候确定了功能模拟器上运行的是测试程序进程,从而保证创建的checkpoint都是与测试程序相关的,减少了其它进程对checkpoint数据的干扰,从而可以提升benchmark测试的精度。According to the technical solution disclosed in the embodiment of the present invention, it is determined that the test program process runs on the function simulator at the beginning and the end of the warm-up phase, thereby ensuring that the created checkpoints are all related to the test program, and the other process pairs are reduced. Checkpoint data interference, which can improve the accuracy of the benchmark test.
图5为依据本发明一实施例的的测试点创建装置500的逻辑结构示意图,如图5所示装置500包括:读取单元502,确定单元504,调度单元506和创建单元508。FIG. 5 is a schematic diagram showing the logical structure of a test point creation apparatus 500 according to an embodiment of the present invention. As shown in FIG. 5, the apparatus 500 includes a reading unit 502, a determining unit 504, a scheduling unit 506, and a creating unit 508.
读取单元502,用于在第一时间读取进程号寄存器记录的T1进程号,其中,进程号寄存器中保存有功能模拟器正在运行的进程的进程号。The reading unit 502 is configured to read the T1 process number recorded by the process number register at the first time, wherein the process number register stores the process number of the process that the function simulator is running.
确定单元504:用于确定T1进程号指示的进程用于执行测试程序。Determination unit 504: The process for determining the T1 process number indication is used to execute the test procedure.
在第一时间之前,读取单元502还用于在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号,执行测试程序的进程为根进程号指示的根进程或根进程的后代进程。Before the first time, the reading unit 502 is further configured to read and record the root process number of the process number register record when the function simulator is first detected to execute the test program, and the process of executing the test program is the root indicated by the root process number. The descendant process of a process or root process.
可选的,测试程序包含指示指令,读取单元502用于在首次检测到功能模拟器执行测试程序时,读取并记录进程号寄存器记录的根进程号包括:读取单元502用于在检测到指示指令后,读取进程号寄存器,并记录进程号寄存器记录的根进程号。Optionally, the test program includes an instruction instruction, and the reading unit 502 is configured to read and record the root process number of the process number register record when the function simulator is first detected to execute the test program, where the reading unit 502 is configured to detect After the instruction is instructed, the process number register is read and the root process number recorded in the process number register is recorded.
确定单元504用于确定T1进程号指示的进程用于执行测试程序包括:确定单元504用于根据根进程号和功能模拟器维护的进程间关系,确定T1进程号指示的进程用于执行测试程序。The determining unit 504 is configured to determine that the process indicated by the T1 process number is used to execute the test program, and the determining unit 504 is configured to determine, according to the root process number and the inter-process relationship maintained by the function simulator, that the process indicated by the T1 process number is used to execute the test program. .
其中,功能模拟器维护的进程间关系可以为功能模拟器上运行的操作系统中的proc目录,proc目录记录有每一个线程与每一个线程的父进程之间的关系。The inter-process relationship maintained by the function simulator may be a proc directory in an operating system running on the function simulator, and the proc directory records the relationship between each thread and the parent process of each thread.
可选的,确定单元504还用于根据父进程号和功能模拟器维护的进程间关系,确定测试程序进程号集合,测试程序进程号集合包含用于执行测试程序的进程的进程号。确定单元504用于确定T1进程号指示的进程用于执行测试程序包括:确定单元504用于确定T1进程号或T1进程号的父进程号属于测试程序进程号集合。Optionally, the determining unit 504 is further configured to determine, according to the parent process ID and the inter-process relationship maintained by the function simulator, a test program process number set, where the test program process number set includes a process number of a process for executing the test program. The determining unit 504 is configured to determine that the process indicated by the T1 process number is used to execute the test program. The determining unit 504 is configured to determine that the T1 process number or the parent process number of the T1 process number belongs to the test program process number set.
若T1进程号不属于测试程序进程号集合,确定单元504还用于将T1进程号加入测试程序进程号集合。If the T1 process number does not belong to the test program process number set, the determining unit 504 is further configured to add the T1 process number to the test program process number set.
调度单元506,用于将功能模拟器运行后的至少一个指令块发送给性能模
拟器执行。a scheduling unit 506, configured to send at least one instruction block after the function simulator is run to the performance mode
The simulator is executed.
读取单元502还用于在第二时间读取进程号寄存器记录的T2进程号。确定单元504还用于确定T2进程号指示的进程用于执行测试程序。The reading unit 502 is further configured to read the T2 process number recorded by the process number register at the second time. The determining unit 504 is further configured to determine that the process indicated by the T2 process number is used to execute the test program.
确定单元504用于确定T2进程号指示的进程用于执行测试程序包括:确定单元504用于根据根进程号和功能模拟器维护的进程间关系,确定T2进程号指示的进程用于执行测试程序。The determining unit 504 is configured to determine that the process indicated by the T2 process number is used to execute the test program, and the determining unit 504 is configured to determine, according to the root process number and the inter-process relationship maintained by the function simulator, that the process indicated by the T2 process number is used to execute the test program. .
更具体的,确定单元504用于确定T2进程号指示的进程用于执行测试程序包括:确定单元504用于确定T2进程号或T2进程号的父进程号属于测试程序进程号集合。More specifically, the determining unit 504 is configured to determine that the process indicated by the T2 process number is used to execute the test program, and the determining unit 504 is configured to determine that the parent process number of the T2 process number or the T2 process number belongs to the test program process number set.
若T2进程号不属于测试程序进程号集合,确定单元504还用于将T2进程号加入测试程序进程号集合。If the T2 process number does not belong to the test program process number set, the determining unit 504 is further configured to add the T2 process number to the test program process number set.
创建单元508,用于创建测试点,并记录测试点数据,其中测试点数据包含功能模拟器的快照和性能模拟器的状态信息。A creation unit 508 is configured to create a test point and record test point data, wherein the test point data includes a snapshot of the function simulator and status information of the performance simulator.
本发明实施例部分的读取单元502,确定单元504,调度单元506和创建单元508可以由图2实施例的处理器202和存储器204实现,更具体的,可以由处理器202执行存储器204中的管理器模块实现。The reading unit 502, the determining unit 504, the scheduling unit 506 and the creating unit 508 of the embodiment of the present invention may be implemented by the processor 202 and the memory 204 of the embodiment of FIG. 2, and more specifically, may be executed by the processor 202 in the memory 204. The implementation of the manager module.
本发明实施例是管理器的装置实施例,图4实施例部分的特征描述,适用于本发明实施例,在此不再赘述。The embodiment of the present invention is an apparatus embodiment of the manager, and the feature description of the embodiment of FIG. 4 is applicable to the embodiment of the present invention, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and may be implemented in another manner, for example, multiple modules or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块
中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
in. The above integrated modules can be implemented in the form of hardware or in the form of hardware plus software function modules.
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。The above-described integrated modules implemented in the form of software function modules can be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform some of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a removable hard disk, a read only memory, a random access memory, a magnetic disk, or an optical disk, and the like, which can store program codes.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。
It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not limited thereto; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that The technical solutions described in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; and the modifications or substitutions do not deviate from the technical scope of the embodiments of the present invention.
Claims (20)
- 一种测试点的创建方法,其特征在于,模拟器包含功能模拟器,性能模拟器和管理器,所述方法包括:A method for creating a test point, characterized in that the simulator comprises a function simulator, a performance simulator and a manager, the method comprising:管理器在第一时间读取进程号寄存器记录的T1进程号,并确定所述T1进程号指示的进程用于执行所述测试程序,其中,所述进程号寄存器中保存有功能模拟器正在运行的进程的进程号;The manager reads the T1 process number recorded by the process number register at the first time, and determines that the process indicated by the T1 process number is used to execute the test program, wherein the function simulator is saved in the process number register. Process number of the process;所述管理器将所述功能模拟器运行后的至少一个指令块发送给所述性能模拟器执行;Transmitting, by the manager, at least one instruction block after the function simulator is executed to the performance simulator;所述管理器在第二时间读取所述进程号寄存器记录的T2进程号,并确定所述T2进程号指示的进程用于执行所述测试程序;The manager reads the T2 process number recorded by the process number register at a second time, and determines that the process indicated by the T2 process number is used to execute the test program;所述管理器创建测试点,并记录测试点数据,其中所述测试点数据包含所述功能模拟器的快照和所述性能模拟器的状态信息。The manager creates a test point and records test point data, wherein the test point data includes a snapshot of the function simulator and status information of the performance simulator.
- 根据权利要求1所述的方法,其特征在于,在所述第一时间之前,所述方法还包括:The method of claim 1, wherein before the first time, the method further comprises:所述管理器在首次检测到所述功能模拟器执行所述测试程序时,读取并记录所述进程号寄存器记录的根进程号,执行所述测试程序的进程为所述根进程号指示的根进程或所述根进程的后代进程;The manager reads and records the root process number recorded by the process number register when the function simulator executes the test program for the first time, and the process of executing the test program is indicated by the root process number. The root process or the descendant process of the root process;所述管理器确定所述T1进程号指示的进程用于执行所述测试程序包括:所述管理器根据所述根进程号和所述功能模拟器维护的进程间关系,确定所述T1进程号指示的进程用于执行所述测试程序;Determining, by the manager, that the process indicated by the T1 process number is used to execute the test program comprises: determining, by the manager, the T1 process number according to the root process ID and an interprocess relationship maintained by the function simulator The indicated process is used to execute the test program;所述管理器确定所述T2进程号指示的进程用于执行所述测试程序包括:所述管理器根据所述根进程号和所述功能模拟器维护的进程间关系,确定所述T2进程号指示的进程用于执行所述测试程序。Determining, by the manager, that the process indicated by the T2 process number is used to execute the test program comprises: determining, by the manager, the T2 process ID according to the root process number and an interprocess relationship maintained by the function simulator The indicated process is used to execute the test procedure.
- 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, wherein the method further comprises:所述管理器根据所述根进程号和所述功能模拟器维护的进程间关系,确定测试程序进程号集合,所述测试程序进程号集合包含用于执行所述测试程序的进程的进程号;Determining, by the manager, a test program process number set according to the root process number and an interprocess relationship maintained by the function simulator, where the test program process number set includes a process number of a process for executing the test program;所述管理器确定所述T1进程号指示的进程用于执行所述测试程序包括:所述管理器确定所述T1进程号或所述T1进程号的父进程号属于所述测试程序进程号集合; Determining, by the manager, that the process indicated by the T1 process number is used to execute the test program comprises: the manager determining that the T1 process number or the parent process number of the T1 process number belongs to the test program process number set ;所述管理器确定所述T2进程号指示的进程用于执行所述测试程序包括:所述管理器确定所述T2进程号或所述T2进程号的父进程号属于所述测试程序进程号集合。Determining, by the manager, that the process indicated by the T2 process number is used to execute the test program comprises: the manager determining that the T2 process number or the parent process number of the T2 process number belongs to the test program process number set .
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:The method of claim 3, wherein the method further comprises:若所述T1进程号不属于所述测试程序进程号集合,所述管理器将所述T1进程号加入所述测试程序进程号集合;If the T1 process number does not belong to the test program process number set, the manager adds the T1 process number to the test program process number set;若所述T2进程号不属于所述测试程序进程号集合,所述管理器将所述T2进程号加入所述测试程序进程号集合。If the T2 process number does not belong to the test program process number set, the manager adds the T2 process number to the test program process number set.
- 根据权利要求2-4任一项所述的方法,其特征在于,所述测试程序包含指示指令;The method according to any one of claims 2 to 4, wherein the test program includes an instruction instruction;所述管理器在首次检测到所述功能模拟器执行所述测试程序时,读取并记录所述进程号寄存器记录的根进程号包括:When the manager first detects that the function simulator executes the test program, reading and recording the root process number recorded by the process number register includes:所述管理器在检测到所述指示指令后,读取所述进程号寄存器,并记录所述进程号寄存器记录的根进程号。After detecting the indication instruction, the manager reads the process number register and records the root process number recorded by the process number register.
- 根据权利要求2-5任一项所述的方法,其特征在于,所述功能模拟器维护的进程间关系为所述功能模拟器上运行的操作系统中的proc目录,所述proc目录记录有每一个线程与所述每一个线程的父进程之间的关系。The method according to any one of claims 2 to 5, wherein the inter-process relationship maintained by the function simulator is a proc directory in an operating system running on the function simulator, and the proc directory records The relationship between each thread and the parent process of each of the threads.
- 一种测试点的创建装置,其特征在于,模拟器包含功能模拟器和性能模拟器,所述装置包括:A device for creating a test point, characterized in that the simulator comprises a function simulator and a performance simulator, the device comprising:读取单元,用于在第一时间读取进程号寄存器记录的T1进程号,其中,所述进程号寄存器中保存有功能模拟器正在运行的进程的进程号;a reading unit, configured to read a T1 process number recorded by the process number register at a first time, where the process number register stores a process number of a process that the function simulator is running;确定单元:用于确定所述T1进程号指示的进程用于执行所述测试程序;Determining unit: a process for determining the T1 process number indication is used to execute the test procedure;调度单元,用于将所述功能模拟器运行后的至少一个指令块发送给所述性能模拟器执行;a scheduling unit, configured to send at least one instruction block after the function simulator is executed to the performance simulator to execute;所述读取单元还用于在第二时间读取所述进程号寄存器记录的T2进程号;The reading unit is further configured to read the T2 process number recorded by the process number register at a second time;所述确定单元还用于确定所述T2进程号指示的进程用于执行所述测试程序;The determining unit is further configured to determine that the process indicated by the T2 process number is used to execute the test procedure;创建单元,用于创建测试点,并记录测试点数据,其中所述测试点数据包含所述功能模拟器的快照和所述性能模拟器的状态信息。Creating a unit for creating a test point and recording test point data, wherein the test point data includes a snapshot of the function simulator and status information of the performance simulator.
- 根据权利要求7所述的装置,其特征在于,在所述第一时间之前,所 述读取单元还用于在首次检测到所述功能模拟器执行所述测试程序时,读取并记录所述进程号寄存器记录的根进程号,执行所述测试程序的进程为所述根进程号指示的根进程或所述根进程的后代进程;The apparatus of claim 7 wherein prior to said first time The reading unit is further configured to read and record the root process number of the process number register record when the function simulator is first detected to execute the test program, and the process of executing the test program is the root process The root process indicated by the number or the descendant process of the root process;所述确定单元用于确定所述T1进程号指示的进程用于执行所述测试程序包括:所述确定单元用于根据所述根进程号和所述功能模拟器维护的进程间关系,确定所述T1进程号指示的进程用于执行所述测试程序;The determining unit is configured to determine that the process indicated by the T1 process number is used to execute the test procedure, and the determining unit is configured to determine, according to the root process ID and an interprocess relationship maintained by the function simulator, The process indicated by the T1 process number is used to execute the test procedure;所述确定单元用于确定所述T2进程号指示的进程用于执行所述测试程序包括:所述确定单元用于根据所述根进程号和所述功能模拟器维护的进程间关系,确定所述T2进程号指示的进程用于执行所述测试程序。The determining unit is configured to determine that the process indicated by the T2 process number is used to execute the test procedure, and the determining unit is configured to determine, according to the root process ID and an interprocess relationship maintained by the function simulator, The process indicated by the T2 process number is used to execute the test procedure.
- 根据权利要求8所述的装置,其特征在于,所述确定单元还用于根据所述根进程号和所述功能模拟器维护的进程间关系,确定测试程序进程号集合,所述测试程序进程号集合包含用于执行所述测试程序的进程的进程号;The apparatus according to claim 8, wherein the determining unit is further configured to determine a test program process number set according to the root process number and an interprocess relationship maintained by the function simulator, the test program process The number set contains the process number of the process used to execute the test program;所述确定单元用于确定所述T1进程号指示的进程用于执行所述测试程序包括:所述确定单元用于确定所述T1进程号或所述T1进程号的父进程号属于所述测试程序进程号集合;The determining unit is configured to determine that the process indicated by the T1 process number is used to execute the test procedure, and the determining unit is configured to determine that the T1 process number or the parent process number of the T1 process number belongs to the test Program process number set;所述确定单元用于确定所述T2进程号指示的进程用于执行所述测试程序包括:所述确定单元用于确定所述T2进程号或所述T2进程号的父进程号属于所述测试程序进程号集合。The determining unit is configured to determine that the process indicated by the T2 process number is used to execute the test procedure, and the determining unit is configured to determine that the T2 process number or the parent process number of the T2 process number belongs to the test Program process number collection.
- 根据权利要求9所述的装置,其特征在于,若所述T1进程号不属于所述测试程序进程号集合,所述确定单元还用于将所述T1进程号加入所述测试程序进程号集合;The apparatus according to claim 9, wherein the determining unit is further configured to add the T1 process number to the test program process number set if the T1 process number does not belong to the test program process number set. ;若所述T2进程号不属于所述测试程序进程号集合,所述确定单元还用于将所述T2进程号加入所述测试程序进程号集合。And if the T2 process number does not belong to the test program process number set, the determining unit is further configured to add the T2 process ID to the test program process number set.
- 根据权利要求8-10任一项所述的装置,其特征在于,所述测试程序包含指示指令;The apparatus according to any one of claims 8 to 10, wherein the test program includes an instruction instruction;所述读取单元用于在首次检测到所述功能模拟器执行所述测试程序时,读取并记录所述进程号寄存器记录的根进程号包括:The reading unit is configured to read and record the root process number of the process number register record when the function simulator is first detected to execute the test program, including:所述读取单元用于在检测到所述指示指令后,读取所述进程号寄存器,并记录所述进程号寄存器记录的根进程号。The reading unit is configured to read the process number register after detecting the indication instruction, and record a root process number recorded by the process number register.
- 根据权利要求8-11任一项所述的装置,其特征在于,所述功能模拟器维护的进程间关系为所述功能模拟器上运行的操作系统中的proc目录,所 述proc目录记录有每一个线程与所述每一个线程的父进程之间的关系。The apparatus according to any one of claims 8 to 11, wherein the inter-process relationship maintained by the function simulator is a proc directory in an operating system running on the function simulator. The proc directory records the relationship between each thread and the parent process of each of the threads.
- 一种测试点的创建系统,其特征在于,所述系统包括功能模拟器,管理器和性能模拟器,所述功能模拟器用于处理器的功能模拟,所述性能模拟器用于处理器的性能模拟,所述管理器用于在第一时间读取进程号寄存器记录的T1进程号,并确定所述T1进程号指示的进程用于执行所述测试程序,其中,所述进程号寄存器中保存有功能模拟器正在运行的进程的进程号,将所述功能模拟器运行后的至少一个指令块发送给所述性能模拟器执行,在第二时间读取所述进程号寄存器记录的T2进程号,并确定所述T2进程号指示的进程用于执行所述测试程序,创建测试点,并记录测试点数据,其中所述测试点数据包含所述功能模拟器的快照和所述性能模拟器的状态信息。A test point creation system, characterized in that the system comprises a function simulator, a manager and a performance simulator, the function simulator is used for functional simulation of the processor, and the performance simulator is used for performance simulation of the processor The manager is configured to read the T1 process number recorded by the process number register at a first time, and determine that the process indicated by the T1 process number is used to execute the test program, where the process number register stores a function a process number of a process that the simulator is running, sending at least one instruction block after the function simulator is executed to the performance simulator, and reading the T2 process number recorded by the process number register at a second time, and Determining that the process indicated by the T2 process number is used to execute the test program, create a test point, and record test point data, wherein the test point data includes a snapshot of the function simulator and status information of the performance simulator .
- 根据权利要求13所述的系统,其特征在于,在所述第一时间之前,所述管理器还用于在首次检测到所述功能模拟器执行所述测试程序时,读取并记录所述进程号寄存器记录的根进程号,执行所述测试程序的进程为所述根进程号指示的根进程或所述根进程的后代进程;The system according to claim 13, wherein said manager is further configured to read and record said first time when said function simulator executes said test program before said first time The root process number recorded by the process number register, and the process executing the test program is the root process indicated by the root process number or a descendant process of the root process;所述管理器用于根据所述根进程号和所述功能模拟器维护的进程间关系,确定所述T1进程号指示的进程用于执行所述测试程序;The manager is configured to determine, according to the root process ID and an inter-process relationship maintained by the function simulator, that the process indicated by the T1 process number is used to execute the test procedure;所述管理器用于根据所述根进程号和所述功能模拟器维护的进程间关系,确定所述T2进程号指示的进程用于执行所述测试程序。The manager is configured to determine, according to the root process ID and an inter-process relationship maintained by the function simulator, that the process indicated by the T2 process number is used to execute the test procedure.
- 根据权利要求14所述的系统,其特征在于,所述管理器还用于根据所述根进程号和所述功能模拟器维护的进程间关系,确定测试程序进程号集合,所述测试程序进程号集合包含用于执行所述测试程序的进程的进程号;The system according to claim 14, wherein the manager is further configured to determine a test program process number set according to the root process number and an interprocess relationship maintained by the function simulator, the test program process The number set contains the process number of the process used to execute the test program;所述管理器用于确定所述T1进程号指示的进程用于执行所述测试程序包括:所述管理器用于确定所述T1进程号或所述T1进程号的父进程号属于所述测试程序进程号集合;The determining, by the manager, that the process indicated by the T1 process number is used to execute the test program includes: determining, by the manager, that the T1 process number or the parent process number of the T1 process number belongs to the test program process Number set所述管理器用于确定所述T2进程号指示的进程用于执行所述测试程序包括:所述管理器用于确定所述T2进程号或所述T2进程号的父进程号属于所述测试程序进程号集合。The determining, by the manager, that the process indicated by the T2 process number is used to execute the test program includes: determining, by the manager, that the T2 process number or the parent process number of the T2 process number belongs to the test program process Number collection.
- 根据权利要求15所述的系统,其特征在于,若所述T1进程号不属于所述测试程序进程号集合,所述管理器还用于将所述T1进程号加入所述测试程序进程号集合;The system according to claim 15, wherein said manager is further configured to add said T1 process number to said test program process number set if said T1 process number does not belong to said test program process number set ;若所述T2进程号不属于所述测试程序进程号集合,所述管理器还用于将 所述T2进程号加入所述测试程序进程号集合。If the T2 process number does not belong to the test program process number set, the manager is further used to The T2 process number is added to the test program process number set.
- 根据权利要求14-16任一项所述的系统,其特征在于,所述测试程序包含指示指令;A system according to any one of claims 14-16, wherein said test program comprises an instruction instruction;所述管理器用于在检测到所述指示指令后,读取所述进程号寄存器,并记录所述进程号寄存器记录的根进程号。The manager is configured to read the process number register after detecting the indication instruction, and record a root process number recorded by the process number register.
- 根据权利要求14-17任一项所述的系统,其特征在于,所述功能模拟器维护的进程间关系为所述功能模拟器上运行的操作系统中的proc目录,所述proc目录记录有每一个线程与所述每一个线程的父进程之间的关系。The system according to any one of claims 14-17, wherein the inter-process relationship maintained by the function simulator is a proc directory in an operating system running on the function simulator, the proc directory record The relationship between each thread and the parent process of each of the threads.
- 一种可读介质,其特征在于,包括执行指令,当计算设备的处理器执行所述执行指令时,所述计算设备执行权利要求1-6任一项所述的方法。A readable medium, comprising executing instructions that, when executed by a processor of a computing device, perform the method of any of claims 1-6.
- 一种计算设备,其特征在于,包括:处理器、存储器和总线;A computing device, comprising: a processor, a memory, and a bus;所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述计算设备执行权利要求1-6任一项所述的方法。 The memory is configured to store execution instructions, the processor is coupled to the memory via the bus, and when the computing device is running, the processor executes the execution instructions stored by the memory to cause the The computing device performs the method of any of claims 1-6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201680080529.6A CN108604205B (en) | 2016-12-08 | 2016-12-08 | Test point creating method, device and system |
PCT/CN2016/109053 WO2018103045A1 (en) | 2016-12-08 | 2016-12-08 | Checkpoint creation method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2016/109053 WO2018103045A1 (en) | 2016-12-08 | 2016-12-08 | Checkpoint creation method, device and system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018103045A1 true WO2018103045A1 (en) | 2018-06-14 |
Family
ID=62490622
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/109053 WO2018103045A1 (en) | 2016-12-08 | 2016-12-08 | Checkpoint creation method, device and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108604205B (en) |
WO (1) | WO2018103045A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070168967A1 (en) * | 2005-10-27 | 2007-07-19 | Business Machines Corporation | Method and computer program product for testing a software application |
CN101526915A (en) * | 2009-04-28 | 2009-09-09 | 中国人民解放军国防科学技术大学 | Method for supporting parallel input and output (I/O) of trace files in parallel simulation |
CN101539863A (en) * | 2009-04-29 | 2009-09-23 | 哈尔滨工程大学 | Task key system survival emergency recovery method based on quaternary nested restart |
CN104216776A (en) * | 2014-08-25 | 2014-12-17 | 成都三零凯天通信实业有限公司 | Quick starting method for Android operating system based on BLCR (Berkeley lab checkpoint restart) technology |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4740969A (en) * | 1986-06-27 | 1988-04-26 | Hewlett-Packard Company | Method and apparatus for recovering from hardware faults |
JP3085899B2 (en) * | 1995-06-19 | 2000-09-11 | 株式会社東芝 | Multiprocessor system |
JP3258228B2 (en) * | 1996-03-15 | 2002-02-18 | 株式会社東芝 | Checkpoint generation method |
US20040064300A1 (en) * | 2002-09-26 | 2004-04-01 | Mathiske Bernd J.W. | Method and apparatus for starting simulation of a computer system from a process checkpoint within a simulator |
JP2016167212A (en) * | 2015-03-10 | 2016-09-15 | 日本電気株式会社 | Information processing system, checkpoint data collection method and checkpoint data collection program |
-
2016
- 2016-12-08 WO PCT/CN2016/109053 patent/WO2018103045A1/en active Application Filing
- 2016-12-08 CN CN201680080529.6A patent/CN108604205B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070168967A1 (en) * | 2005-10-27 | 2007-07-19 | Business Machines Corporation | Method and computer program product for testing a software application |
CN101526915A (en) * | 2009-04-28 | 2009-09-09 | 中国人民解放军国防科学技术大学 | Method for supporting parallel input and output (I/O) of trace files in parallel simulation |
CN101539863A (en) * | 2009-04-29 | 2009-09-23 | 哈尔滨工程大学 | Task key system survival emergency recovery method based on quaternary nested restart |
CN104216776A (en) * | 2014-08-25 | 2014-12-17 | 成都三零凯天通信实业有限公司 | Quick starting method for Android operating system based on BLCR (Berkeley lab checkpoint restart) technology |
Also Published As
Publication number | Publication date |
---|---|
CN108604205B (en) | 2021-02-12 |
CN108604205A (en) | 2018-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8180620B2 (en) | Apparatus and method for performing hardware and software co-verification testing | |
US9152540B2 (en) | System and methods for generating and managing a virtual device | |
US8495344B2 (en) | Simultaneous execution resumption of multiple processor cores after core state information dump to facilitate debugging via multi-core processor simulator using the state information | |
CN117422026B (en) | RISC-V architecture-based processor verification system | |
US9483374B2 (en) | PSMI using at-speed scan capture | |
US10095611B1 (en) | Methodology for unit test and regression framework | |
US9262299B1 (en) | Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system | |
TWI544410B (en) | Perform a single step for code diagnosis | |
CN101901177B (en) | Multi-core Microprocessor and Its Debugging Method | |
US9262305B1 (en) | Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system | |
CN104750603A (en) | Multi-core DSP (Digital Signal Processor) software emulator and physical layer software testing method thereof | |
JP6959995B2 (en) | Generation and validation of hardware instruction traces containing memory data contents | |
US20120029900A1 (en) | Simulation method and system for simulating a multi-core hardware platform | |
Engblom et al. | Full-system simulation from embedded to high-performance systems | |
US9218273B2 (en) | Automatic generation of a resource reconfiguring test | |
Poss et al. | MGSim—A simulation environment for multi-core research and education | |
CN107783817A (en) | Analogy method, functional simulator, behavioral simulator and the simulation system of processor | |
Jünger et al. | ARM-on-ARM: leveraging virtualization extensions for fast virtual platforms | |
WO2018103045A1 (en) | Checkpoint creation method, device and system | |
CN115732025A (en) | Method and device for verifying RAM access conflict | |
US10339229B1 (en) | Simulation observability and control of all hardware and software components of a virtual platform model of an electronics system | |
US20190042390A1 (en) | Focused execution of traced code in a debugger | |
US20180011956A1 (en) | Data Injection In Emulation Without Rebooting | |
van der Wijst | An Accelerator based on the ρ-VEX Processor: an Exploration using OpenCL | |
Lebedev et al. | Test environment for verification of multi-processor interrupt system with virtualization support |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16923469 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16923469 Country of ref document: EP Kind code of ref document: A1 |