IP Library Granted Patent US 11,921,611
Granted Patent B2
US 11,921,611 · App. 17/571,373 · Granted Mar 5, 2024

Synchronous hardware event collection

Inventors: Thomas Norrie (Mountain View, CA); Naveen Kumar (San Jose, CA)
Assignee: Google LLC
G06F11/3466G06F9/542G06F11/302G06F11/3495G06F11/3612G06F11/348G06F2201/86G06F2201/865
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,921,611
App. No.
17/571,373
Granted
Mar 5, 2024
Kind
B2
Abstract

A computer-implemented method that includes monitoring execution of program code by first and second processor components. A computing system detects that a trigger condition is satisfied by: i) identifying an operand in a portion of the program code; or ii) determining that a current time of a clock of the computing system indicates a predefined time value. The operand and the predefined time value are used to initiate trace events. When the trigger condition is satisfied the system initiates trace events that generate trace data identifying respective hardware events occurring across the computing system. The system uses the trace data to generate a correlated set of trace data. The correlated trace data indicates a time ordered sequence of the respective hardware events. The system uses the correlated set of trace data to analyze performance of the executing program code.

Claims (65)

1. A method, comprising:

executing a sequence of program code to perform operations using components of a processor, each component of the components having a time counter indicating a time value, wherein each time counter comprises a respective offset bit used for compensating phase variations between the time counters while performing the operations, wherein the sequence of program code comprises a first time parameter as a trigger condition for triggering a trace event across two or more components of the processor while performing the operations, and wherein one of the time counters is selected as a global time counter;

determining a global time value represented by the global time counter;

updating, based on the global time value, at least the time value represented by a corresponding time counter that is not selected as the global time counter using the respective offset bit;

determining, by comparing the time value against the first time parameter in the sequence of program code, if the trigger condition is satisfied;

in response to determining that the trigger condition is satisfied, triggering the trace event to generate event data for the two or more of the components of the processor; wherein the event data is synchronized based on the global time value; and

providing the event data to a host used to analyze the performance of the sequence of program code.

2. The method of claim 1 , wherein updating, based on the global time value, at least the time value represented by a corresponding time counter that is not selected as the global time counter using the respective offset bit comprises:

broadcasting the global time value represented by the global time counter to the corresponding time counter that is not selected as the global time counter;

computing a difference between the time value represented by the corresponding time counter and the global time value; and

adjusting the corresponding time counter, using the respective offset bit, to decrease the difference.

3. The method of claim 1 , wherein each time counter comprises a fixed-size binary data, the fixed-size binary data comprising a multi-bit counter and the respective offset bit, wherein the respective offset bit comprises four bits.

4. The method of claim 1 , wherein the sequence of program code further comprises a second time parameter;

wherein the second time parameter indicates a later time than the first time parameter; and

wherein the trigger condition comprises a predefined time window comprising a start time for triggering the trace event based on the first time parameter, and an end time for stopping the trace event based on the second time parameter.

5. The method of claim 1 , wherein each component of the components comprises one or more performance counters configured to collect count data for analyzing the performance of the sequence of program code, the one or more performance counters comprising at least one of an activity counter, a stall counter, a statistical counter, or a sampling counter.

6. The method of claim 1 , wherein the one or more performance counters configured to collect count data comprises:

collecting the count data that comprises at least one of instruction tracing event data, memory mux tracing event data, or direct memory access event data; and

storing the count data in one or more count registers or control/status registers.

7. The method of claim 5 , wherein:

a subset of the event data describes one or more memory access operations that are executed by the processor; and

the one or more memory access operations comprises moving vector elements from a first memory of a first component to a second memory of a second component of the processor.

8. An event collection system for collecting event data, the system comprising:

one or more processing devices; and

one or more non-transitory machine-readable storage devices for storing instructions that are executable by the one or more processing devices to cause performance of operations comprising:

executing a sequence of program code to perform operations using components of a processor, each component of the components having a time counter indicating a time value, wherein each time counter comprises a respective offset bit used for compensating phase variations between the time counters while performing the operations, wherein the sequence of program code comprises a first time parameter as a trigger condition for triggering a trace event across two or more components of the processor while performing the operations, wherein one of the time counters is selected as a global time counter;

determining a global time value represented by the global time counter;

updating, based on the global time value, at least the time value represented by a corresponding time counter that is not selected as the global time counter using the respective offset bit;

determining, by comparing the time value against the first time parameter in the sequence of program code, if the trigger condition is satisfied;

in response to determining that the trigger condition is satisfied, triggering the trace event to generate event data for the two or more of the components of the processor; wherein the event data is synchronized based on the global time value; and

providing the event data to a host used to analyze the performance of the sequence of program code.

