Binary Function Ordering via Call Tree Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for generating executable binary code from source code do not optimize function order based on execution time, leading to inefficient resource usage and increased execution time.

Innovation Solution

A method that analyzes a test executable binary to generate a code call tree with call durations, determines a function order, and uses this information to create a call tree order map, resulting in a call tree ordered executable binary that optimizes function arrangement for efficient execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If functions are arranged in source code order without optimization, then the compilation process is simple, but execution time and resource usage increase

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcompilation process complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies preliminary action by analyzing the test executable binary and generating a code call tree with call durations before creating the final optimized binary. This pre-analysis and pre-ordering of functions based on execution frequency and call patterns reduces execution time in the final binary, while confining the complexity to the compilation phase only.

Inventive Principle:
Principle #10Preliminary action

2Loss of time

If functions are reordered based on call tree analysis, then execution time decreases, but the compilation and linking process becomes more complex

Engineering Contradiction:
Improveexecution timeVSAvoidlinking process complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent segments the compilation process into distinct phases: generating a code call tree from the test binary, analyzing call durations and patterns, determining function order, creating a call tree order map, and finally linking with the reordered functions. This segmentation allows the complex analysis to be performed once during compilation, while the execution phase benefits from the optimized ordering without incurring ongoing complexity.

Inventive Principle:
Principle #1Segmentation

3Use of energy by moving object

If standard compilation is used, then the process is straightforward, but cache misses increase and resource usage is inefficient

Engineering Contradiction:
Improveresource usage efficiencyVSAvoidcompilation method complexity
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The patent changes the ordering parameter of functions in the binary from source code order to call-tree-based order determined by execution frequency and call patterns. This parameter change optimizes cache utilization and resource usage during execution, while the complexity of determining this optimal ordering is confined to the compilation phase through automated analysis of the test binary.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9213532B2Method for ordering text in a binary
Publication Date: 2015.12.15 ORACLE INT CORP
  • US9213532B2 patent drawing
  • US9213532B2 patent drawing
  • US9213532B2 patent drawing

AI summary

In general, in one aspect, embodiments of the invention relate to a method for generating executable binary. The method includes analyzing a test executable binary generated from source code, wherein the source code comprises a plurality of functions, generating, based on analyzing the test executable binary, a code call tree comprising a plurality of call durations for the plurality of functions, and determining, using the code call tree, a function order of the plurality of functions. The method further includes generating, using the function order, a call tree order map, generating a call tree ordered executable binary using the source code and the call tree order map, and executing the call tree ordered executable binary on a processor.