Tracking processing activities

By selectively discarding tracking data based on the results of detection and processing activities, and by using a ring buffer and detection circuit to manage the storage of tracking data, the problem of storage space being occupied by a large amount of useless data is solved, thereby improving storage management efficiency and data utilization.

CN123178196APending Publication Date: 2026-11-27ARM LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611310765.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2016-03-18
Filing Date
2017-03-17
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

During tracking activities, storage space is occupied by a large amount of tracking data, and its usefulness is only known after it has been acquired and stored, resulting in inefficient storage management.

Method used

A data processing circuit and apparatus are provided that selectively discards or retains tracking data by detecting conditions related to the result of a given processing activity, and manages the storage of tracking data using a ring buffer and detection circuit, retaining only useful tracking data.

Benefits of technology

It effectively reduces storage space usage, improves storage management efficiency, ensures that tracking data is only retained when abnormal behavior is detected, and reduces unnecessary storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178196A_ABST
    Figure CN123178196A_ABST
Patent Text Reader

Abstract

The data processing circuitry comprises a processing element configured to perform processing activities, a trace data register, and a trace circuitry for generating trace data items indicative of processing activities of the processing element and for storing the trace data items in the trace data register; the trace circuitry comprises a detection circuitry for detecting a condition related to a result of a given processing activity for which a trace data item has been stored in the trace data register and for selectively discarding at least some of the stored trace data items related to the given processing activity in dependence on the detected condition.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Divisional Application Instructions This application is a divisional application of Chinese invention patent application filed on March 17, 2017, with application number 201780016743.X and entitled "Follow-up Processing Activities". Technical Field

[0002] This disclosure pertains to follow-up processing activities. Background Technology

[0003] There are many scenarios where it is desirable to track processing activities being performed by processing elements such as central processing units (CPUs). For example, this information is useful during the development of data processing devices. An example of a tool that can be used to assist in this process is a tracking tool.

[0004] Tracing the activity of processing elements generates a trace stream containing data representing step-by-step activities within the system, making it a highly useful tool in system development. Such tracing tools utilize various devices for tracing program flows, including embedded trace macrocells (ETMs, trademarks of Cambridge ARM Ltd.) located on the chip being monitored. In some cases, trace data is acquired and stored with timestamps. Examples of these processes include ETM tracing, statistical performance analysis, and embedded logic analysis.

[0005] These tracing tools can be used to reconstruct the state of a machine at a specific point during the execution of an instruction stream. They are relevant to detecting or diagnosing problems or other abnormal machine behavior during instruction stream execution. Summary of the Invention

[0006] An exemplary arrangement provides a data processing circuit comprising: a processing element configured to perform a processing activity; a tracking data register; and a tracking circuit configured to generate tracking data items indicative of the processing activity of the processing element and to store the tracking data items in the tracking data register; the tracking circuit including a detection circuit configured to detect conditions relating to the result of a given processing activity for which the tracking data items have been stored in the tracking data register and to selectively discard at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0007] In another example arrangement, a tracking device is provided, comprising: a tracking circuit for generating tracking data items indicating processing activities of a processing element and for storing the tracking data items in a tracking data register; the tracking circuit includes a detection circuit for detecting conditions relating to the result of a tracking data item being stored in the tracking data register for a given processing activity and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0008] In another example arrangement, a data processing circuit is provided, comprising: a processing means for performing a processing activity; means for storing tracking data; and a tracking means for generating tracking data items indicative of the processing activities of the processing means and for storing the tracking data items in the storage means; the tracking means includes a detection means for detecting conditions relating to the result of a given processing activity in which the tracking data items have been stored in the storage means and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0009] In another example arrangement, a tracking device is provided, comprising: tracking means for generating tracking data items indicative of processing activities of the processing device and for storing the tracking data items in the storage device; the tracking means includes a detection means for detecting conditions relating to the result of a given processing activity in which the tracking data items have been stored in the storage device and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0010] In another example arrangement, a method is provided, the method comprising: generating trace data items indicating processing activities of processing elements; storing the trace data items in a trace data register; detecting conditions relating to the results of a given processing activity for which the trace data items have been stored in the trace data register; and selectively discarding at least some of the stored trace data items relating to the given processing activity according to the detected conditions.

[0011] Further corresponding aspects and features of this technology are defined by the appended claims. Attached Figure Description

