Post-compile Object Code Instrumentation for Execution Trace Data
Find Innovative SolutionsGenerate 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
Engineering 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
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.
2Loss of information
If code is instrumented at compile time, then trace data can be generated, but build time increases significantly
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.
3Loss of information
If instrumentation is performed for multiple address spaces, then complete system behavior can be traced, but instrumentation complexity increases
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.
Data Source
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.


