Memory performance monitoring method and device, electronic equipment and storage medium
By classifying and grouping memory performance events into signal categories, the accuracy and resource utilization efficiency issues of memory performance monitoring in existing technologies are resolved, and accurate analysis of memory performance and resource optimization are achieved.
Patent Information
- Application Number
- CN202510749279.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-10-17
AI Technical Summary
Existing memory performance monitoring technologies are unable to accurately reflect the actual performance under complex access patterns, resulting in distorted bandwidth assessment and misjudgment of access latency. They also occupy a large amount of hardware resources and reduce system integration.
By collecting multiple performance events, dividing them into different signal categories based on physical signal characteristics, and assigning them to predefined event groups, statistical operations corresponding to the signal categories are performed, including event count accumulation, duration statistics, and numerical statistics, avoiding the need to set up independent statistical units for each monitoring event.
It improves the accuracy of memory performance monitoring and resource utilization efficiency, can accurately reflect the source of memory performance fluctuations, reduces the area occupied by the monitoring module, and improves the integration and effective utilization of hardware resources.
Smart Images

Figure CN120803837A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of performance monitoring, and in particular, to a memory performance monitoring method and device, electronic equipment, and storage medium. BACKGROUND
[0002] With the rapid development of artificial intelligence and high-performance computing technology, the scale of data processing continues to increase, and higher requirements are put forward for the monitoring of memory performance. The monitoring effect plays an important role in the efficiency improvement of the computing system.
[0003] In related memory performance monitoring technology, performance monitoring is usually realized by directly collecting basic commands of a memory interface. However, with the complication of memory access mode, this method is difficult to accurately reflect the real memory performance situation, which may lead to performance monitoring deviation problems such as bandwidth evaluation distortion and access delay misjudgment, and it is difficult to attribute performance fluctuations to specific events. In addition, related technology usually configures an independent statistical unit for each monitoring event. When there are many monitoring events, the monitoring module will occupy a large amount of hardware resources, resulting in a decrease in system integration.
[0004] Therefore, there is still room for improvement in the monitoring accuracy and resource utilization efficiency of related memory performance monitoring technology. SUMMARY
[0005] The purpose of the embodiments of the present disclosure is to provide a memory performance monitoring method, a memory performance monitoring device, electronic equipment, and a computer readable storage medium, which can realize the classification processing of performance events and perform grouping statistical operations using signal categories, thereby improving the accuracy and resource utilization efficiency of memory performance monitoring.
[0006] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.
[0007] According to a first aspect of the embodiments of the present disclosure, a memory performance monitoring method is provided, comprising:
[0008] collecting a plurality of preselected performance events;
[0009] dividing the performance events into different signal categories based on the physical signal characteristics corresponding to each of the performance events;
[0010] assigning the performance events to predefined event groups;
[0011] performing statistical operations corresponding to the signal categories on the performance events in the event groups based on the signal categories of the performance events.
[0012] In some example embodiments of the present disclosure, based on the foregoing scheme, the memory performance monitoring method further comprises: comparing the statistical result of the statistical operation with a preset determination condition at each time the statistical operation is completed, and performing corresponding response processing according to the comparison result, the response processing including any one or more of storage processing and interrupt processing.
[0013] In some example embodiments of the present disclosure, based on the foregoing scheme, the corresponding response processing according to the comparison result includes: in response to the statistical result satisfying the determination condition, writing the statistical result to a register and / or transmitting the statistical result from a system bus to a preset storage address through a master device mode.
[0014] In some example embodiments of the present disclosure, based on the foregoing scheme, the corresponding response processing according to the comparison result includes: in response to the statistical result not satisfying the determination condition, generating an interrupt signal corresponding to the event group; wherein the interrupt signal contains an abnormal event identifier and an interrupt type.
[0015] In some example embodiments of the present disclosure, based on the foregoing scheme, the collecting a plurality of preselected performance events includes: collecting all scheduling events generated in a memory scheduling process; selecting interface class performance events and transaction class performance events from the scheduling events.
[0016] In some example embodiments of the present disclosure, based on the foregoing scheme, the assigning the performance events to pre-defined event groups includes: constructing a plurality of event groups, and defining an event mapping relationship between the event groups and the performance events through a configuration script; and assigning the performance events to the corresponding event groups according to the event mapping relationship.
[0017] In some example embodiments of the present disclosure, based on the foregoing scheme, the constructing a plurality of event groups includes: constructing a plurality of array type event groups according to a monitoring target; wherein the event groups include any one or more of an event group for bandwidth statistics, an event group for access delay statistics, an event group for resource monitoring, an event group for power consumption evaluation, an event group for command scheduling behavior analysis, and an event group for non-task state monitoring.
[0018] In some example embodiments of the present disclosure, based on the foregoing scheme, the signal category includes a pulse class signal, and the performing a statistical operation on the performance events in the event group corresponding to the signal category includes: in response to the performance events corresponding to the pulse class signal, performing an event number accumulation operation on the performance events in the event group.
[0019] In some example embodiments of the present disclosure, based on the foregoing scheme, the signal category includes a level category signal, and the performing, on the performance events in the event group, a statistical operation corresponding to the signal category includes: in response to the performance event corresponding to the level category signal, performing a duration statistical operation on the performance events in the event group.
[0020] In some example embodiments of the present disclosure, based on the foregoing scheme, the signal category includes a bus category signal, and the performing, on the performance events in the event group, a statistical operation corresponding to the signal category includes: in response to the performance event corresponding to the bus category signal, performing a numerical statistical operation on the performance events in the event group, wherein the numerical statistical operation includes one or more of a maximum value, a minimum value, an average value, and a total sum statistical operation.
[0021] According to a second aspect of the embodiments of the present disclosure, a memory performance monitoring apparatus is provided, comprising:
[0022] An event acquisition module is configured to collect a plurality of preselected performance events.
[0023] An event classification module is configured to divide the performance events into different signal categories based on physical signal characteristics corresponding to each of the performance events.
[0024] An event distribution module is configured to distribute the performance events to pre-defined event groups.
[0025] A statistical operation module is configured to perform, on the performance events in the event group, a statistical operation corresponding to the signal category of each of the performance events.
[0026] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising: a processor; and a memory having computer readable instructions stored thereon, the computer readable instructions being executed by the processor to implement the memory performance monitoring method in the first aspect.
[0027] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, having a computer program stored thereon, the computer program being executed by a processor to implement the memory performance monitoring method in the first aspect.
[0028] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:
[0029] The memory performance monitoring method in the example embodiments of the present disclosure can accurately reflect the actual memory performance under complex access mode by collecting a plurality of preselected performance events, compared with the mode of monitoring only the basic interface command. On the one hand, the signal category division based on the physical signal characteristics corresponding to the performance events can realize the classified statistical processing of different types of events, thereby improving the accuracy of performance analysis. On the other hand, by distributing the performance events to the pre-defined event groups, the structured management of the performance monitoring objects can be realized, the hardware resource redundancy problem caused by setting independent statistical units for each monitoring event can be avoided, the occupied area of the monitoring module is reduced, thereby improving the integration and effective utilization of hardware resources. On the other hand, the statistical operation corresponding to the signal category is performed on the performance events in each event group, which can more accurately determine the source of memory performance fluctuation, thereby overcoming the problem that it is difficult to attribute performance changes to specific events.
[0030] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0031] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0032] Figure 1 The schematic diagram of the memory performance monitoring method according to some embodiments of the present disclosure is schematically shown.
[0033] Figure 2 The flowchart of distributing performance events to event groups according to some embodiments of the present disclosure is schematically shown.
[0034] Figure 3 The process diagram of statistical operation based on pulse-type signals according to some embodiments of the present disclosure is schematically shown.
[0035] Figure 4 The process diagram of statistical operation based on level-type signals according to some embodiments of the present disclosure is schematically shown.
[0036] Figure 5 The process diagram of statistical operation based on bus-type signals according to some embodiments of the present disclosure is schematically shown.
[0037] Figure 6A flowchart illustrating controlling the enable state of a performance event or group of events is shown schematically in accordance with some embodiments of the present disclosure.
[0038] Figure 7 A schematic diagram of a memory performance monitoring device is shown schematically in accordance with some embodiments of the present disclosure.
[0039] Figure 8 A structural diagram of a computer system of an electronic device is shown schematically in accordance with some embodiments of the present disclosure.
[0040] Figure 9 A schematic diagram of a computer readable storage medium is shown schematically in accordance with some embodiments of the present disclosure.
[0041] In the drawings, like or corresponding elements shown throughout the figures are designated with identical reference numerals. DETAILED DESCRIPTION
[0042] Example embodiments are now described in detail with reference to the figures. Like numbers refer to like elements throughout. The detailed description provides examples of implementations of the described embodiments and is not intended to limit the scope of the described embodiments. Rather, the described embodiments are provided as example embodiments in accordance with which various implementations can be made.
[0043] The terminology used in this description is for the purpose of describing particular embodiments only and is not intended to limit the description. As used in this description and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0044] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings. Example embodiments can, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of example embodiments to those skilled in the art. Like reference numerals refer to like elements throughout.
[0045] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the
[0046] Moreover, the accompanying drawings are only schematic and are non-limiting exact representations of embodiments of the application. The drawings in the present description are only schematic and are non-limiting exact representations of the described premises; they show only the essential features of the embodiments, the drawings themselves being non-limiting exact representations thereof. In the drawings, the size of some of the elements can be exaggerated, and the figures are not drawn to scale in order to distinctly show the elements. Identical elements show in the figures are provided with the same reference signs.
[0047] In the present example embodiment, a memory performance monitoring method is first provided, which can be applied to an electronic device having a memory access function, including but not limited to a memory controller, a general-purpose processor, a graphics processor, an embedded terminal device, and the like. Figure 1 A flowchart of the memory performance monitoring method according to some embodiments of the present disclosure is schematically shown. Referring to Figure 1 As shown, the memory performance monitoring method can include the following steps:
[0048] Step S110, collecting a plurality of preselected performance events;
[0049] Step S120, dividing the performance events into different signal categories based on the physical signal characteristics corresponding to the performance events;
[0050] Step S130, assigning the performance events to predefined event groups;
[0051] Step S140, performing a statistical operation corresponding to the signal category on the performance events in the event groups based on the signal category of each performance event.
[0052] According to the memory performance monitoring method in the example embodiment, by collecting a plurality of preselected performance events, compared with the mode of monitoring only the basic interface command, the actual performance of the memory under the complex access mode can be accurately reflected. On the one hand, based on the signal category division of the physical signal characteristics corresponding to the performance events, the classification and statistical processing of different types of events can be realized, thereby improving the accuracy of performance analysis and avoiding the problem of inaccurate statistical results caused by undifferentiated signal types. On the other hand, by distributing the performance events to the pre-defined event groups, the structured management of the performance monitoring objects can be realized, thereby avoiding the hardware resource redundancy problem caused by setting independent statistical units for each monitoring event, reducing the occupied area of the monitoring module, and thereby improving the integration and effective utilization of the hardware resources. On the other hand, the statistical operation corresponding to the signal category is performed on the performance events in each event group, which can more accurately determine the source of the memory performance fluctuation, thereby solving the problem of being difficult to attribute the performance change to specific events.
[0053] In the following, the memory performance monitoring method in the example embodiment will be further described.
[0054] In step S110, a plurality of preselected performance events are collected.
[0055] In an example embodiment of the disclosure, the performance event can represent an event related to access behavior, scheduling state, resource occupation or memory control during the running of the memory, and is used to reflect the basic event information of the memory performance state or behavior characteristics. Exemplarily, the performance event can be an access request event, a response return event, a command initiation event, an address conflict event and other events reflecting interface interaction behavior generated in the memory access path; it can also be an event related to the running state in the memory control path, such as an event representing the stable level maintenance time, a data queue depth event representing the occupation degree of the buffer or channel, a delay statistical event representing the waiting time in the command link, etc.; it can also be an operation event generated in the non-task control flow, such as a calibration event for initializing the training process, a power control event representing the entering and exiting of the low-power mode, a management event representing the temperature reading process, etc. Of course, in other embodiments of the disclosure, the performance event can also be a write activation event, a command retry event and other events related to memory scheduling.
[0056] In a specific implementation, the process of collecting a plurality of preselected performance events can include: monitoring state change signals in the memory controller, the interface module and the associated path during the running of the memory, identifying events according to the observed memory-related signals such as access request, command initiation, response return, address conflict, idle detection, and the like according to a pre-set event definition table, and classifying the types in combination with the location and functional semantics of the events, and then extracting performance events related to performance indicators such as bandwidth utilization, access delay, command scheduling, and resource occupation.
[0057] In step S120, the performance events are divided into different signal categories based on the physical signal characteristics corresponding to the performance events.
[0058] In an example embodiment of the present disclosure, the physical signal characteristics can represent the expression form and timing characteristics of the underlying hardware signals to which the performance events are mapped in the memory system, for distinguishing the signal response mode of the performance events in the memory scheduling process. The signal category can represent the classification of the signal form presented by the performance events at the physical level. By dividing the performance events into different signal categories, the classification management of various performance events can be achieved, so that the events in different signal categories can be recorded and analyzed in a statistical manner that is more consistent with their physical signal characteristics, thereby effectively improving the accuracy and expression efficiency of the monitoring data and further enhancing the refinement degree of the memory performance monitoring process.
[0059] Exemplarily, based on the physical signal characteristics, the performance events can be divided into the following three signal categories: one category is a pulse signal, whose physical characteristics are manifested as a transient high or low level pulse triggered by an edge within one or more clock cycles, which can be used to reflect the number or frequency of event occurrences, such as interface conflicts, command initiation, etc.; another category is a level signal, whose physical characteristics are manifested as a stable level state maintained for a period of time, which can be used to reflect the time length of a certain running state, such as write channel blocking, conflict duration, etc.; and the third category is a bus signal, whose physical characteristics are manifested as numerical fluctuations within multiple clock cycles, which can be used to reflect the resource usage degree or state numerical changes, such as First-In First-Out (FIFO) occupancy depth, bus bandwidth utilization, etc. Of course, in other embodiments of the present disclosure, the signal category can also be a threshold triggered signal, which can represent that no statistics are generated within a certain numerical range, and only when the signal value reaches or exceeds a pre-set threshold does the event record trigger; the signal category can also be a discrete event stream signal, which can represent a sequence composed of multiple discontinuous events, and the interval between events is not fixed. Of course, in other embodiments of the present disclosure, the signal category can also be other suitable signal categories.
[0060] In addition, in the process of dividing performance events into different signal categories, the same performance event can be divided into different model categories. For example, for a performance event representing a buffer queue conflict, it can be divided into a pulse signal when counting the number of conflicts, and a level signal when monitoring the duration of the conflict, and a bus signal when monitoring the memory buffer occupancy. Through the above-mentioned composite mapping mechanism of signal categories, each performance event can be given multi-dimensional monitoring attributes, so that it has flexible statistical ability in different monitoring scenarios, thereby improving the adaptability and expression accuracy of the memory performance monitoring method.
[0061] In step S130, the performance event is assigned to a predefined event group.
[0062] In an example embodiment of the present disclosure, the event group can represent an event structure composed of a plurality of performance events with similar functional targets or monitoring dimensions in a predetermined relationship, for realizing unified statistical processing of performance events. For example, the event group can be composed of event name, event identifier, signal category, statistical method, and enable state, etc. The construction standard can be based on memory access bandwidth evaluation, access delay analysis, power consumption measurement, resource usage monitoring, command scheduling behavior analysis, or non-task state identification, etc. Performance monitoring targets, and can be dynamically configured and version managed in combination with configuration scripts and event mapping relationships.
[0063] In step S140, based on the signal category of each performance event, the performance event in the event group is subjected to statistical operation corresponding to the signal category.
[0064] In an example embodiment of the present disclosure, the statistical operation can represent a numerical extraction and time calculation process of the original signal corresponding to the performance event in the event group based on the signal category to which the performance event belongs, according to the preset statistical method, for generating statistical results representing the memory running state.
[0065] In a specific implementation, the execution manner of the statistical operation can include any one or more of single-cycle statistics, repeated-cycle statistics, and condition-triggered statistics. The single-cycle statistics can represent a one-time data collection and statistical processing procedure in a preset time window or sampling cycle, and output the statistical result and terminate the current statistical process after the cycle ends, which is suitable for write delay measurement events and refresh command response events and other transient state monitoring events. The repeated-cycle statistics can represent periodically performing the statistical operation of the performance event in multiple consecutive sampling cycles, and outputting the statistical result in the current cycle at the end of each statistical cycle, which is suitable for address conflict events and read / write request hit rate statistical events and other events that occur continuously and need to be monitored for a long time. The condition-triggered statistics can represent starting the statistical operation only when a predefined event condition is met, such as the number of occurrences of a certain event exceeding a threshold, signal state change, or specific register writing, and continuously performing statistics or outputting results during the condition is met, which is suitable for power consumption mutation detection events, temperature anomaly events and other events that need to be responded based on a threshold or a specific state. In addition, in the process of single-cycle statistics and repeated-cycle statistics, different statistical cycles can be used for different event groups to adapt to the monitoring needs of the event groups. Through the three different execution manners of single-cycle statistics, repeated-cycle statistics and condition-triggered statistics, the most suitable manner can be selected flexibly for different types of performance events, and the flexibility and adaptability of memory performance monitoring are improved.
[0066] Of course, in other embodiments of the present disclosure, the execution manner of the statistical operation can also include sliding window statistics, interval distribution statistics and other suitable manners. The sliding window statistics can represent continuously collecting performance events in a fixed-length time window and dynamically updating the statistical result as time progresses, which can be used to monitor transient burst behavior or stability fluctuations, such as command queue overflow events, bandwidth utilization sudden drop events, etc. The interval distribution statistics can represent dividing the statistical value of a preset performance event into multiple numerical intervals and recording the number of events in each interval, which can be used to form a sample distribution graph.
[0067] Next, the contents in steps S110 to S140 are described in detail.
[0068] In an example embodiment of the present disclosure, the collection of multiple preselected performance events in step S110 can be implemented by the following steps, which can specifically include: collecting all scheduling events generated in the memory scheduling process; selecting interface class performance events and transaction class performance events from the scheduling events.
[0069] The scheduling event can represent all event information of an operation state of data access, command execution, or resource allocation in the memory running process. The interface class performance event focuses on the access behavior outside the memory, which can represent the behavior record generated in the interaction process between the functional levels in the memory system. The interface class performance event is abstracted and classified through a standardized interface, and can cover the interaction characteristics between the system layer and the controller, the bridge logic and the core module, the front and back stages of scheduling, and the controller and the physical layer. Exemplarily, the interface class performance event can include events generated by the access request, response, command distribution, access conflict processing, and the like transmitted on interfaces such as an Advanced eXtensible Interface (AXI), a Memory Interface (MI), and a Frontend-Backend (FB).
[0070] The transaction class performance event focuses on the internal running state, which can represent events related to task behavior, resource allocation, or running control in the memory running process. Exemplarily, the transaction class performance event can include events related to access bandwidth, data delay, energy consumption indicators, execution effect of command scheduling strategy, fault tolerance behavior of Reliability Availability Serviceability (RAS) mechanism, and the like, which can reflect the performance of the memory. In addition, the transaction class performance event can also include events related to non-task class operation processes, such as initialization training process, state temperature collection, low-power entry or exit state, and the like. The interface class performance event and the transaction class performance event can reflect the overall state of the memory from external access to internal running.
[0071] In a specific implementation, when selecting the interface class performance event and the transaction class performance event, first, the scheduling events generated in each stage of the memory scheduling path are collected, and then the collected scheduling events are identified and selected item by item based on a predefined event screening rule. Among them, the event with explicit interface interaction semantics and reflecting the flow state of data or commands between different modules is identified as the interface class performance event. Further, the event with resource occupation characteristics, performance constraint characteristics, or control logic characteristics in the scheduling event can be classified as the transaction class performance event. Through the above event collection and selection process, the interface class performance event with module interaction semantics and the transaction class performance event reflecting the memory related behavior and state change are extracted, thereby effectively improving the data coverage range and data expression ability of the memory performance monitoring.
[0072] In addition, in the process of transaction type performance event collection, the auxiliary monitoring module can be used to enhance the observation integrity and accuracy of performance events. For example, for RAS related events, the external error detection module can be used to collect abnormal record events related to reliability guarantee mechanisms, such as error correction code detection, error injection response, retry recovery process, etc. For non-task type operation event collection, the physical layer module, temperature sensor, power management unit or clock calibration circuit and other peripheral systems can be used to obtain non-task type events such as initialization training, temperature overrun alarm, low power state entry and exit through special state registers, bus readback or interrupt feedback.
[0073] In an example embodiment of the present disclosure, referring to Figure 2 The performance event distribution to the pre-defined event group in step S130 can be implemented by the following steps, which can specifically include:
[0074] Step S210, constructing a plurality of event groups, and defining the event mapping relationship between the event groups and the performance events through a configuration script.
[0075] Step S220, distributing the performance events to the corresponding event groups according to the event mapping relationship.
[0076] The configuration script can represent a parameter configuration set for constructing and managing the corresponding relationship between the performance events and the event groups, which can be in the form of a structured array, a register field or a configuration table item. The event mapping relationship can represent the corresponding association information between the performance events and the event groups established in the configuration script, which is used to identify to which event group each performance event belongs, and the mapping process can be automatically completed through indexing, parsing or script loading. In addition, in the event mapping relationship, the same performance event can correspond to one event group or multiple event groups.
[0077] In this embodiment, the event groups can be set based on the monitoring target, such as constructing different event groups for different performance concerns such as bandwidth, delay, power consumption, etc. The number of event groups can be flexibly set according to the performance monitoring requirements. For example, in a lightweight debugging application, only two event groups including bandwidth statistics and access delay statistics can be set; while in a complex system optimization scenario, six or more event groups can be set to monitor memory performance such as bandwidth, delay, power consumption, command scheduling behavior, resource usage state, and non-task state, etc. Of course, in other embodiments of the present disclosure, the number of event groups can be set according to actual requirements. By constructing multiple event groups, grouped statistics and on-demand statistical content can be performed, avoiding the resource redundancy and data mixing problems caused by the statistics of all performance events, greatly reducing the area of the memory performance monitoring module. On the other hand, by configuring a script to define the mapping relationship between the event groups and the performance events, and based on this relationship to complete the automatic grouping of events, programmable event management can be achieved, effectively reducing the implementation complexity of event grouping. At the same time, it is also convenient to dynamically adjust the event group structure under different monitoring requirements, improving the flexibility of memory performance monitoring.
[0078] In an example embodiment of the present disclosure, the construction of multiple event groups in step S210 can be implemented by the following steps, which can specifically include: constructing multiple array type event groups according to the monitoring target; wherein the event groups include any one or more of an event group for bandwidth statistics, an event group for access delay statistics, an event group for resource monitoring, an event group for power consumption evaluation, an event group for command scheduling behavior analysis, and an event group for non-task state monitoring.
[0079] In a specific implementation, the construction and management of multiple event groups can be implemented by configuring a structured data variable, specifically, an array type variable perf_event_group can be defined, which is used to store multiple instances of the structure of the preset event groups. Each structure is used to describe the name of an independent event group, the number list of performance events in the group, the corresponding signal category, the number of events, the statistical method, and the enabled state, etc. Based on this array variable, the fields of each event group can be configured and valued by a script. The script language can be Python, JavaScript, and other suitable languages such as Shell.
[0080] The monitoring target can represent a monitoring requirement for a specific performance indicator or state feature in the memory system. The array type event group can represent an event collection form that defines and indexes multiple performance events in an array structure. By constructing the array type event group according to the monitoring target, each event group can focus on a specific performance analysis direction, and unified configuration based on the array structure can help simplify the enabling and disabling process of the event group, thereby improving configuration efficiency. In another aspect, the one-to-one correspondence between the monitoring target and the event group can support on-demand loading, reducing resource waste caused by redundant event configuration, thereby improving resource utilization in the performance monitoring process.
[0081] In this embodiment, the bandwidth statistics can represent monitoring of the data read / write amount and transmission efficiency in the memory access process. The access delay statistics can represent quantitative measurement of the time duration experienced from the initiation of the memory access request to the completion of the response. Resource monitoring can represent monitoring of the usage of various software and hardware resources in the monitoring process, such as counter allocation status, FIFO occupancy depth, command queue length, etc. Power consumption evaluation can represent determining the power consumption state of the current memory system. Command scheduling behavior analysis can represent analyzing the behavior characteristics of the controller command scheduling path, conflict distribution, arbitration efficiency, etc. Non-task state monitoring can represent monitoring the running state of the memory system in the non-data access phase, which can specifically include monitoring of low-power switching, temperature reading, and other auxiliary control operations. In addition, in other embodiments of the present disclosure, the event group can also include an event group for fault detection response monitoring, an event group for command conflict detection, and an event group for refresh behavior monitoring, and other event groups for monitoring other monitoring targets.
[0082] In an example embodiment of the present disclosure, when the performance event corresponds to a pulse type signal, the statistical operation corresponding to the signal category on the performance event in the event group in step S140 can be implemented by the following steps, which can specifically include: in response to the performance event corresponding to the pulse type signal, performing an event count accumulation operation on the performance event in the event group.
[0083] The pulse type signal can represent an event signal that occurs in the form of instantaneous excitation in the memory performance monitoring process, and can be used to represent the number of occurrences of the performance event. The event count accumulation operation can represent a process of adding the number of occurrences of the pulse type signal one by one within a monitoring period, which is used to count the total number of events, and can be used for monitoring and analysis of instantaneous events such as address conflicts and refresh command initiation. By performing the event count accumulation operation on the performance event in the event group, high-precision event counting can be achieved based on the instantaneous characteristics of event triggering, thereby improving the monitoring accuracy and data reliability of instantaneous performance events.
[0084] Exemplarily, Figure 3A process diagram of performing statistical operation based on a pulse-like signal is shown. Specifically, the pulse-like signal corresponds to address collision events, and the signal shows the transient trigger state of events in the form of pulses in a statistical period. Based on the event signal, address collision type performance events with event numbers 101 and 102 can be classified into a predefined address collision event group ADDR_COLLISION_GROUP, the event number list of which is [101, 102], the signal type is marked as pulse-like, and the number of events is 2. The event group adopts repeated period statistics as the statistical method, and the pulse number of all events in the group is accumulated in each statistical period. As shown in the figure, a total of 3 address collision event triggers are detected in the current statistical period, and the corresponding statistical result is: the number of events is 3.
[0085] In an example embodiment of the present disclosure, when the performance event corresponds to a level-like signal, the statistical operation corresponding to the signal category on the performance events in the event group in step S140 can be implemented by the following steps, which can specifically include: in response to the performance event corresponding to the level-like signal, performing duration statistical operation on the performance events in the event group.
[0086] Among them, the level-like signal can represent a stable signal that exists at a certain specific logic level in the memory running state, and its trigger characteristic is to maintain a high or low level state for a certain time length, which is used to reflect the persistence of the running state. The duration statistical operation can represent the measurement of the length of time accumulated at the effective level of the signal, which is suitable for event statistics such as command queuing and waiting or link holding state, which need to monitor the holding time of the state. By performing duration statistical operation on the performance events in the event group, the duration of the performance events in the monitoring period can be accurately identified, and the maintenance time of various resource occupation, command blocking or waiting state in the memory running process can be effectively reflected, thereby improving the identification ability of system running bottleneck and potential delay source.
[0087] Exemplarily, Figure 4A process diagram of performing statistical operation based on a level type signal is shown. Specifically, the level type signal corresponds to an access latency event, and the signal waveform represents the number of clock cycles experienced from the initiation of an access request to the completion of an access response during a high level. Based on the event signal, an access latency type performance event with event number 103 can be classified into a predefined access latency event group ACCESS_LATENCY_GROUP, with the event number list
[103] , signal type marked as level type, event number 1, and statistical method single cycle statistics. In the actual statistical process, the level duration is accumulated in each monitoring period, and the level signal maintains a high level state for a total of 20 clock cycles. The final statistical result is that the total latency (Total latency) is 20 clock cycles, and this value is used as a quantitative indicator of the access latency in this access period for subsequent memory performance judgment.
[0088] In an example embodiment of the present disclosure, when the performance event corresponds to a bus type signal, the statistical operation on the performance event in the event group corresponding to the signal category in step S140 can be implemented by the following steps, which can specifically include: in response to the performance event corresponding to the bus type signal, performing numerical statistical operation on the performance event in the event group, wherein the numerical statistical operation includes one or more of maximum value, minimum value, average value and total sum statistics.
[0089] The bus type signal can represent a state signal that dynamically changes in numerical form during the interaction between the memory controller and the external module, and its trigger characteristic is that the signal amplitude fluctuates continuously over time, which can be used to reflect the system resource usage or interface data throughput in real time. Numerical statistical operation can represent numerical characteristic analysis and processing of data samples of this type of signal within a statistical period, which is suitable for monitoring states such as FIFO depth, command queue length, power consumption counter, etc. By performing numerical statistical operation on the performance event in the event group, quantitative analysis of performance parameters with continuous change characteristics can be achieved, and the comprehensiveness and accuracy of the memory performance monitoring result can be improved.
[0090] Exemplarily, Figure 5A process diagram of performing statistical operation based on bus type signal is shown. Specifically, the bus type signal corresponds to FIFO queue depth statistical event, and the signal value thereof reflects the instantaneous usage depth of the FIFO in each clock cycle. Based on the event signal, the FIFO queue depth type performance events with event numbers 201 and 202 can be classified into the predefined FIFO depth event group FIFO_USAGE_GROUP, the event number list of which is [201, 202], the signal type is marked as bus type, the event number is 2, and the statistical method is repeated period statistics. In the actual statistical process, the FIFO depth signal in the monitoring period is continuously collected, and various statistical operations are performed to obtain comprehensive performance characteristics. As shown in the figure, the statistical results include: the maximum FIFO depth is 24 entries, the minimum FIFO depth is 6 entries, and the average FIFO depth is 14.3 entries. These statistical values can reflect the real-time usage load of the FIFO resource, and can be used to analyze whether there is a bottleneck in the buffer design, judge whether the upstream and downstream scheduling strategies need to be adjusted, and other memory problems.
[0091] In an example embodiment of the present disclosure, the memory performance monitoring method described above can further include the following steps: comparing the statistical results of the statistical operation with the preset determination condition at each time the statistical operation is completed, and performing corresponding response processing according to the comparison result, the response processing including any one or more of storage processing and interruption processing.
[0092] The determination condition can represent a preset reference standard for judging the statistical operation results, for determining whether the current monitoring state meets the performance requirements. For example, the determination condition can be a numerical threshold and interval range set for a certain performance event. The response processing can represent the operation process performed after comparing the statistical results with the determination condition, for adjusting the memory related behaviors or reporting the current performance state according to the monitoring state. The storage processing can represent the process of storing the statistical results. The interruption processing can represent the process of generating an interruption signal corresponding to the event group when the statistical results are abnormal. In this embodiment, the results are compared at each time the statistical operation is completed, which can realize real-time determination of the memory performance state. According to the comparison result, the corresponding response processing is performed, which can realize real-time determination and dynamic feedback of the memory performance state, thereby improving the practicality of the monitoring results.
[0093] In an example embodiment of the present disclosure, when the statistical results meet the determination condition, the statistical results can be written into a register and / or transmitted from the system bus to a preset storage address through the host device mode.
[0094] The register can represent a high-speed storage unit integrated in the memory performance monitoring module, and is used to save the statistical result of the performance event in a specified period. The master device mode can represent a working mode of the memory performance monitoring module as a master (Master) to initiate a data write or read operation in a system bus access protocol. In this mode, the performance monitoring module can autonomously request a write channel from the bus to transmit internal data to the external address space. The system (AXI) bus can represent a communication path connecting the monitoring module with other functional modules on the chip, such as a processor, a storage unit, a peripheral controller, and the like. In this embodiment, the statistical result is transmitted from the system bus to the preset storage address by the master device mode, which can realize periodic writing of monitoring data in the repeated cycle statistical mode, thereby continuously presenting the complete performance data corresponding to each statistical cycle. In addition, the master device transmission mode based on the AXI bus has good interoperability and protocol universality, and can be widely adapted to various processors and system-on-chip platforms, thereby enhancing the deployment flexibility of the memory performance monitoring method in different system architectures.
[0095] Exemplarily, when the judgment condition is a numerical threshold value, for the statistical value of the FIFO usage event group, an average depth threshold value can be preset as the judgment reference. Specifically, after completing the average value statistics of the FIFO usage event group, the performance monitoring module compares the statistical result with the preset average depth threshold value. If the average value is less than or equal to the threshold value, it is determined that the current FIFO usage state is in an acceptable range, thereby determining that the statistical result meets the judgment condition, and triggering the subsequent data writing or output operation.
[0096] In this embodiment, for the event group with limited event quantity and low statistical frequency, such as the address conflict event group, the statistical result corresponding to the event group can be written into the register, thereby facilitating the periodic polling reading of the processor. For the event group with a large number of events and requiring multiple updates of the statistical result, such as the FIFO usage event group and the access delay statistical event group, the statistical result can be transmitted from the system bus to the preset storage address by the master device mode, thereby meeting the requirements of continuous periodic statistics and remote data acquisition. For the event group with a wide performance event distribution, which requires both local reading and remote analysis, such as the resource monitoring event group and the power consumption evaluation event group, on the one hand, the statistical result is written into the register for fast access of the local processor, and on the other hand, the statistical result is transmitted from the system bus to the preset storage address by the master device mode, so as to facilitate centralized analysis and long-term archiving.
[0097] In an example embodiment of the present disclosure, when the statistical result does not meet the judgment condition, an interrupt signal corresponding to the event group is generated; wherein the interrupt signal contains an abnormal event identifier and an interrupt type.
[0098] The interrupt signal can represent a control signal for triggering an abnormal response in the monitoring process, and can be used to control the system to perform a corresponding abnormal processing procedure when the performance statistical result does not satisfy the preset determination condition. The abnormal event identifier can represent indication information contained in the interrupt signal, and is used to uniquely identify the current abnormal performance event or event group. The interrupt type can represent a response strategy category related to the interrupt signal, and is used to indicate a processing manner to be taken for the current interrupt. For example, the interrupt type can include an immediate interrupt, a delayed interrupt, a level interrupt, or a soft interrupt, etc. By generating an interrupt signal corresponding to the event group when the statistical result does not satisfy the determination condition, timely identification and active reporting of the abnormal performance state can be realized, which is helpful for the system to quickly locate potential faults during operation.
[0099] In a specific implementation, after the statistical operation of the performance event is completed, the memory performance monitoring module can obtain the statistical result of the target event group and compare it with the preset determination condition. If the statistical result does not satisfy the determination condition, it indicates that the running state corresponding to the current event group has deviated from the normal performance range. At this time, the performance monitoring module will generate an interrupt signal according to the event group triggered at present, and use it to report the abnormal state to the system.
[0100] Specifically, the performance monitoring module can first determine the event group name or number associated with the statistical result, and extract the corresponding abnormal event identifier in combination with the event mapping table; then, in combination with the preset interrupt strategy or abnormal level mapping table, determine the interrupt type corresponding to the current triggering situation. Next, the performance monitoring module combines and encodes the abnormal event identifier and the interrupt type to form the formatted interrupt signal data, and sends the interrupt signal to the upper processing module or interrupt controller through the interrupt output interface. For example, for an address conflict event group, if the statistical result is the cumulative conflict duration, and the value exceeds the set maximum acceptable conflict time threshold, it indicates that the current system may have a serious address arbitration problem. The performance monitoring module will immediately trigger an interrupt signal, the abnormal event identifier corresponds to the address conflict event group, and the interrupt type is set to immediate interrupt, so as to facilitate the system to quickly respond and perform memory scheduling adjustment.
[0101] In an example embodiment of the present disclosure, the above-mentioned memory performance monitoring method can further include the following steps: controlling the enabled state of the performance event and / or the event group during the memory scheduling process.
[0102] The enable state can represent an identifier of whether a performance event or an event group is activated in a current monitoring period for participating in memory performance monitoring. For example, the enable state can be represented by one or more control fields to indicate whether a target performance event or event group participates in performance monitoring and result statistics. When the enable state is an enable state, the corresponding performance event is monitored, and the corresponding signal data will participate in sampling and result generation; when the enable state is a disable state, the performance event will be skipped or shielded, and no statistical behavior will be generated, thereby reducing the occupation of monitoring resources and avoiding interference of redundant information. In addition, the above enable state can be statically set by a configuration script, or can be dynamically switched according to resource usage or monitoring strategies during memory running.
[0103] In the embodiment, when the state of a specific performance event needs to be monitored in the memory scheduling process, the enable state of the performance event can be controlled. When a certain type of monitoring target such as bandwidth or power consumption is concerned, the enable state of the corresponding event group can be controlled. When the monitoring requirement involves cross analysis of multiple dimensions, the enable states of the performance events and the event groups can be jointly controlled, thereby realizing flexible and efficient performance monitoring resource scheduling.
[0104] In an example embodiment of the present disclosure, referring to FIG. 6, the enable state of a performance event and / or an event group in a memory scheduling process can be controlled by steps S610 to S640, specifically including: Figure 6
[0105] In step S610, a statistical value of an event group related to a resource occupation state is obtained.
[0106] The resource occupation state can represent a running state parameter for reflecting the occupation degree of a statistical resource such as a counter or a cache unit in current memory performance monitoring, which can represent the memory monitoring resource pressure under different running loads.
[0107] Specifically, a plurality of performance events of resource usage in a monitoring period are monitored, and based on the signal category of each performance event, a statistical operation corresponding to the performance event is performed to obtain a statistical value. For example, the event group related to the resource occupation state can include a FIFO usage event group, a command queue event group, and an address conflict event group, and other suitable event groups. The average value of each FIFO depth event in the FIFO usage event group can be statistically calculated, the maximum value of each command queue length event in the command queue event group can be statistically calculated, and the cumulative duration of the conflict duration event in the address conflict event group can be statistically calculated. The above statistical results are arranged as a structured output as the statistical value of the resource monitoring event group in the current monitoring period.
[0108] Step S620, compare the statistical value with the preset resource occupation reference value to generate a resource state identifier.
[0109] The resource occupation reference value can represent a preset reference data for judging the current resource occupation state, and its value can be determined based on memory design specifications, hardware capabilities, or historical running data. For example, the resource occupation reference value can be a single threshold, a threshold interval, and a multi-level classification judgment condition, or other suitable forms. The resource state identifier can represent a state identification parameter generated according to the comparison result between the resource occupation state and the resource occupation reference value, and can be used to indicate that the current monitoring module is in a high occupation state, a low occupation state, or an intermediate state. For example, when the statistical value is the average FIFO depth, the resource occupation reference value can be preset as multiple consecutive interval thresholds, including light load, medium load, and heavy load. Based on this, the value interval of the statistical value in the current monitoring period can be sequentially determined: if the average FIFO depth is lower than the lower limit of the first threshold interval, the resource state identifier is light load; if it is between the first and second threshold intervals, the resource state identifier is medium load; and if it exceeds the upper limit of the second threshold interval, the resource state identifier is heavy load.
[0110] Step S630, according to the resource state identifier, read the enable state configuration field matching the current resource state from the configuration script.
[0111] The enable state configuration field can represent a set of enable control parameters stored in the configuration script, which is used to describe the enable strategy of each performance event or event group under a specific resource state. The field can include event index, target enable state, and priority strategy, etc. In a specific implementation, a plurality of enable state configuration fields are preset in the configuration script, each field corresponds to one or more resource state identifiers, and defines the performance events or event groups required to be enabled or disabled under the state. Then, the resource state identifier generated in step S620 is used as an index key to find the corresponding enable state configuration field in the configuration script,
[0112] Step S640, set the enable state of the corresponding performance event and / or event group according to the enable state configuration field. For example, after matching the enable state configuration field of the current resource state, the field content is parsed to extract the target performance event number or event group name to be enabled or disabled, and the corresponding enable flag bit. And output the above information to the related event enable control module. Then, the enable flag bit is mapped to the corresponding enable control register or configuration storage unit in the memory performance monitoring module, and the corresponding performance event or event group is enabled or disabled.
[0113] In this embodiment, by setting the enable state of the performance event or event group according to the resource state identifier, the dynamic adjustment of the performance monitoring task based on the change of the resource occupation state can be realized. On the one hand, by obtaining the statistical value of the event group related to the resource occupation state, and comparing the statistical value with the resource occupation reference value to generate the resource state identifier, the resource usage in the monitoring period can be accurately reflected. On the other hand, by reading the enable state configuration field matched with the current resource state from the configuration script, and setting the enable state of the performance event or event group according to the enable state configuration field, part of the event groups or events can be closed when the resource is tight, and the event monitoring can be restored when the resource is sufficient, so that the resource usage efficiency can be effectively improved.
[0114] In addition, in other embodiments of the present disclosure, the enable state configuration field can include event priority information, so that when the enable state of the corresponding performance event or event group is set, whether the resource configuration requirements of all the to-be-enabled performance events or event groups are met can be evaluated in combination with the current resource occupation state and the available resource capacity. If the resource is insufficient, the to-be-enabled objects can be sorted according to the priority information, and the enable state of the performance event or event group can be set in turn from high to low according to the priority, until the allocatable resource is fully allocated.
[0115] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired result. In addition or alternatively, some steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps, etc.
[0116] In addition, in the present example embodiment, a memory performance monitoring device is also provided. Referring to FIG. 7, Figure 7 As shown in the figure, the memory performance monitoring device 700 includes an event acquisition module 710, an event classification module 720, an event allocation module 730, and a statistical operation module 740. Wherein:
[0117] The event acquisition module 710 can be used to collect a plurality of preselected performance events;
[0118] The event classification module 720 can be used to divide the performance events into different signal categories based on the physical signal characteristics corresponding to each performance event;
[0119] The event allocation module 730 can be used to allocate the performance events to the pre-defined event groups;
[0120] The statistical operation module 740 can be used to perform statistical operations corresponding to the signal categories on the performance events in the event groups based on the signal categories of the performance events.
[0121] In some example embodiments of the present disclosure, based on the foregoing scheme, the memory performance monitoring apparatus 700 further comprises a response processing module configured to compare the statistical result of the statistical operation with a preset determination condition, and perform corresponding response processing according to the comparison result.
[0122] In some example embodiments of the present disclosure, based on the foregoing scheme, the response processing module is further configured to, in response to the statistical result satisfying the determination condition, write the statistical result into a register and / or transmit the statistical result from a system bus to a preset storage address through a master device mode.
[0123] In some example embodiments of the present disclosure, based on the foregoing scheme, the response processing module is further configured to, in response to the statistical result not satisfying the determination condition, generate an interrupt signal corresponding to the event group; wherein the interrupt signal contains an abnormal event identifier and an interrupt type.
[0124] In some example embodiments of the present disclosure, based on the foregoing scheme, the event acquisition module 710 is configured to collect all scheduling events generated in a memory scheduling process; and select interface class performance events and transaction class performance events from the scheduling events.
[0125] In some example embodiments of the present disclosure, based on the foregoing scheme, the event distribution module 730 is configured to construct a plurality of event groups, and define an event mapping relationship between the event groups and the performance events through a configuration script; and distribute the performance events to the corresponding event groups according to the event mapping relationship.
[0126] In some example embodiments of the present disclosure, based on the foregoing scheme, the event distribution module 730 is configured to construct a plurality of array type event groups according to a monitoring target; wherein the event groups include any one or more of an event group for bandwidth statistics, an event group for access delay statistics, an event group for resource monitoring, an event group for power consumption evaluation, an event group for command scheduling behavior analysis, and an event group for non-task state monitoring.
[0127] In some example embodiments of the present disclosure, the signal category includes a pulse class signal, and the statistical operation module 740 is configured to, in response to the performance event corresponding to the pulse class signal, perform event number accumulation operation on the performance event in the event group.
[0128] In some example embodiments of the present disclosure, the signal category includes a level class signal, and the statistical operation module 740 is configured to, in response to the performance event corresponding to the level class signal, perform duration statistical operation on the performance event in the event group.
[0129] In some example embodiments of the present disclosure, the signal category includes bus class signals, and the statistical operation module 740 is configured to, in response to the performance event corresponding to a bus class signal, perform a numerical statistical operation on the performance events in the event group, wherein the numerical statistical operation includes one or more of maximum value, minimum value, average value, and sum statistics.
[0130] In some example embodiments of the present disclosure, based on the foregoing scheme, the execution manner of the statistical operation includes any one or more of single-cycle statistics, repeated-cycle statistics, and condition-triggered statistics.
[0131] In some example embodiments of the present disclosure, based on the foregoing scheme, the memory performance monitoring apparatus 700 further includes an enable state control module configured to control the enable state of the performance event and / or the event group during the memory scheduling process.
[0132] In some example embodiments of the present disclosure, based on the foregoing scheme, the aforementioned enable state control module can be further configured to: obtain a statistical value of the event group related to the resource occupation state; compare the statistical value with a preset resource occupation reference value to generate a resource state identifier; according to the resource state identifier, read an enable state configuration field matching the current resource state from the configuration script; and set the enable state of the corresponding performance event and / or event group according to the enable state configuration field.
[0133] The specific details of the above memory performance monitoring apparatus modules have been described in detail in the corresponding memory performance monitoring method, and thus will not be described here.
[0134] It should be noted that although several modules or units of the memory performance monitoring apparatus are mentioned in the foregoing detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.
[0135] In addition, in the example embodiments of the present disclosure, an electronic device capable of implementing the above memory performance monitoring method is also provided.
[0136] Those skilled in the art can understand that each aspect of the present disclosure can be implemented as a system, a method or a program product. Therefore, each aspect of the present disclosure can be embodied as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" herein.
[0137] Such an electronic device 800 according to this embodiment of the present disclosure will be described below with reference to Figure 8 Figure 8 The electronic device 800 shown is merely one example and should not be taken as limiting the scope of the present disclosure embodiments.
[0138] As shown in Figure 8 The electronic device 800 is in the form of a general computing device. Components of the electronic device 800 can include, but are not limited to, the at least one processing unit 810 described above, the at least one storage unit 820 described above, a bus 830 that connects different system components including the storage unit 820 and the processing unit 810, and a display unit 840.
[0139] The storage unit stores program code that can be executed by the processing unit 810, so that the processing unit 810 performs the steps described in the above "Exemplary Method" section according to various exemplary embodiments of the present disclosure. For example, the processing unit 810 can perform the steps shown in Figure 1 S110, collecting a plurality of pre-selected performance events; S120, dividing the performance events into different signal categories based on the physical signal characteristics corresponding to each performance event; S130, assigning the performance events to pre-defined event groups; and S140, performing statistical operations corresponding to the signal categories on the performance events in the event groups based on the signal categories of the performance events.
[0140] The storage unit 820 can include a readable medium in the form of volatile storage such as a random access memory (RAM) 821 and / or cache memory 822, and can further include a read-only memory (ROM) 823.
[0141] The storage unit 820 can further include program / utility 824 having a set of program modules 825, including but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which can include implementation of a network environment, alone or in combination.
[0142] The bus 830 can represent one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus architectures.
[0143] The electronic device 800 can also communicate with one or more external devices 870 such as a keyboard or pointing devices, a Bluetooth device, or a disk drive. These and other peripherals can be connected to the electronic device 800 through the input / output (I / O) interface 850. The I / O interface 850 can include both wired and / or wireless communication devices. Still yet, the electronic device 800 can communicate with one or more networks, such as one or more local area networks (LANs), wide area networks (WANs), and / or the Internet, through a network adapter 860. As an example, the network adapter 860 can include a modem, a router, a switch or a network interface card, for example. The network adapter 860 can be enabled to communicate with the other electronic, electrical, and / or wireless devices through a wired and / or wireless communication medium. The communication medium can include one or more of a wired communication medium and a wireless communication medium. It is appreciated that the network adapter 860 can also be selected or designed according to the communication medium used in a network in which the electronic device 800 is intended to operate.
[0144] From the above description of the embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, or the like) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.
[0145] In the example embodiments of the present disclosure, a computer-readable storage medium having a program product stored thereon capable of implementing the above-mentioned method of the present disclosure is also provided. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing a terminal device to perform the steps according to various example embodiments of the present disclosure described in the above-mentioned “example method” section of the present specification when the program product is run on the terminal device.
[0146] Reference Figure 9 As shown, the program product 900 for implementing the above-mentioned memory performance monitoring method according to the embodiments of the present disclosure is described, which can adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in the present document, the readable storage medium can be any tangible medium containing or storing a program, which can be used or combined with an instruction execution system, device, or apparatus.
[0147] The program product can employ any combination of one or more computer-readable media. The computer-readable media can be a computer-readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0148] The computer-readable signal medium can include a computer-readable storage medium that is configured to store and deliver a computer-readable program code. The computer-readable program code can be propagated as a computer-readable signal medium.
[0149] The program code embodied on the computer-readable media can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0150] The program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0151] In addition, the above-described flowcharts are merely illustrative of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to limit the purpose. It is easily understood that the processes shown in the above-described flowcharts do not indicate or limit the time sequence of the processes. In addition, it is easily understood that the processes can be executed synchronously or asynchronously, for example, in a plurality of modules.
[0152] Those skilled in the art can easily understand, through the above description of the embodiments, that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the methods according to the embodiments of the present disclosure.
[0153] Other embodiments of the present disclosure will be apparent to those skilled in the art with the accomplishment of the present disclosure as set forth in the specification and practice of the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known or customary practice in the art of the present disclosure not specifically disclosed. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0154] It should be understood that the present disclosure is not limited to the precise structures described above and illustrated in the drawings and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims appended hereto.
Claims
1. A memory performance monitoring method, characterized in that: include: Collect multiple pre-selected performance events; Classifying the performance events into different signal categories based on physical signal characteristics corresponding to each performance event; assigning the performance events to predefined event groups; Based on the signal category of each of the performance events, a statistical operation corresponding to the signal category is performed on the performance events in the event group.
2. The memory performance monitoring method according to claim 1, wherein: Also includes: Each time the statistical operation is completed, the statistical result of the statistical operation is compared with the preset judgment condition, and corresponding response processing is performed according to the comparison result. The response processing includes any one or more of storage processing and interrupt processing.
3. The memory performance monitoring method according to claim 2, wherein: The corresponding response processing according to the comparison result includes: In response to the statistical result satisfying the determination condition, the statistical result is written into a register and / or the statistical result is transmitted to a preset storage address via a system bus in a master device mode.
4. The memory performance monitoring method according to claim 2, wherein: The corresponding response processing according to the comparison result includes: In response to the statistical result not satisfying the determination condition, generating an interrupt signal corresponding to the event group; The interrupt signal includes an abnormal event identifier and an interrupt type.
5. The memory performance monitoring method according to claim 1, wherein: The collecting of a plurality of pre-selected performance events includes: Collect all scheduling events generated during memory scheduling; An interface performance event and a transaction performance event are selected from the scheduling events.
6. The memory performance monitoring method according to claim 1, wherein: Allocating the performance events to predefined event groups includes: Constructing multiple event groups and defining event mapping relationships between the event groups and the performance events through a configuration script; According to the event mapping relationship, the performance event is allocated to the corresponding event group.
7. The memory performance monitoring method according to claim 6, characterized in that: The construction of multiple event groups includes: Construct multiple array-type event groups according to monitoring targets; Among them, the event group includes any one or more of an event group for bandwidth statistics, an event group for access delay statistics, an event group for resource monitoring, an event group for power consumption evaluation, an event group for command scheduling behavior analysis, and an event group for non-task status monitoring.
8. The memory performance monitoring method according to claim 1, wherein: If the signal category includes a pulse signal, performing a statistical operation corresponding to the signal category on the performance events in the event group includes: In response to the performance event corresponding to a pulse-type signal, an event count operation is performed on the performance events in the event group.
9. The memory performance monitoring method according to claim 1, wherein: If the signal category includes a level signal, performing a statistical operation corresponding to the signal category on the performance events in the event group includes: In response to the performance event corresponding to a level-type signal, a duration statistics operation is performed on the performance events in the event group.
10. The memory performance monitoring method according to claim 1, wherein: If the signal category includes a bus signal, performing a statistical operation corresponding to the signal category on the performance events in the event group includes: In response to the performance event corresponding to a bus-type signal, a numerical statistical operation is performed on the performance events in the event group, wherein the numerical statistical operation includes one or more of maximum value, minimum value, average value and total statistics.
11. A memory performance monitoring device, characterized in that: include: An event acquisition module, used to collect multiple pre-selected performance events; An event classification module, configured to classify the performance events into different signal categories based on the physical signal characteristics corresponding to each performance event; An event allocation module, configured to allocate the performance events to predefined event groups; The statistical operation module is used to perform statistical operations corresponding to the signal category on the performance events in the event group based on the signal category of each performance event.
12. An electronic device, characterized in that: include: processor; as well as a memory for storing executable instructions of the processor; The processor is configured to execute the memory performance monitoring method according to any one of claims 1 to 10 by executing the executable instructions.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the memory performance monitoring method according to any one of claims 1 to 10 is implemented.
Citation Information
Cited By
Performance counting device and chip
CN121501622A
Performance counting device and chip
CN121501622B