Program Execution Time Estimation via Branch History
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for estimating the execution time of a program either result in long simulation times with accurate estimates or short simulation times with low accuracy, failing to balance precision and speed effectively.
Innovation Solution
The proposed method involves partitioning a program into partial programs using conditional branch instructions and function call instructions as boundaries, calculating their execution times, generating branch history bit sequences, and summing these times based on execution sequences to estimate the program's execution time accurately and efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If an instruction set simulator is used to estimate program execution time, then measurement precision is improved, but loss of time increases due to long simulation duration
Solution Approach 1:
The program is divided into multiple partial programs based on control flow structure (conditional branches, function calls, loops). Each partial program is executed and timed independently, then results are aggregated to estimate total execution time. This segmentation allows parallel execution of partial programs and avoids the need to simulate the entire program sequentially, thereby reducing total simulation time while maintaining accuracy through structured decomposition.
Solution Approach 2:
Instead of executing the complete program to obtain execution time estimates, only essential partial programs are executed. The method identifies and executes only the necessary computational paths based on control flow analysis, omitting redundant simulations. This partial action approach achieves sufficient estimation accuracy without the overhead of complete program simulation.
2Loss of time
If partial program execution is used to shorten simulation time, then loss of time is reduced, but measurement precision deteriorates
Solution Approach 1:
The program is systematically segmented into partial programs based on control flow boundaries (conditional branches, function calls, loops). This structured segmentation ensures that all execution paths are accounted for and can be recombined accurately. The segmentation maintains measurement precision by preserving the logical structure of the original program while enabling efficient partial execution.
Solution Approach 2:
The method uses control flow information (branch history, loop counts, function call patterns) as feedback to determine which partial programs to execute and how to aggregate their results. This feedback mechanism ensures that the partial execution results are correctly weighted and combined to produce an accurate total execution time estimate, preventing precision loss from incomplete sampling.
3Measurement precision
If the entire program is executed to obtain accurate execution time, then measurement precision is improved, but productivity decreases due to long processing time
Solution Approach 1:
The program is divided into independent partial programs that can be executed in parallel or selectively. This segmentation transforms a single long execution task into multiple shorter tasks, improving processing throughput and enabling parallel execution. The segmented approach maintains accuracy by ensuring all necessary execution paths are covered while significantly reducing total processing time.
Solution Approach 2:
The method performs preliminary control flow analysis to identify partial programs and their execution dependencies before actual execution. This preliminary action enables efficient scheduling and aggregation of partial program results, avoiding redundant executions and ensuring that only necessary partial programs are run. The preliminary structuring improves productivity by eliminating wasted execution time while preserving measurement accuracy.
Data Source
AI summary
An execution time estimation device includes a program partitioning section that extracts partial programs partitioned by a conditional branch instruction or a function call instruction from a target program, a partial program execution time estimation calculating section that calculates the execution time of each of the partial programs to associate the leading instruction and the end instruction of each of the partial programs, and the calculated execution time with one another, a branch history information generating section that generates a branch history bit sequence which is a sequence of the true-false of the conditional branch instruction of when the target program is executed, an execution trace reproducing section that generates the execution sequences of the partial programs based on the branch history bit sequence, and an execution time estimation calculating section that adds the execution time of the partial programs based on the execution sequences of the partial programs.


