Processor micro-architecture analysis method and device, electronic equipment and program product

By determining the processor microarchitecture analysis target and feature information collection rules, collecting and processor microarchitecture feature information, and generating analysis results, the problem of the lack of general analysis tools in the existing technology is solved, and effective analysis of different processor microarchitectures is achieved. Analysis and optimization.

CN118796635APending Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410537957.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology lacks general analysis tools suitable for various processor microarchitectures, and cannot effectively obtain feature information and generate microarchitecture analysis results, resulting in the inability to optimize for specific analysis purposes.

Method used

Provides a processor microarchitecture analysis method that determines and analyzes the target processor and its feature information collection rules, receives and processes the microarchitecture feature information, and generates microarchitecture analysis results, including setting a counter to collect specific events and reading the count as a feature Information,applicable to different processor microarchitectures.

Benefits of technology

It realizes the collection and analysis of characteristic information of different processor microarchitectures, can optimize computing units and branch predictions, is suitable for a variety of processor microarchitectures, and provides universal analysis and optimization methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796635A_ABST
    Figure CN118796635A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly provides a processor micro-architecture analysis method and device, electronic equipment and a program product. The processor micro-architecture analysis method comprises the following steps: determining a processor micro-architecture analysis target, and determining an analysis target object target processor and a feature information acquisition rule thereof based on the processor micro-architecture analysis target; receiving processor micro-architecture feature information collected from the analysis target processor based on a feature information collection rule; based on the processor micro-architecture feature information, a micro-architecture analysis result of an analysis target processor is generated, and the analysis target processor comprises processors under one or more micro-architectures. According to the processor micro-architecture analysis method disclosed by the invention, the feature information of different processor micro-architectures is acquired through the general acquisition unit, and analysis and optimization of different processor micro-architectures based on the feature information of the processor micro-architectures are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a processor microarchitecture analysis method, device, electronic device and program product. Background Art

[0002] In the instruction set of a computer processor, performance monitoring tools are defined, such as basic counters, optional counters, and extensible counters. These counters can be used to collect various statistical information about the processor and memory, and use this information to debug programs or analyze and optimize program codes.

[0003] Computer processors mainly include processor microarchitectures such as X86, ARM, and RISC-V. Currently, there is a lack of general analysis tools that can be applied to various processor microarchitectures, as well as means to obtain corresponding feature information and generate microarchitecture analysis results for specific analysis purposes. Summary of the invention

[0004] The present disclosure is proposed in view of the above problems. The present disclosure provides a processor microarchitecture analysis method, device, electronic device and computer program product.

[0005] According to one aspect of the present disclosure, a processor microarchitecture analysis method is provided, including: determining a processor microarchitecture analysis target; determining an analysis target processor and its feature information collection rules based on the processor microarchitecture analysis target; receiving processor microarchitecture feature information collected from the analysis target processor based on the feature information collection rules; and generating a microarchitecture analysis result of the analysis target processor based on the processor microarchitecture feature information, wherein the analysis target processor includes processors under one or more microarchitectures.

[0006] In addition, according to one aspect of the present disclosure, a processor microarchitecture analysis method receives processor microarchitecture feature information collected from an analysis target processor based on feature information collection rules, including: sending the feature information collection rules to a collection unit; and receiving processor microarchitecture feature information collected from the analysis target processor from the collection unit.

[0007] In addition, according to an aspect of the processor microarchitecture analysis method of the present disclosure, processor microarchitecture feature information collected from an analysis target processor is received from a collection unit, including: determining one or more collection events based on feature information collection rules; setting one or more counters corresponding to the one or more collection events; and receiving counts of the one or more counters from the collection unit as processor microarchitecture feature information.

[0008] In addition, according to a processor microarchitecture analysis method according to one aspect of the present disclosure, the processor microarchitecture analysis target is computing unit optimization, and the feature information collection rules at least indicate the proportion of collecting multiple computing instructions as processor microarchitecture feature information. The method also includes: based on the microarchitecture analysis results of the analysis target processor, determining the proportion of each type of computing unit of the analysis target processor, and / or the type of computing unit that needs to be added.

[0009] In addition, according to a processor microarchitecture analysis method according to one aspect of the present disclosure, the processor microarchitecture analysis target is branch prediction optimization, and the characteristic information collection rules at least indicate the collection of branch prediction instruction ratio and branch prediction accuracy and error rate as processor microarchitecture characteristic information. The method also includes: based on the microarchitecture analysis results of the analysis target processor, determining a branch prediction optimization scheme for the analysis target processor.

