Hardware counters to track utilization in a multithreading computer system
First Claim
1. A computer system, comprising:
- a configuration comprising a core configured to operate in a multithreading (MT) mode, the MT mode supporting multiple threads on shared resources of the core;
the core configured to perform a method comprising;
resetting a plurality of utilization counters, the utilization counters comprising a plurality of sets of counters including a first set of counters and a second set of counters, each set of counters corresponding to a different number of currently active threads and each set of counters non-overlapping with each other set of counters;
performing for each clock cycle on the core;
selecting a set of counters from the plurality of sets of counters, the selecting based on a number of currently active threads on the core and not based on which specific threads of the multiple threads are currently active, wherein the first set of counters is selected based on exactly one of the multiple threads being currently active, and the second set of counters is selected based on exactly two of the multiple threads being currently active; and
incrementing a counter in the selected set of counters, the incrementing based on an aggregation of one or more execution events at the multiple threads of the core; and
providing values of the utilization counters to a software program.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments relate tracking utilization in a multithreading (MT) computer system. According to one aspect, a computer system includes a configuration with a core configured to operate in a MT that supports multiple threads on shared resources of the core. The core is configured to perform a method that includes resetting a plurality of utilization counters. The utilization counters include a plurality of sets of counters. During each clock cycle on the core, a set of counters is selected from the plurality of sets of counters. The selecting is based on a number of currently active threads on the core. In addition, during each clock cycle a counter in the selected set of counters is incremented based on an aggregation of one or more execution events at the multiple threads of the core. Values of the utilization counters are provided to a software program.
146 Citations
13 Claims
-
1. A computer system, comprising:
-
a configuration comprising a core configured to operate in a multithreading (MT) mode, the MT mode supporting multiple threads on shared resources of the core; the core configured to perform a method comprising; resetting a plurality of utilization counters, the utilization counters comprising a plurality of sets of counters including a first set of counters and a second set of counters, each set of counters corresponding to a different number of currently active threads and each set of counters non-overlapping with each other set of counters; performing for each clock cycle on the core; selecting a set of counters from the plurality of sets of counters, the selecting based on a number of currently active threads on the core and not based on which specific threads of the multiple threads are currently active, wherein the first set of counters is selected based on exactly one of the multiple threads being currently active, and the second set of counters is selected based on exactly two of the multiple threads being currently active; and incrementing a counter in the selected set of counters, the incrementing based on an aggregation of one or more execution events at the multiple threads of the core; and providing values of the utilization counters to a software program. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer program product for tracking utilization in a configuration comprising a core configured to operate in a multithreading (MT) mode, the MT mode supporting multiple threads on shared resources of the core, the computer program product comprising:
-
a computer readable storage medium having program instructions embodied therewith, wherein the computer readable storage medium is not a signal, the program instructions readable by a processing circuit to cause the processing circuit to perform a method comprising; resetting a plurality of utilization counters, the utilization counters comprising a plurality of sets of counters including a first set of counters and a second set of counters, each set of counters corresponding to a different number of currently active threads and each set of counters non-overlapping with each other set of counters; performing for each clock cycle on the core; selecting a set of counters from the plurality of sets of counters, the selecting based on a number of currently active threads on the core and not based on which specific threads of the multiple threads are currently active, wherein the first set of counters is selected based on exactly one of the multiple threads being currently active, and the second set of counters is selected based on exactly two of the multiple threads being currently active; and incrementing a counter in the selected set of counters, the incrementing based on an aggregation of one or more execution events at the multiple threads of the core; and providing values of the utilization counters to a software program. - View Dependent Claims (9, 10, 11, 12, 13)
-
Specification