Instruction Execution Frequency Measurement via Sampling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for measuring CPU performance, such as performance monitoring counters, impose a significant load on the CPU and may not accurately count the number of executions for specific instruction types, limiting their effectiveness in assessing CPU performance efficiently.

Innovation Solution

A method that calculates the percentage of instructions belonging to certain types within blocks of a program, extracts execution addresses and instruction counts from an arithmetic processing unit, and computes execution frequencies for each block type, allowing for the derivation of total execution frequencies across multiple blocks while maintaining a low CPU load.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If performance monitoring counters are used to count instruction executions, then the number of performance events can be counted, but the CPU load increases significantly

Engineering Contradiction:
Improveinstruction execution counting accuracyVSAvoidCPU load
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent uses software simulation to create a virtual copy of the CPU's instruction execution environment. Instead of directly monitoring hardware counters which increase CPU load, the system simulates instruction execution in a virtualized environment, capturing execution traces and reconstructing performance data without interfering with the actual CPU operation.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent introduces a performance monitoring software layer that acts as an intermediary between the CPU and the measurement system. This software layer captures execution information through sampling and simulation, processing data in a separate virtual environment rather than directly at the hardware level, thereby reducing CPU burden while maintaining measurement accuracy.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If trace or simulation methods are used to measure CPU performance, then instruction execution can be monitored, but the CPU load increases

Engineering Contradiction:
Improveperformance measurement accuracyVSAvoidCPU load
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies partial action by using sampling techniques to monitor only specific portions of CPU execution rather than continuously tracking all instructions. The system samples execution traces at strategic points and uses simulation to reconstruct performance metrics, achieving accurate measurements with minimal overhead compared to full-trace monitoring.

Inventive Principle:
Principle #16Partial or excessive action

3Quantity of substance

If performance monitoring counters are used, then total instruction executions can be obtained, but the ability to count specific instruction types is limited

Engineering Contradiction:
Improvetotal instruction countVSAvoidspecific instruction type counting capability
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent segments the instruction execution monitoring into finer granules by tracking individual instruction types within blocks of code. The system divides the program into basic blocks and monitors execution at the instruction level within each block, enabling precise counting of specific instruction types (such as arithmetic operations, data transfers, control instructions) while maintaining the ability to aggregate total execution counts.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10001992B2Method, information processing apparatus, and medium
Publication Date: 2018.06.19 FUJITSU LTD
  • US10001992B2 patent drawing
  • US10001992B2 patent drawing
  • US10001992B2 patent drawing

AI summary

A method includes: calculating a percentage of an instruction belonging to a certain instruction type among instruction types included in each of a plurality of blocks partitioned from a program; extracting an execution address and a number of execution instructions from an arithmetic processing unit that executes the program and performs sampling of the execution address and the number of execution instructions at a plurality of time points, calculating a first execution frequency of the instruction included in each of the plurality of blocks based on the extracted execution address and the number of execution instructions; calculating a second execution frequency of the instruction belonging to the instruction type by multiplying the first execution frequency of the block by the percentage of the instruction in the block; calculating total number of second execution frequencies calculated for each of the plurality of blocks.