[0010] In addition, according to an aspect of the processor microarchitecture analysis method of the present disclosure, the analysis target processor includes a first analysis target processor under a first processor microarchitecture and a second analysis target processor under a second processor microarchitecture, and receiving processor microarchitecture feature information collected from the analysis target processor based on feature information collection rules, including: receiving first processor microarchitecture feature information collected from the first analysis target processor based on the feature information collection rules, and receiving second processor microarchitecture feature information collected from the second analysis target processor based on the feature information collection rules, wherein the first processor microarchitecture feature information and the second processor microarchitecture feature information include the same processor features and different processor features.

[0011] According to another aspect of the present disclosure, a processor microarchitecture analysis device is provided, including an analysis unit and a collection unit, the analysis unit is configured to include a feature information collection rule determination subunit, configured to determine a processor microarchitecture analysis target, and based on the processor microarchitecture analysis target, determine an analysis target processor and its feature information collection rules; a feature information receiving subunit, configured to receive processor microarchitecture feature information collected from an analysis target processor based on the feature information collection rules; and a processor microarchitecture analysis subunit, configured to generate a microarchitecture analysis result of an analysis target processor based on the processor microarchitecture feature information, wherein the analysis target processor includes processors under one or more microarchitectures, and the collection unit is configured to collect processor microarchitecture feature information from the analysis target processor based on the feature information collection rules.

[0012] In addition, according to the processor microarchitecture analysis device of another aspect of the present disclosure, the feature information collection rule determination subunit is further configured to determine one or more collection events based on the feature information collection rules, and the collection unit is further configured to set one or more counters corresponding to the one or more collection events, and read the counts of the one or more counters as the processor microarchitecture feature information.

[0013] According to another aspect of the present disclosure, an electronic device is provided, including: a memory for storing computer-readable instructions; and a processor for executing the computer-readable instructions so that the electronic device executes the processor micro-architecture analysis method as described above.

[0014] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the processor micro-architecture analysis method as described above is implemented.

[0015] As will be described in detail below, according to the processor microarchitecture analysis method, device, electronic device and computer program product of the embodiments of the present disclosure, feature information of different processor microarchitectures is collected by a general collection unit to achieve analysis and optimization of different processor microarchitectures based on the processor microarchitecture feature information.

[0016] It is to be understood that both the foregoing general description and the following detailed description are exemplary, and are intended to provide further explanation of the technology as claimed. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0018] Figure 1 is a schematic diagram illustrating a scenario of applying a method for analyzing a processor micro-architecture according to an embodiment of the present disclosure.

[0019] Figure 2 is a flowchart illustrating a method for analyzing a processor microarchitecture according to an embodiment of the present disclosure.

[0020] Figure 3 It is a schematic diagram illustrating a general interactive process of a processor microarchitecture analysis method according to an embodiment of the present disclosure.

[0021] Figures 4 to 6 It is a schematic diagram further illustrating a specific interaction process of the processor microarchitecture analysis method according to an embodiment of the present disclosure.

[0022] Figure 7 is a block diagram illustrating a processor microarchitecture analysis device according to an embodiment of the present disclosure.

[0023] Figure 8 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure.

[0024] Fig. 9 is a schematic diagram illustrating a computer program product according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present disclosure more obvious, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.

[0026] First, refer to Figure 1 The following describes a scenario in which the processor microarchitecture analysis method according to an embodiment of the present disclosure is applied. Figure 1 As shown, servers 11, 12, 13 and 14 are respectively configured with processors 112, 122, 132 and 142. Processors 112, 122, 132 and 142 can be processors under processor micro-architectures such as X86, ARM, RISC-V, etc. In addition, general acquisition units 111, 121, 131 and 141 are respectively configured for processors 112, 122, 132 and 142. Acquisition units 111, 121, 131 and 141 respectively collect corresponding processor micro-architecture feature information from processors 112, 122, 132 and 142. Analysis unit 10 can generate micro-architecture analysis results of processors 112, 122, 132 and 142 as corresponding analysis target processors based on the corresponding processor micro-architecture feature information collected from processors 112, 122, 132 and 142.

[0027] Hereinafter, the processor micro-architecture analysis method according to the embodiment of the present disclosure implemented by the analysis unit 10 and the acquisition units 111 , 121 , 131 and 141 will be further described with reference to the flowchart and the interactive process schematic diagram.