[0012] The present technology will be further described by way of example only with reference to embodiments illustrated in the accompanying drawings, in which: Figure 1 A schematic diagram of data processing equipment; Figure 2 The framing operation is illustrated schematically. Figure 3 A schematic diagram illustrating the tracking data buffer; Figure 4 A schematic diagram of a circular tracking data buffer; Figure 5 This is a schematic flowchart illustrating the data processing method. Figure 6 and Figure 7 schematic diagram Figure 5 Examples of the selected steps; Figure 8 The illustrations depict example steps related to the execution of interrupt handling. Figure 9 The illustration shows the storage and discarding of track data. Figure 10 and Figure 11 A schematic illustration of a circular buffer technique related to tracking data; Figure 12 and Figure 13 Provide illustrative examples of other data processing devices; and Figure 14 The illustrations depict example steps related to the execution of data transfer operations. Detailed Implementation

[0013] Before discussing embodiments with reference to the accompanying drawings, the following description of embodiments is provided.

[0014] An example embodiment provides a data processing circuit comprising: a processing element configured to perform a processing activity; a tracking data register; and a tracking circuit configured to generate tracking data items indicative of the processing activity of the processing element and to store the tracking data items in the tracking data register; the tracking circuit includes a detection circuit configured to detect conditions relating to the result of a given processing activity for which the tracking data items have been stored in the tracking data register, and to selectively discard at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0015] This technology recognizes that in systems that collect and store tracking data, the amount of data involved can be very large. This can lead to storage space being occupied by data and the need for processing to retrieve and dispose of the data. These technologies also recognize that sometimes it is not known whether the tracking data is useful until after it has been acquired and stored. Here, the term "useful" can, for example, indicate that the tracking data is related to a failure or abnormal operating condition. In these cases, this disclosure provides an arrangement in which tracking data concerning a given processing activity is stored, but the question of whether to subsequently discard the tracking data related to the given processing activity is anticipated, or such a question depends on the detection of conditions related to the outcome of the given processing activity. For example, if the given processing activity successfully and / or timely completes its operation, at least some of the tracking data related to that given processing activity can be discarded. If the detection indicates that the given processing activity has not successfully and / or timely completed its operation, the tracking data can be retained (not discarded). In this way, in the example, tracking data can be recorded in the event that the processing activity is operating abnormally, but the tracking data is only retained if subsequent detection indicates such abnormal behavior.

[0016] The embodiments of this disclosure can therefore provide for storing tracking data related to processing activities that result in the fulfillment of one or more specific conditions, while discarding other tracking data. These measures mitigate the problems discussed above.

[0017] In the example, the trace data buffer is a buffer with an associated order of data item storage and an indicator for indicating the next available storage location in the order of data item storage; and the detection circuitry is configured to discard stored trace data items related to a given processing activity by setting the indicator to indicate the storage location in the trace data buffer where the trace data item related to the given processing activity is stored as the next available storage location. Therefore, for example, stored trace data can be discarded by moving the indicator (e.g., a write pointer) back to a position within the stored trace data. While this may not immediately overwrite the discarded trace data, it means that the discarded trace data will be overwritten by the subsequently stored trace data.

[0018] It is possible to retain some trace data related to a processing activity for which a "discard" result has been detected. For example, the first or header portion of the trace data can be retained, for instance, to indicate to subsequent analysis that a given processing activity has been successfully completed, so that the trace data is no longer retained. To achieve this, an indicator or write pointer can be returned (as part of the discard process) to a position within the stored trace data for a given activity, rather than the first position (in the order of data item storage). However, in other examples, the detection circuitry is configured to discard all stored trace data items related to a given processing activity by setting the indicator to indicate the next available storage position as the first storage position where the trace data items related to the given processing activity are stored in the order of data item storage.

[0019] In the example, the detection circuitry is configured to store the current state of the indicator in response to the initiation of a processing activity. This allows the indicator to be returned to the stored state (ready to store trace data for the next processing activity) in response to the detection circuitry discarding the stored trace data for a given processing activity. In some examples, the detection circuitry is configured to discard all stored trace data items related to a given processing activity by setting the indicator value stored in response to the initiation of the given processing activity to indicate the next available storage location.

