Task-Specific Performance Monitoring via Callback Counter Logging
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current performance monitoring units (PMU) in processors can only determine the total number of events occurring in a given time period, failing to provide precise information on the occurrences of specific tasks during that time.
Innovation Solution
A computer system with a performance monitoring unit (PMU) that provides a callback function at task switches, resets and reads counters, and records values into a log to analyze task performance over a predetermined time period, allowing for precise determination of external access performance for each task.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional PMU counters are used to monitor events in a given time period, then the total number of events can be accumulated and reported, but precise information regarding occurrences of specific tasks cannot be determined
Solution Approach 1:
The patent segments the monitoring process by dividing it into task-specific counter instances. Each task gets its own counter that is reset when the task starts and read when the task ends. This segmentation allows precise measurement of each task's performance without requiring complex per-task configuration in the PMU hardware itself.
Solution Approach 2:
The patent introduces an intermediary software layer (callback functions and logging mechanism) between the PMU hardware and the performance analysis. This intermediary manages the reset and read operations of counters, associates them with specific tasks, and stores the data in logs, thereby enabling task-specific measurement without complicating the hardware.
2Loss of information
If counters are reset and read at every task switch to track specific task performance, then precise task occurrence information can be obtained, but the complexity of managing counter operations increases
Solution Approach 1:
The system uses callback functions that are automatically triggered at task switches. These callback functions self-manage the counter reset and read operations, eliminating the need for external intervention or complex scheduling logic. The logging mechanism also automatically associates counter values with the appropriate task identifiers.
Solution Approach 2:
The patent prepares counter instances in advance for each task before execution begins. When a task starts, its pre-configured counter is automatically reset, and when the task ends, the corresponding counter is read. This preliminary preparation simplifies the runtime management of counters.
3Measurement precision
If multiple counters are maintained for multiple tasks to enable individual task analysis, then task-specific performance data can be collected, but the resource consumption and system overhead increase
Solution Approach 1:
The patent creates counter instances that are universal in structure but specialized in function. Each counter instance is a simplified version of the PMU counter that is dedicated to a single task, allowing the system to maintain multiple task-specific counters without requiring full PMU complexity for each. This multi-functionality enables precise task-specific measurement while keeping individual counter resources lightweight.
Data Source
AI summary
Computer system including storage unit and processing unit including performance monitoring unit (PMU) for performance monitoring on tasks is provided. Processing unit is configured to provide a callback function at location at which a task switch is being performed, reset a counter for external access counting of PMU when first task switch which is to switch execution of tasks to first task occurs, read counted value from counter and record read value into a log of storage unit as record of first task when second task switch which is to switch execution of tasks from first task to second task occurs, and reset counter for second task after log is generated. Records of first task in log within a predetermined time period are summed to analyze performance of first task within predetermined time period so as to determine performance of external access of first task for specific event.