[0028] Figure 2 FIG. 1 is a flowchart illustrating a method for analyzing a processor microarchitecture according to an embodiment of the present disclosure. Figure 2 As shown, the processor microarchitecture analysis method according to the embodiment of the present disclosure includes the following steps.

[0029] In step S201, a processor micro-architecture analysis target is determined, and an analysis target processor and information collection rules thereof are determined based on the processor micro-architecture analysis target.

[0030] In an embodiment of the present disclosure, in response to an analysis request, a processor microarchitecture analysis target is determined, and an analysis target processor as an analysis target is further determined based on the processor microarchitecture analysis target. Figure 1 In the illustrated scenario, one or more of the processors 112 , 122 , 132 , and 142 may serve as analysis target processors.

[0031] Further, determine the information collection rules for the target processor for analysis. For example, processor 112 is determined as the target processor for analysis, and processor 112 is a processor under the RISC-V microarchitecture. The information collection rules may be one or more information collection events defined for processor 112 under the RISC-V microarchitecture, and counters corresponding to the one or more information collection events are set. For example, define collection events 1 to 6 and their corresponding counters 1 to 6, respectively. Start collection events 1 to 6, and initialize counters 1 to 6 at the same time. The information collection rules may also specify specific interrupt events, such as the completion of a specific process. When the defined specific process is completed, stop the collection.

[0032] In step S202, processor micro-architecture feature information collected from an analysis target processor based on information collection rules is received.

[0033] In an embodiment of the present disclosure, the characteristic information collection rule determined in step S201 is sent to the collection unit 111 configured for the processor 112. Further, the processor microarchitecture characteristic information (e.g., the counting results of counters 1 to 6 in this embodiment) collected from the analysis target processor (e.g., the processor 112 in this embodiment) by the receiving collection unit 111 based on the information collection rule is received.

[0034] In step S203, based on the processor micro-architecture feature information, a micro-architecture analysis result of the target processor is determined.

[0035] As will be further described below with reference to the interactive process diagram, the microarchitecture analysis results of the target processor may include, for example, whether to optimize the computing unit, the emission width, the branch prediction, the cache structure, the decoding width, the emission queue width, the rename queue, etc.

[0036] Figure 3 The diagram illustrates a general interactive process of a processor microarchitecture analysis method according to an embodiment of the present disclosure.

[0037] In 301, processor microarchitecture analysis targets are set. As described above, the processor microarchitecture analysis targets may be analysis targets corresponding to processors under different processor microarchitectures, such as computing units, issue width, branch prediction, cache structure, decoding width, issue queue width, rename queue, etc.

[0038] In 302, the analysis unit 30 determines the analysis target processor and its characteristic information collection rules. As described above, the analysis target processor is, for example, one or more of the processors 112, 122, 132, and 142.

[0039] In 303, feature information collection processing is initiated.

[0040] In 304 , the collection unit 40 parses the characteristic information collection rule into a corresponding reading operation.

[0041] In 305, counters corresponding to the acquisition events and corresponding reading operations are set. For example, acquisition events 1 to 6 and their corresponding counters 1 to 6 are defined. Acquisition events 1 to 6 are started, and counters 1 to 6 are initialized. The information acquisition rule can also specify a specific interrupt event, such as the completion of a specific process. When the defined specific process is completed, the acquisition is stopped.

[0042] In 306 , the collection result is returned from the corresponding counter of the analysis target processor 50 .

[0043] In 307 , the collection unit 40 returns the collection result to the analysis unit 30 .

[0044] In 308 , the analysis unit 30 generates a micro-architecture analysis result of the analysis target processor based on the processor micro-architecture feature information as the collection result.

[0045] Figure 4 The figure illustrates a specific interactive process of the processor microarchitecture analysis method according to an embodiment of the present disclosure.

[0046] In 401, a processor microarchitecture analysis target is set. Figure 4 In the example, the processor microarchitecture analysis specifically targets whether a computing unit of a processor of a specific processor microarchitecture needs to be optimized.

[0047] In 402, the analysis unit 30 determines the analysis target processor and its characteristic information collection rule. As described above, the analysis target processor is, for example, one or more of the processors 112, 122, 132, and 142. Its characteristic information collection rule is to collect at least the proportion of multiple computing instructions, and the multiple computing instructions are, for example, integer addition, subtraction, multiplication, and division computing instructions, floating point addition, subtraction, multiplication, and division computing instructions, vector computing instructions, etc.

[0048] In 403, feature information collection processing is initiated.