[0020] The trace data buffer can be a ring buffer, in which, when the indicator reaches a limit position in data item storage order, the indicator is adjusted such that the next available storage location is the earlier location in data item storage order. In some examples, the limit position is the last storage location in the trace data buffer, such that trace data related to a processing activity can occupy space until the end of the buffer before the ring buffer wraps around to the earlier location. However, in other examples, the limit position does not exceed a limit number of storage locations in data item storage order starting from the first storage location storing trace data items related to a given processing activity. In these examples, the amount of buffer space that can be occupied by trace data related to a single processing activity is limited to the limit number of storage locations. This prevents the buffer from being overfilled with trace data related to individual processing activities.

[0021] Regarding the looping operation of this ring buffer, in some examples, the first position (to which the indicator returns in response to reaching the limit position) can be the beginning of the buffer in the order of data item storage. However, in other examples, the first position (to which the indicator returns in response to reaching the limit position) is the first available storage position after the stored trace data items that have not been discarded by the detection circuitry in the order of data item storage. In this way, previously stored and not discarded trace data is retained while still allowing operation as a ring buffer. In the examples, the ring buffer simply becomes smaller as more and more trace data is retained (not discarded).

[0022] Various conditions related to the result of a given data processing operation can be detected. In the example, the detection circuit is configured to detect the time period since the initiation of the given processing activity as a condition. For example, the detection circuit can be configured to discard stored trace data items related to a given processing activity when the time period since the initiation of the given processing activity is less than a threshold time period when the given processing activity reaches a predetermined stage. Here, processing activities that take longer than the threshold time period prevent their trace data from being discarded, while processing activities that take less than the threshold time period cause their trace data to be discarded. In this way, for example by setting the threshold time period (or just above) the normal processing time for a given processing activity, abnormally slow processing activities can have their trace data retained, for example, making it possible to investigate the cause of slow operation. The "time period" can be expressed in terms of time, processing clock cycles, or another metric. The predetermined stage can be the completion of a given processing activity. An example of such a processing activity suitable for this arrangement is the handling of a processor interrupt.

[0023] In other examples, the detection circuitry is configured to discard stored trace data items associated with a given processing activity in response to a detection of successful completion of that activity. This provides for retaining trace data regarding processing activities that were not successfully completed.

[0024] In some examples, the processing element is configured to execute program instructions; and the processing activity involves the execution of a set of program instructions. However, the techniques used to generate and store trace data are not necessarily limited to the execution of data processing instructions. In some other examples, the processing element includes logic circuitry for performing logical operations; and the processing activity involves the execution of one or more logical operations. In some other examples, the processing element includes circuitry for transferring data from a source to a destination; and the processing activity involves data transfer operations.

[0025] Another example embodiment provides a tracking device, the tracking device comprising: a tracking circuit for generating tracking data items indicating processing activities of a processing element and for storing the tracking data items in a tracking data register; the tracking circuit including a detection circuit for detecting conditions relating to the result of a tracking data item being stored in the tracking data register for a given processing activity and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0026] Another example embodiment provides a data processing circuit, the data processing circuit including: a processing means for performing a processing activity; a means for storing tracking data; and a tracking means for generating tracking data items indicative of the processing activity of the processing means and for storing the tracking data items in the storage means; the tracking means includes a detection means for detecting conditions relating to the result of a given processing activity for which the tracking data items have been stored in the storage means and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0027] Another example embodiment provides a tracking device comprising: a tracking means for generating tracking data items indicative of processing activities of the processing means and for storing the tracking data items in the storage means; the tracking means includes a detection means for detecting conditions relating to the result of a given processing activity in which the tracking data items have been stored in the storage means and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0028] Another example embodiment provides a method comprising: generating a trace data item indicating a processing activity of a processing element; storing the trace data item in a trace data register; detecting a condition relating to the result of a given processing activity for which the trace data item is stored in the trace data register; and selectively discarding at least some of the stored trace data items relating to the given processing activity according to the detected condition.

[0029] Now refer to the attached diagram, Figure 1 The schematic diagram illustrates a data processing device or circuit 10 including a processor 20 connected to a memory 30. It can be... Figure 1 The arrangement (or at least processor 20) is implemented as a single integrated circuit or part of a single integrated circuit.

[0030] Processor 20 includes a processing element (such as a central processing unit or CPU) 40 with access to memory 30 (e.g., via cache memory, not shown) and a tracking device 50 in the form of an embedded tracking macrocell (ETM) 60 and framing circuitry 70. Optionally, tracking circuitry 42 may be provided within the processing element 40 to cooperate with the tracking device 50 to perform the functions of the tracking device. The tracking device is configured to generate and store tracking data items indicating the processing activities of the processing element.

