Kernel subsystem for handling performance counters and events
AssigneeRed Hat, Inc.
InventorsIngo Molnar, Thomas Gleixner
Life of this patent
Estimating the term…
Abstract
A system for handling performance counters and events includes an operating system that receives a request of a first application for performance data associated with a type of event to be performed by a second application, causes a hardware counter pertaining to the event type to be activated, and provides a file descriptor corresponding to the hardware counter to the first application. The operating system then receives a second request of the first application for a value of the hardware counter, where the second request includes the file descriptor, and provides the value of the hardware counter to the first application.
Claims22
A method, implemented by a computing system programmed to perform the following, comprising:
- receiving, by an operating system of the computing system, a first request of a first application for performance data associated with a type of event to be performed by a second application;
- causing, by the operating system, a hardware counter pertaining to the event type to be activated;
- providing, by the operating system, a file descriptor corresponding to the hardware counter to the first application;
- receiving, by the operating system, a second request of the first application for a value of the hardware counter, the second request including the file descriptor;
- and
- providing, by the operating system, the value of the hardware counter to the first application.
A method, implemented by a computing system programmed to perform the following, comprising:
- receiving, by an operating system of the computing system, a first request of a first application for task data associated with a type of event, the first request specifying a task to be performed by a second application;
- causing, by the operating system, a first hardware counter pertaining to the event type to be activated, the first hardware counter being on a first processor;
- tracking, by the operating system, a migration of the task from the first processor to a second processor;
- causing, by the operating system, a second hardware counter pertaining to the event type to be activated, the second hardware counter being on the second processor;
- and
- after the task is completed, returning a cumulative value of the first hardware counter and the second hardware counter to the first application.
A computer readable storage medium including instructions that, when executed by a computing system, cause the computing system to perform a set of operations comprising:
- receiving, by an operating system of the computing system, a first request of a first application for performance data associated with a type of event to be performed by a second application;
- causing, by the operating system, a hardware counter pertaining to the event type to be activated;
- providing, by the operating system, a file descriptor corresponding to the hardware counter to the first application;
- receiving, by the operating system, a second request of the first application for a value of the hardware counter, the second request including the file descriptor;
- and
- providing, by the operating system, the value of the hardware counter to the first application.
A system comprising:
- a memory;
- at least one processor, coupled to the memory;
- and
- a kernel performance counter and event (PCE) subsystem, executed from the memory by the processor, to
- receive a first request of a first application for performance data associated with a type of event to be performed by a second application,
- cause a hardware counter pertaining to the event type to be activated,
- provide a file descriptor corresponding to the hardware counter to the first application,
- receive a second request of the first application for a value of the hardware counter, the second request including the file descriptor, and
- provide the value of the hardware counter to the first application.
Dependencies are inferred from the claim text.