[0049] In 404 , the collection unit 40 parses the characteristic information collection rule into a corresponding reading operation.

[0050] In 405, counters corresponding to the acquisition events and corresponding reading operations are set. For example, acquisition events 1 to m and their corresponding counters 1 to m are defined, and the acquisition events 1 to m are, for example, m different calculation instructions. The acquisition events 1 to m are started, and the counters 1 to m are initialized at the same time. The information acquisition rules can also specify specific interrupt events, such as the completion of a specific process. When the defined specific process is completed, the acquisition is stopped.

[0051] In 406 , the collection result is returned from the corresponding counter of the analysis target processor 50 .

[0052] In 407 , the collection unit 40 returns the collection result to the analysis unit 30 .

[0053] In 408, the analysis unit 30 generates a micro-architecture analysis result of the target processor based on the processor micro-architecture feature information as the collection result. Figure 4 In the example, the ratio of different types of computing units and / or the type of computing units that need to be added can be adjusted according to the processor microarchitecture feature information (ie, the count values ​​of the counters corresponding to different types of computing instructions).

[0054] Figure 5 The figure illustrates a specific interactive process of the processor microarchitecture analysis method according to an embodiment of the present disclosure.

[0055] In 501, a processor microarchitecture analysis target is set. Figure 5 In the example, the processor microarchitecture analysis target is specifically whether the branch prediction of the processor of the specific processor microarchitecture needs to be optimized.

[0056] In 502, the analysis unit 30 determines the analysis target processor and its characteristic information collection rules. As described above, the analysis target processor is, for example, one or more of the processors 112, 122, 132, and 142. Its characteristic information collection rules are to collect at least the branch prediction instruction ratio and the branch prediction accuracy and error rate.

[0057] In 503, feature information collection processing is initiated.

[0058] In 504 , the collection unit 40 parses the characteristic information collection rule into a corresponding reading operation.

[0059] In 505, counters corresponding to the acquisition events and corresponding reading operations are set. For example, acquisition events 1 to n and their corresponding counters 1 to n are defined, and acquisition events 1 to n are, for example, branch prediction instructions. Acquisition events 1 to n are started, and counters 1 to n are initialized at the same time. The information acquisition rule can also specify specific interrupt events, such as the completion of a specific process. When the defined specific process is completed, the acquisition is stopped.

[0060] In 506 , the collection result is returned from the corresponding counter of the analysis target processor 50 .

[0061] In 507 , the collection unit 40 returns the collection result to the analysis unit 30 .

[0062] In 508, the analysis unit 30 generates a micro-architecture analysis result of the target processor based on the processor micro-architecture feature information as the collection result. Figure 5 In the example of , branch prediction can be optimized based on the processor microarchitecture feature information (ie, the count value of the counter corresponding to the branch prediction instruction).

[0063] Figure 6 The figure illustrates a specific interactive process of the processor microarchitecture analysis method according to an embodiment of the present disclosure.

[0064] In 601, a processor microarchitecture analysis target is set. Figure 6 In the example, the processor microarchitecture analysis target is specifically processor microarchitecture feature information of two processors with different processor microarchitectures for the same application.

[0065] In 602, the analysis unit 30 determines the first analysis target processor 50 and the second analysis target processor 60 and their characteristic information collection rules. As described above, the first analysis target processor 50 and the second analysis target processor 60 are, for example, processors belonging to different processor microarchitectures among the processors 112, 122, 132 and 142, the first analysis target processor 50 is an ARM processor microarchitecture, and the second analysis target processor 60 is a RISC-V processor microarchitecture. Its characteristic information collection rule is to collect cache access information.

[0066] In 603, feature information collection processing is initiated.

[0067] In 604 , the collection unit 40 parses the characteristic information collection rule into a corresponding reading operation.

[0068] In 605, counters corresponding to the acquisition events and corresponding read operations are set for the first analysis target processor 50. For example, acquisition events 1 to x and their corresponding counters 1 to x are defined, and acquisition events 1 to x are, for example, the number of instruction cache hit failures, the number of L2 data cache read hit failures, the number of L2 instruction cache hit failures, the number of L3 data cache read hit failures, the number of L1 data cache read hit failures, the number of L2 data cache access hit failures, and the number of L3 data cache access hit failures. Start acquisition events 1 to x and initialize counters 1 to x at the same time. The information acquisition rules can also specify specific interrupt events, such as the completion of a specific process. When the defined specific process is completed, the acquisition is stopped.