[0031] As an example of a processing element configured to perform processing activities, processing element 40 executes an instruction stream.

[0032] The tracking device includes tracking circuitry for generating tracking data items that indicate the processing activities of the processing element and storing these tracking data items in a tracking data register. For example, tracking data may indicate the nature or identifier of instructions executed by the processing element, data values ​​that are effective and / or generated by the execution of those instructions, the state of one or more processor registers, the state and progress of data transfers, etc. These tracking data items are generated in response to the activities of the processing element, or in other words, simultaneously with the processing activities.

[0033] Although ETM 60 can include its own storage unit for tracking data, in this example, memory 30 serves as a temporary storage unit for tracking data. Tracking data items generated by ETM 60 can be in the form of individual bytes or words and are organized into groups or frames, for example, of 16 bytes, by framing circuitry 70 before being written to memory 30. Therefore, memory 30 provides an example of a temporary storage unit for tracking data.

[0034] Using the techniques described in more detail below, the tracking circuit includes detection circuitry 62 for detecting conditions relating to the result of a given processing activity in which a tracking data item has been stored in a tracking data register, and for selectively discarding at least some of the stored tracking data items relating to the given processing activity according to the detected conditions.

[0035] Optionally, the tracking data analyzer 80 may access stored tracking data in the memory 30, for example as post-processing applied after the processing activity that generates and stores the tracking data, to analyze the stored tracking data.

[0036] Figure 2The framing operation is illustrated schematically. As mentioned above, in this example, the framing circuitry assembles a specific number of bytes or words into groups, frames, or packets, such as 16 bytes of trace data. When each trace data item is generated by ETM 60, it is added to buffer 72 (such as a 16-byte buffer, or in other examples a buffer of size equal to 15 bytes plus the maximum possible byte size of the trace data item). When the buffer reaches at least 16 bytes of occupancy, the 16-byte frame or packet is written to memory 30 by the framing circuitry 70, and the buffer begins to be refilled again.

[0037] refer to Figure 2 The top line schematically shows three bytes 74 of trace data already assembled in buffer 72. The middle line schematically shows the latter case, where 16 bytes of trace data have been assembled in buffer 72, in response to which the framing circuit outputs a 16-byte packet or frame 76 to memory 30. A region of memory 30 may be reserved or otherwise allocated for use as a trace data temporary storage.

[0038] It should be understood that other grouping or frame sizes can be used.

[0039] Figure 3 The diagram schematically illustrates a trace data temporary register implemented as a region or area 300 of memory 30. Because trace data items are written to the trace data buffer by the trace circuit 50 and read from the trace data buffer by the analyzer 80 during normal operation, the trace data temporary register is referred to as a buffer.

[0040] As described above, data items are written frame by frame to the tracking data register by the framing circuit 70. They are written in a frame-by-frame order corresponding to the order in which the data items are stored. However, consider the combination of the tracking data register and the buffer 72 provided by the memory 30, which cooperate to provide the item-by-item order of data item storage. This is because the tracking data register in the memory 30 provides the frame-by-frame writing order and a "next frame to be written" position or pointer, and the buffer 72 provides the byte-by-byte writing order and a "next byte to be written" pointer 78. The combination of these two pointers can provide an implementation of an indicator or write pointer that indicates the position of the next data item according to the data item storage order.

[0041] The combination of two buffers provides an example of a trace data register arranged as a buffer, the buffer having an associated order of data item storage (as schematically shown by arrow 310) and an indicator or write pointer 320 for indicating the next available storage location in the order of data item storage. Using these techniques, newly generated trace data items will be stored at the next location in buffer 72 until the frame is completed, at which point the frame will be written at the next frame location in memory 30. Thus, the use of buffer 72 provides convenience because it reduces the number of accesses to memory 30, but in other respects, buffer 72 and the trace data register 300 in memory 30 cooperate to provide the function of a byte-by-byte buffer with a write order and a write pointer or indicator for indicating the next write location.

[0042] In the example, and using the technique described further below, the detection circuit is configured to discard stored trace data items related to a given processing activity by setting the indicator 320 to indicate the next available storage location in the trace data register where the stored trace data items related to a given processing activity are stored. In this way, although the trace data to be discarded is not necessarily deleted from the trace data register, the write pointer is set such that it is overwritten as the next generated trace data is written to the trace data register.

