Post-Compile Object Code Instrumentation for 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 ports, leading to increased program size and execution slowdown due to instrumentation, and inefficient debugging processes.
Innovation Solution
Automatic instrumentation of object code post-compile time, using a linker or object code analyzer, to generate trace data, allowing for simultaneous tracing of multiple address spaces and minimizing instrumentation overhead by recognizing architecture-specific addressing modes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If instrumentation is performed at compile time to generate trace data, then debugging visibility is improved, but build times increase and program size increases
Solution Approach 1:
The patent performs instrumentation at link time rather than compile time, preparing the object code in advance with trace generation capability. The linker automatically inserts minimal instrumentation code that generates trace data during execution, avoiding the need for recompilation while maintaining debugging visibility. This preliminary preparation of object code resolves the contradiction by enabling trace capability without extending build times.
2Loss of information
If instrumentation is performed at compile time to generate trace data, then debugging visibility is improved, but program size increases
Solution Approach 1:
The patent extracts only the essential trace generation functionality from the compilation process and implements it at link time. By using the linker to insert minimal instrumentation code rather than full compile-time instrumentation, the solution obtains debugging visibility while adding only the necessary trace generation instructions to the object code, thus minimizing program size increase.
3Loss of information
If multiple versions of software system are maintained for instrumentation management, then debugging capability is improved, but device complexity increases
Solution Approach 1:
The patent makes the linker multi-functional by enabling it to perform both its traditional linking function and the additional function of automatic instrumentation for trace generation. This universal approach eliminates the need for separate instrumentation tools and multiple software versions, as the linker itself handles trace code insertion automatically, thereby reducing system management complexity while maintaining debugging capability.
4Loss of information
If instrumentation code is inserted to generate trace data, then execution visibility is improved, but execution speed decreases
Solution Approach 1:
The patent applies local quality by inserting instrumentation code only at specific strategic points determined by the linker, rather than uniformly throughout the program. This selective instrumentation approach maintains execution visibility by capturing essential trace data at key locations while minimizing the overall impact on execution speed by avoiding excessive instrumentation in performance-critical paths.
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.