[0069] In 606, counters corresponding to the acquisition events and corresponding read operations are set for the second analysis target processor 60. For example, acquisition events 1 to y and their corresponding counters 1 to y are defined, and acquisition events 1 to y are, for example, the number of L1 instruction cache hit failures, the number of L1 instruction cache accesses, the number of L1 data cache hit failures, the number of L1 data cache accesses, the number of L2 cache hit failures, the number of L2 cache accesses, the number of L3 cache hit failures, and the number of L3 cache accesses. Start acquisition events 1 to y and initialize counters 1 to y at the same time. The information acquisition rules can also specify specific interrupt events, such as the completion of a specific process. When the defined specific process is completed, the acquisition is stopped.

[0070] In 607 , the collection result is returned from the corresponding counter of the first analysis target processor 50 .

[0071] In 608 , the collection result is returned from the corresponding counter of the second analysis target processor 60 .

[0072] In 609 , the collection unit 40 returns the collection result to the analysis unit 30 .

[0073] In 610, the analysis unit 30 generates a micro-architecture analysis result of the target processor based on the processor micro-architecture feature information as the collection result. Figure 6 In the example, the common features and different features of processors under different processor microarchitectures running the same application can be analyzed based on the processor microarchitecture feature information.

[0074] Figure 7 is a block diagram illustrating a processor microarchitecture analysis device according to an embodiment of the present disclosure.

[0075] like Figure 7 As shown, the processor microarchitecture analysis device 700 according to the embodiment of the present disclosure includes an analysis unit 701 and a collection unit 702. Those skilled in the art will readily understand that these unit modules can be implemented in various ways by hardware alone, software alone, or a combination thereof, and the present disclosure is not limited to any of them.

[0076] Specifically, the analysis unit 701 is configured to include a feature information collection rule determination subunit 7011 , a feature information receiving subunit 7012 , and a processor micro-architecture analysis subunit 7013 .

[0077] The feature information collection rule determination subunit 7011 is configured to determine the analysis target processor and its feature information collection rules; the feature information receiving subunit 7012 is configured to receive processor microarchitecture feature information collected from the analysis target processor based on the feature information collection rules; and the processor microarchitecture analysis subunit 7013 is configured to generate a microarchitecture analysis result of the analysis target processor based on the processor microarchitecture feature information, wherein the analysis target processor includes processors under one or more microarchitectures.

[0078] The collection unit 702 is configured to collect processor micro-architecture feature information from the analysis target processor based on feature information collection rules.

[0079] The feature information collection rule determination sub-unit 7011 is further configured to determine one or more collection events based on the feature information collection rules, and the collection unit 702 is further configured to set one or more counters corresponding to the one or more collection events, and read the counts of the one or more counters as the processor microarchitecture feature information.

[0080] Figure 8 1 is a hardware block diagram of an electronic device 800 according to an embodiment of the present disclosure. The electronic device according to an embodiment of the present disclosure includes at least a processor; and a memory for storing computer-readable instructions. When the computer-readable instructions are loaded and executed by the processor, the processor executes the processor micro-architecture analysis method as described above.

[0081] Figure 8 The electronic device 800 shown specifically includes: a central processing unit (CPU) 801, a graphics processing unit (GPU) 802 and a main memory 803. These units are connected to each other via a bus 804. The central processing unit (CPU) 801 and / or the graphics processing unit (GPU) 802 can be used as the above-mentioned processor, and the main memory 803 can be used as the above-mentioned memory for storing computer-readable instructions. In addition, the electronic device 800 may also include a communication unit 805, a storage unit 806, an output unit 807, an input unit 808 and an external device 809, which are also connected to the bus 804.

[0082] Fig. 9 is a schematic diagram illustrating a computer program product according to an embodiment of the present disclosure. Fig. 9As shown, a computer program product 900 according to an embodiment of the present disclosure has computer-readable instructions 901 stored thereon. When the computer-readable instructions 901 are executed by a processor, the processor micro-architecture analysis method described with reference to the above figures is executed. The computer program product 900 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may, for example, include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may, for example, include a read-only memory (ROM), a hard disk, a flash memory, an optical disk, a magnetic disk, etc.

[0083] In the above, the processor microarchitecture analysis method, device, electronic device and computer program product according to the embodiments of the present disclosure are described with reference to the accompanying drawings. The characteristic information of different processor microarchitectures is collected by a universal collection unit to realize analysis and optimization of different processor microarchitectures based on the processor microarchitecture characteristic information.

