Post-compile Object Code Instrumentation for Execution Trace Data

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional debugging tools are inadequate for correcting complex software issues in embedded systems, especially those without hardware trace facilities, as they require preprocessing and recompilation, leading to increased program size and execution slowdown, and limited visibility of execution behavior.

Innovation Solution

A method and system for automatically instrumenting object code post-compile time to generate trace data, using a linker or object code analyzer, which allows for simultaneous tracing of multiple address spaces and minimizes instrumentation overhead by recognizing architecture-specific addressing modes and using global program views.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If code is instrumented at compile time, then trace data can be generated, but program size increases and execution speed decreases

Engineering Contradiction:
Improveexecution visibilityVSAvoidexecution speed
Core Design Contradiction:
Loss of informationVSProductivity

Solution Approach 1:

The patent applies preliminary action by performing instrumentation at compile time, inserting trace generation code into the executable before runtime. This allows trace data to be captured during execution without requiring post-processing or external instrumentation, though it does increase program size and potentially slow execution.

Inventive Principle:
Principle #10Preliminary action

2Loss of information

If code is instrumented at compile time, then trace data can be generated, but build time increases significantly

Engineering Contradiction:
Improveexecution visibilityVSAvoidbuild time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The patent performs instrumentation as a preliminary action during the compilation process. The compiler inserts instrumentation code at designated points in the source code, and this instrumentation is integrated into the build process, requiring recompilation whenever source code changes occur.

Inventive Principle:
Principle #10Preliminary action

3Loss of information

If instrumentation is performed for multiple address spaces, then complete system behavior can be traced, but instrumentation complexity increases

Engineering Contradiction:
Improvesystem behavior visibilityVSAvoidinstrumentation complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent implements a universal instrumentation approach that can trace multiple address spaces and execution contexts simultaneously. The instrumentation framework is designed to work across different memory spaces, processor contexts, and execution environments, providing comprehensive system visibility through a unified tracing mechanism.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8266608B2Post-compile instrumentation of object code for generating execution trace data
Publication Date: 2012.09.11 GREEN HILLS SOFTWARE LLC
  • US8266608B2 patent drawing
  • US8266608B2 patent drawing
  • US8266608B2 patent drawing

AI summary

The invention is directed to instrumenting object code of an application and/or an operating system on a target machine so that execution trace data can be generated, collected, and subsequently analyzed for various purposes, such as debugging and performance. Automatic instrumentation may be performed on an application's object code before, during or after linking. A target machine's operating system's object code can be manually or automatically instrumented. By identifying address space switches and thread switches in the operating system's object code, instrumented code can be inserted at locations that enable the execution trace data to be generated. The instrumentation of the operating system and application can enable visibility of total system behavior by enabling generation of trace information sufficient to reconstruct address space switches and context switches.