9. The system of claim 8 , wherein updating, based on the global time value, at least the time value represented by a corresponding time counter that is not selected as the global time counter using the respective offset bit comprises:

broadcasting the global time value represented by the global time counter to the corresponding time counter that is not selected as the global time counter;

computing a difference between the time value represented by the corresponding time counter and the global time value; and

adjusting the corresponding time counter, using the respective offset bit, to decrease the difference.

10. The system of claim 8 , wherein each time counter comprises a fixed-size binary data, the fixed-size binary data comprising a multi-bit counter and the respective offset bit, wherein the respective offset bit comprises four bits.

11. The system of claim 8 , wherein the sequence of program code further comprises a second time parameter;

wherein the second time parameter indicates a later time than the first time parameter; and

wherein the trigger condition comprises a predefined time window comprising a start time for triggering the trace event based on the first time parameter, and an end time for stopping the trace event based on the second time parameter.

12. The system of claim 8 , wherein each component of the components comprises one or more performance counters configured to collect count data for analyzing the performance of the sequence of program code, the one or more performance counters comprising at least one of an activity counter, a stall counter, a statistical counter, or a sampling counter.

13. The system of claim 8 , wherein the one or more performance counters configured to collect count data comprises:

collecting the count data that comprises at least one of instruction tracing event data, memory mux tracing event data, or direct memory access event data; and

storing the count data in one or more count registers or control/status registers.

14. The system of claim 12 , wherein:

a subset of the event data describes one or more memory access operations that are executed by the processor; and

the one or more memory access operations comprises moving vector elements from a first memory of a first component to a second memory of a second component of the processor.

15. One or more non-transitory computer-readable storage media storing instructions that are executable by one or more processing devices to cause performance of operations for collecting event data, the operations comprising:

executing a sequence of program code to perform operations using components of a processor, each component of the components having a time counter indicating a time value, wherein each time counter comprises a respective offset bit used for compensating phase variations between the time counters while performing the operations, wherein the sequence of program code comprises a first time parameter as a trigger condition for triggering a trace event across two or more components of the processor while performing the operations, wherein one of the time counters is selected as a global time counter;

determining a global time value represented by the global time counter;

updating, based on the global time value, at least the time value represented by a corresponding time counter that is not selected as the global time counter using the respective offset bit;

determining, by comparing the time value against the first time parameter in the sequence of program code, if the trigger condition is satisfied;

in response to determining that the trigger condition is satisfied, triggering the trace event to generate event data for the two or more of the components of the processor; wherein the event data is synchronized based on the global time value; and

providing the event data to a host used to analyze the performance of the sequence of program code.

16. The storage media of claim 15 , wherein updating, based on the global time value, at least the time value represented by a corresponding time counter that is not selected as the global time counter using the respective offset bit comprises:

broadcasting the global time value represented by the global time counter to the corresponding time counter that is not selected as the global time counter;

computing a difference between the time value represented by the corresponding time counter and the global time value; and

adjusting the corresponding time counter, using the respective offset bit, to decrease the difference.

17. The storage media of claim 15 , wherein each time counter comprises a fixed-size binary data, the fixed-size binary data comprising a multi-bit counter and the respective offset bit, wherein the respective offset bit comprises four bits.

18. The storage media of claim 15 , wherein the sequence of program code further comprises a second time parameter;

wherein the second time parameter indicates a later time than the first time parameter; and

wherein the trigger condition comprises a predefined time window comprising a start time for triggering the trace event based on the first time parameter, and an end time for stopping the trace event based on the second time parameter.

19. The storage media of claim 15 , wherein each component of the components comprises one or more performance counters configured to collect count data for analyzing the performance of the sequence of program code, the one or more performance counters comprising at least one of an activity counter, a stall counter, a statistical counter, or a sampling counter.

20. The storage media of claim 15 , wherein the one or more performance counters configured to collect count data comprises:

collecting the count data that comprises at least one of instruction tracing event data, memory mux tracing event data, or direct memory access event data; and

storing the count data in one or more count registers or control/status registers.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED AT REEL: 058612 FRAME: 0868. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT . Recorded Jan 20, 2022
From: NORRIE, THOMAS; KUMAR, NAVEEN
To: GOOGLE INC.
Reel/Frame 058786/0508 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 10, 2022
From: NORRIE, THOMAS; KUMAR, NAVEEN
To: GOOGLE LLC
Reel/Frame 058612/0868 →
CHANGE OF NAME Recorded Jan 10, 2022
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 058685/0676 →
Continuity (3)
Continuation 16520558 · Jul 24, 2019
Continuation 15472932 · Mar 29, 2017
Related Publication 20220129364A1 · Apr 28, 2022