[0084] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0085] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0086] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0087] Additionally, as used herein, "or" used in a list of items beginning with "at least one" indicates a separate list, so that, for example, a list of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the example described is preferred or better than other examples.

[0088] It should also be noted that in the system and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0089] Various changes, substitutions, and modifications of the techniques described herein may be made without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of the present disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and actions described above. Currently existing or later to be developed processes, machines, manufactures, compositions of events, means, methods, or actions that perform substantially the same functions or achieve substantially the same results as the corresponding aspects described herein may be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or actions within their scope.

[0090] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0091] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A processor microarchitecture analysis method, characterized in that: include: Determine a processor microarchitecture analysis target, and based on the processor microarchitecture analysis target, determine an analysis target processor and a characteristic information collection rule thereof; Receiving processor microarchitecture feature information collected from the analysis target processor based on the feature information collection rule; as well as Based on the processor microarchitecture feature information, a microarchitecture analysis result of the analysis target processor is generated, The analysis target processor includes processors under one or more micro-architectures.

2. The processor microarchitecture analysis method according to claim 1, characterized in that: The receiving the processor micro-architecture feature information collected from the analysis target processor based on the feature information collection rule includes: sending the characteristic information collection rule to a collection unit; and The processor micro-architecture feature information collected from the analysis target processor is received from the collection unit.

3. The processor microarchitecture analysis method according to claim 2, characterized in that: The receiving, from the collection unit, the processor micro-architecture feature information collected from the analysis target processor comprises: Based on the characteristic information collection rule, determining one or more collection events; Setting one or more counters corresponding to the one or more acquisition events; Counts of the one or more counters are received from the acquisition unit as the processor microarchitecture feature information.

4. The processor microarchitecture analysis method according to any one of claims 1 to 3, characterized in that: The processor microarchitecture analysis target is computing unit optimization, the feature information collection rule at least indicates the proportion of collecting multiple computing instructions as the processor microarchitecture feature information, and the method further includes: Based on the micro-architecture analysis result of the analysis target processor, the proportion of various types of computing units of the analysis target processor and / or the type of computing units that need to be added are determined.

5. The processor microarchitecture analysis method according to any one of claims 1 to 3, characterized in that: The processor microarchitecture analysis target is branch prediction optimization, the feature information collection rule at least indicates collecting branch prediction instruction ratio and branch prediction accuracy and error rate as the processor microarchitecture feature information, and the method further includes: Based on the microarchitecture analysis result of the analysis target processor, a branch prediction optimization scheme of the analysis target processor is determined.

6. The processor microarchitecture analysis method according to any one of claims 1 to 3, characterized in that: The analysis target processor includes a first analysis target processor under a first processor micro-architecture and a second analysis target processor under a second processor micro-architecture, The receiving the processor micro-architecture feature information collected from the analysis target processor based on the feature information collection rule includes: receiving first processor micro-architecture feature information collected from the first analysis target processor based on the feature information collection rule, and receiving second processor micro-architecture feature information collected from the second analysis target processor based on the feature information collection rule, The first processor micro-architecture feature information and the second processor micro-architecture feature information include same processor features and different processor features.

7. A processor microarchitecture analysis device, characterized in that: It includes an analysis unit and a collection unit. The analysis unit is configured to include A feature information collection rule determination subunit is configured to determine a processor microarchitecture analysis target, and determine an analysis target processor and its feature information collection rules based on the processor microarchitecture analysis target; a feature information receiving subunit, configured to receive processor microarchitecture feature information collected from the analysis target processor based on the feature information collection rule; as well as The processor micro-architecture analysis subunit is configured to generate a micro-architecture analysis result of the analysis target processor based on the processor micro-architecture feature information, wherein the analysis target processor includes processors under one or more micro-architectures, The collection unit is configured to collect processor microarchitecture feature information from the analysis target processor based on the feature information collection rule.

8. The processor micro-architecture analysis device according to claim 7, characterized in that: The characteristic information collection rule determination subunit is further configured to determine one or more collection events based on the characteristic information collection rule, and the collection unit is further configured to set one or more counters corresponding to the one or more collection events, and read the counts of the one or more counters as the processor microarchitecture characteristic information.

9. An electronic device, characterized in that: include: a memory for storing computer readable instructions; as well as A processor, configured to execute the computer-readable instructions so that the electronic device executes the processor microarchitecture analysis method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the processor microarchitecture analysis method according to any one of claims 1 to 6 is implemented.