[0043] Figure 4 A circular trace data buffer is schematically illustrated, in which, when an indicator or write pointer 320 reaches a limit position in data item storage order, the indicator is adjusted such that the next available storage location is the earlier location in data item storage order. For example, the limit position could be the last storage location 330 in the trace data register, and the earlier location could be the first storage location in the trace data register (both relative to the data item storage order). In this way, when the trace data register becomes full, writes return to the earlier location in the trace data register, thereby overwriting the previously stored trace data.

[0044] In any example ( Figure 3 or Figure 4 In the tracking circuit 50, the framing circuit 70 or another part may be arranged to respond to the indicator or write pointer reaching the last position 330 by sending a message or command to the analyzer 80 to retrieve the stored tracking data from the tracking data register.

[0045] Figure 5 This is a schematic flowchart illustrating the data processing method.

[0046] At step 500, the processing element 40 performs a processing activity, such as a specific current (or "given") processing activity.

[0047] Step 510 involves circuit 50 generating trace data items that indicate the processing activity of the processing element and storing the trace data items in a trace data register (buffer 72 and memory region 300, working together as discussed above).

[0048] In the example, steps 500 and 510 cause the trace data to be stored non-continuously; instead, the storage of trace data for a processing activity begins in response to the initiation of that activity. Therefore, a processing activity can be considered in the example as a task or work item to be performed, having a start and (at least normally) an end. The start of a processing activity provides a trigger to begin saving the trace data. An example processing activity includes disposing of a processor interrupt. Here, the interrupt can act as both an initiation of a processing activity and a triggering event (to trigger the saving of the trace data). Alternatively, detection (by the ETM 60 of element 40 disposing of an interrupt (or a specific type of interrupt)) can form a triggering event. Thus, although the generation of trace data may be a continuous process or may begin in response to a trigger, the saving of trace data in the example is initiated by a triggering event that can be the start of a specific processing activity. The ETM 60 can maintain a list or table of the types of processing activities that trigger the saving of trace data when initiated. The processing activity itself can trigger the saving of trace data, or the ETM 60 can trigger the saving of trace data by detecting the start of that processing activity.

[0049] Step 520 involves detecting conditions relating to the results of a given processing activity for which a tracking data item has been stored in its tracking data register. An example of such detection will be discussed below.

[0050] Step 530 involves selectively discarding 540 (or not discarding 550) at least some of the stored tracking data items related to a given processing activity, according to the detected conditions.

[0051] Figure 6 and Figure 7 schematic diagram Figure 5 Examples of the selected steps are provided. In each case, an example version of step 520 (520', 520") is illustrated, and in each case, an example version of step 530 (530', 530") is illustrated.

[0052] exist Figure 6In step 520', the detection circuit is configured to detect the time period since the initiation of a given processing activity as a condition. This can be done, for example, by detecting the start time of step 521 (e.g., in time or clock cycles). Alternatively, the start time can be defined as "zero" at each instance of step 521, with the elapsed time subsequently counting upwards from there. Step 522 involves detecting the current or end time. For example, the current time can be detected, and (as discussed below) if it exceeds a threshold time period since the start time, abnormal behavior (and the reason for not discarding saved trace data) can be detected. This can be performed regardless of whether the processing activity has ended. Alternatively, the time at the end or completion of the processing activity, or at a predetermined stage within the processing activity, can be detected, and the time period since the start time can be detected. Again, if this exceeds the threshold time period, abnormal behavior (and the reason for not discarding saved trace data) can be detected as a result. At step 530', if either type of detection leads to the conclusion that the activity has taken longer than the threshold time period (regardless of whether the activity has ended), the saved trace data is not discarded. Otherwise, if the activity has been completed and less than a threshold time has elapsed, the saved tracking data is discarded. This provides an example of a detection circuit discarding stored tracking data items associated with a given processing activity when the time elapsed since the start of the given processing activity is less than a threshold time elapsed when the given processing activity reaches a predetermined stage.

[0053] Figure 7 This involves detecting whether the activity has been completed. Step 520 is provided through steps 523 and 524. In step 523, the start of the activity is detected (but if...). Figure 5 The tracking data is generated and stored for processing activities (in other words, activities that have started, which may be implicit throughout the process). At step 524, completion of the activity is detected. At step 530'', a successful completion detection indicates that the stored tracking data should be discarded; a lack of a successful completion indication does not require discarding the tracking data. This provides an example of a detection circuit discarding stored tracking data items associated with a given processing activity in response to a detection of successful completion of that activity. Thus, in this example, the predetermined stage is the completion of the given processing activity.

[0054] As Figure 6 In a specific example, steps 521' and 522' replace steps 521 and 522. At step 521', the time when the processor interrupt was initiated is detected. At step 522', the time period for handling the interrupt is detected. A completion time longer than a threshold time period indicates that trace data related to the handling of the interrupt should not be discarded.

[0055] Figure 9 This diagram illustrates the storage and discarding of tracked data. Figure 9Next to the four processing steps 900...930, there is a corresponding diagram indicating the occupancy of the tracking data buffer.

[0056] exist Figure 9 In the middle, steps 900 and 910 correspond to Figure 5 At least a functional part of step 510. At step 900, the current state of the storage indicator or write pointer (WP) 940 is stored, thus providing an example of the detection circuit being configured to store the current state of the indicator in response to the initiation of a processing activity. For example, register 64 can be used to store the WP value. Note that, as discussed above, WP can be provided as a combination of a byte pointer 78 associated with buffer 72 and a frame pointer associated with memory 30. These are in Figure 9 The value stored in the pointer 940 is shown as a single-byte pointer, and the current value is drawn in the dashed box 950.

[0057] Subsequently, at step 910, trace data is stored in data item storage order 310, starting from the initial WP position. Stored trace data relevant to the current processing activity is schematically shown by shaded box 960. WP is then located at the next data item position after the stored trace data 960.

[0058] Step 920 corresponds to Figure 5 Step 550. In order to retain (not discard) the stored tracking data corresponding to the activity, the stored WP value 950 is deleted and the WP remains in its latest position.

[0059] Step 930 corresponds to Figure 5 Step 540. To discard stored trace data, WP 940 is overwritten with the stored WP value 950. This allows the most recently stored trace data 960 to remain in the trace data register, but at a position relative to WP 940, it will be overwritten by the next stored trace data. Step 930 provides an example of detection circuitry configured to discard all stored trace data items related to a given processing activity by setting an indicator to indicate the first storage location where trace data items related to a given processing activity are stored in data item storage order as the next available storage location. More specifically, step 930 provides an example of detection circuitry configured to discard all stored trace data items related to a given processing activity by setting an indicator value stored in response to the initiation of a given processing activity as the next available storage location.

[0060] In an alternative arrangement, it may be possible to not actually discard all trace data stored for a given processing activity. For example, trace data may be in a format that includes an initial data item or header indicating the nature of the processing activity, followed (in storage order) by trace data relating to the handling of that interruption. In the case where trace data is discarded, it is certainly possible to discard all trace data including the initial or header portion. However, in other examples, it may be useful to retain the initial or header portion but discard the remaining trace data. This can indicate to analyzer 80 that an interruption of type X was (e.g.) successfully and / or timely handled, because the presence of no corresponding initial or header portion of the following trace data implies or indicates that subsequent trace data should be discarded, as the result of the condition detection indicates that this should be done. In general, this can provide analyzer 80 with an indication of the number or volume of events that were successfully and / or timely handled among “abnormal” events in which trace data was retained. In a possible implementation aspect, WP 940 serves as storage for stored value 950 ( Figure 9 Step 900 in the process can be arranged to occur after the initial or header portion of the trace data has been written, which subsequently allows Figure 9 The remainder of the process continues as described above. Alternatively, the write-back of WP at step 930 can actually write back "stored WP + 1" (or more generally, "stored WP + header size").

[0061] Figure 10 and Figure 11 The illustrations depict example circular buffering techniques related to tracking data. These are references above. Figure 4 The variant described on the ring buffer.

[0062] exist Figure 10 and Figure 11 In both cases, the "preceding position" around which the ring buffer surrounds is actually (in order 310) the position corresponding to the first data item position 1030 after the last stored, non-discarded tracking data item for the preceding processing activity. Therefore, the buffer is a ring buffer whose size effectively decreases as each non-discarded processing activity tracking dataset is stored and retained. Thus, in these examples, the preceding position is the first available storage location after the stored tracking data item that was not discarded by the detection circuitry, in the order of data item storage.

[0063] exist Figure 10In this example, the "limit position" to which the buffer wraps is not defined as the last position in the entire trace data buffer (in order 310), but is set to no more than a limit number of storage positions 1040 starting from position 1030. Therefore, when trace data 1010 is stored and reaches the data item position corresponding to the limit number (or the end of the buffer, or even earlier), the buffer wraps back to position 1030. This limits the amount of buffer occupied by trace data related to any single processing activity. Thus, in this example, the limit position, in order of data item storage, does not exceed a limit number of storage positions starting from the first storage position storing trace data items related to a given processing activity.

[0064] exist Figure 11 In the alternative arrangement shown, the extreme position is the end of the buffer (310 is the last storage position 330 in sequence).

[0065] As discussed, in Figure 1 In the example, the processing element is configured to execute program instructions; and the processing activity involves the execution of a group of program instructions. However, this technique is applicable to other examples. Figure 12 and Figure 13 Illustrative examples of other data processing devices are provided. Those already referenced are no longer shown. Figure 1 The part described. It can be... Figure 12 and Figure 13 The corresponding arrangement is implemented as a single integrated circuit or a part of a single integrated circuit.

[0066] exist Figure 12 In the example, the processing element includes logic circuitry 1200 for performing logic operations; the ETM is replaced by logic analyzer circuitry (e.g., on-chip logic analyzer) 1210 with associated memory (not shown), and the processing activity involves the execution of one or more logic operations.

[0067] exist Figure 13 In the example, the processing element includes a communication circuit 1300 for transferring data (schematically shown as 1320) from a source to a destination (one of which may be circuit 1300, or both may be other nodes, not shown), and the processing activity involves data transfer operations. The ETM is replaced by a trace generator 1310 with associated memory.

[0068] Figure 14 schematic diagram and Figure 13 The example demonstrates the data transfer operation performed in the example. Steps 521” and 522” are replaced with example steps. Figure 6Steps 521 and 522. At step 521'', the time when a data transfer, such as a bus transfer, is initiated is detected. At step 522'', the time period for processing the data transfer is detected. A completion time longer than a threshold period indicates that trace data related to the processing of the interruption should not be discarded.

[0069] In this application, the phrase "configured as..." is used to mean that the elements of the device have a configuration capable of performing the defined operations. In this context, "configuration" refers to the arrangement or manner of interconnection of hardware or software. For example, the device may have dedicated hardware that provides the defined operations, or a processor or other processing device (such as processing element 12) may be programmed to perform the function. "Configured as" does not imply that the device elements need to be changed in any way to provide the defined operations.

[0070] Although illustrative embodiments of the present technology have been described in detail herein with reference to the accompanying drawings, it should be understood that the present technology is not limited to those precise embodiments, and various changes, additions, and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the technology as defined by the appended claims. For example, various combinations of the features of the dependent claims can be made using the features of the independent claims without departing from the scope of the present technology.

Claims

1. A data processing circuit, including: A processing element configured to perform processing activities; A tracking data register has an associated order of data item storage and an indicator for indicating the position of the next data item as the next available storage location according to the data item storage order. as well as The tracking circuit is used for: Generate tracking data items indicating the processing activities of the processing element, each tracking data item including a header indicating the nature of the corresponding processing activity; and The tracking data items are stored in the tracking data buffer. The tracking circuit includes a detection circuit, the detection circuit being used for: Detect conditions relating to a given tracking data item being processed in relation to the result of a given processing activity for which it is stored in the tracking data register; as well as According to the conditions, by setting the indicator to indicate the previous storage location where the given tracking data item is stored after the header of the given tracking data item in the storage order of the data items as the next available storage location instead of the next data item location, at least some of the given tracking data items are selectively discarded and the header of the given tracking data item is retained.

2. The data processing circuit as described in claim 1, wherein, The detection circuit is configured to store the current state of the indicator in response to the initiation of a processing activity.

3. The data processing circuit as described in claim 2, wherein, The detection circuit is configured to discard the given tracking data item by setting the indicator to indicate the next available storage location by adding the indicator value stored in response to the initiation of the given processing activity to the size of the header of the given tracking data item.

4. The data processing circuit according to any one of claims 1 to 3, wherein, The tracking data buffer is a ring buffer in which, when the indicator reaches a limit position according to the data item storage order, the indicator is adjusted such that the next available storage position is the earlier position according to the data item storage order.

5. The data processing circuit as described in claim 4, wherein, The extreme position is the last storage position in the tracking data temporary register.

6. The data processing circuit as described in claim 4, wherein, The limit position is determined by the storage order of the data items, starting from the first storage location containing the tracking data items related to the given processing activity, and not exceeding the limit number of storage locations.

7. The data processing circuit according to any one of claims 1 to 3, wherein, The condition includes the time period since the initiation of the given processing activity.

8. The data processing circuit as described in claim 7, wherein, The condition includes a time period since the initiation of the given processing activity being less than a threshold time period when the given processing activity reaches a predetermined stage.

9. The data processing circuit as described in claim 8, wherein, The predetermined stage is the completion of the given processing activity.

10. The data processing circuit according to any one of claims 1 to 3, wherein, The detection circuit is configured to selectively discard at least some of the given tracking data items in response to the detection of successful completion of the given processing activity.

11. The data processing circuit according to any one of claims 1 to 3, wherein: The processing element is configured to execute program instructions; and The processing activity involves the execution of a group of program instructions.

12. The data processing circuit according to any one of claims 1 to 3, wherein: The processing element includes logic circuitry for performing logic operations; and The processing activity involves the execution of one or more logical operations.

13. The data processing circuit according to any one of claims 1 to 3, wherein: The processing element includes circuitry for transferring data from a source to a destination; and The processing activity involves data transfer operations.

14. Tracking equipment, including: A tracking circuit is provided for generating tracking data items that indicate the processing activities of a processing element and storing the tracking data items in a tracking data register. Each tracking data item includes a header indicating the nature of the corresponding processing activity. The tracking data register has an associated order of data item storage and an indicator for indicating the position of the next data item as the next available storage location according to the data item storage order. The tracking circuit includes a detection circuit, the detection circuit being used for: Detect conditions relating to a given tracking data item being processed in relation to the result of a given processing activity for which it is stored in the tracking data register; as well as According to the conditions, by setting the indicator to indicate the previous storage location where the given tracking data item is stored after the header of the given tracking data item in the storage order of the data items as the next available storage location instead of the next data item location, at least some of the given tracking data items are selectively discarded and the header of the given tracking data item is retained.

15. A data processing circuit, including: Processing apparatus for performing processing activities; A device for storing tracking data, the device for storing tracking data having an associated order of data item storage and an indicator for indicating the position of the next data item as the next available storage location according to the data item storage order; A tracking device for generating tracking data items that indicate the processing activities of the processing device, each tracking data item including a header indicating the nature of the corresponding processing activity; The tracking device includes a detection device, the detection device being used for: The detection relates to the conditions that a given tracking data item has been associated with the result of a given processing activity in the device for storing the tracking data; as well as According to the conditions, by setting the indicator to indicate the previous storage location where the given tracking data item is stored after the header of the given tracking data item in the storage order of the data items as the next available storage location instead of the next data item location, at least some of the given tracking data items are selectively discarded and the header of the given tracking data item is retained.

16. Tracking equipment, including: A tracking device for generating tracking data items indicating processing activities of a processing element and storing the tracking data items in a tracking data register, each tracking data item including a header indicating the nature of the corresponding processing activity, the tracking data register having an associated order of data item storage and an indicator for indicating the position of the next data item as the next available storage location according to the data item storage order. The tracking device includes a detection device, the detection device being used for: Detect conditions relating to a given tracking data item being processed in relation to the result of a given processing activity for which it is stored in the tracking data register; as well as According to the conditions, by setting the indicator to indicate the previous storage location where the given tracking data item is stored after the header of the given tracking data item in the storage order of the data items as the next available storage location instead of the next data item location, at least some of the given tracking data items are selectively discarded and the header of the given tracking data item is retained.

17. A method comprising: Perform processing activities; The tracking data is stored in the tracking data buffer, which contains the associated order of data item storage and an indicator for indicating the position of the next data item as the next available storage position according to the data item storage order. Generate trace data items indicating the processing activities of the processing circuitry, each trace data item including a header indicating the nature of the corresponding processing activity; Detect conditions relating to a given tracking data item being processed in relation to the result of a given processing activity for which it is stored in the tracking data register; as well as According to the conditions, by setting the indicator to indicate the previous storage location where the given tracking data item is stored after the header of the given tracking data item in the storage order of the data items as the next available storage location instead of the next data item location, at least some of the given tracking data items are selectively discarded and the header of the given tracking data item is retained.