Method and Apparatus for Synthesizing Hardware Counters from Performance Sampling
First Claim
1. A computer-implemented method, comprising:
- a hardware counter counting to a predetermined value;
in response to the hardware counter reaching the predetermined value, collecting data corresponding to a runtime event;
determining if the runtime event is of a given event type; and
in response to determining that the runtime event is of the given event type, incrementing a synthesized counter configured to monitor events of the given event type, wherein the synthesized counter is implemented as a storage location in machine addressable memory.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for performance monitoring may use data collected from a hardware event agent comprising a hardware sampling mechanism and/or one or more hardware counters to increment one or more synthesized performance counters by an amount dependent on an expression involving the collected data. Each synthesized performance counter may be configured to count events of a different type and may comprise a machine addressable storage location. The event types may include various memory references or misses, branches, branch mispredictions, or any other event of interest in performance monitoring. The hardware event agent may comprise one or more instruction counters, cycle counters, timers, or other hardware performance counters. One hardware performance counter may be used in a time-multiplexed or data-multiplexed manner to monitor events of multiple event types. The hardware sampling mechanism may return a statistical packet for sampled instructions, which may be examined to determine the event type.
-
Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
a hardware counter counting to a predetermined value; in response to the hardware counter reaching the predetermined value, collecting data corresponding to a runtime event; determining if the runtime event is of a given event type; and in response to determining that the runtime event is of the given event type, incrementing a synthesized counter configured to monitor events of the given event type, wherein the synthesized counter is implemented as a storage location in machine addressable memory. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer system, comprising:
-
a processor comprising a hardware event agent; and a memory comprising program instructions executable by the processor; wherein the program instructions are configured to implement; a plurality of software counters, each configured to monitor events of a different event type; and a software event agent; wherein the hardware event agent comprises a hardware counter; and
wherein the hardware event agent is configured to;collect data corresponding to a runtime event in response to an overflow or underflow of the hardware counter; wherein the software event agent is configured to; determine an event type of the runtime event dependent on the collected data; determine if one of the plurality of software counters is configured to monitor events of the determined event type; and in response to determining that one of the plurality of software counters is configured to monitor events of the determined event type, increment the one of the plurality of software counters. - View Dependent Claims (13, 14, 15, 16)
-
-
17. A computer-readable storage medium comprising program instructions computer-executable to implement a plurality of software counters each configured to count events of a different event type, and a software event agent;
wherein the software event agent is configured to; receive information about a runtime event from a hardware event agent in response to the hardware event agent detecting an overflow or an underflow of a hardware event counter, a hardware instruction counter, a hardware cycle counter, or a hardware timer; determine an event type of the runtime event dependent on the received information; determine if one of the plurality of software counters is configured to monitor events of the determined event type; and in response to determining that one of the plurality of software counters is configured to monitor events of the determined event type, increment the one of the plurality of software counters. - View Dependent Claims (18, 19, 20)
Specification