Relocatable Debugging Entries Reduce Compile Time

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current compilers spend excessive time regenerating debugging information even for small changes in source code, leading to longer compile times, especially in debug-builds where Debugging with Attributed Record Formats (DWARF) information is fully regenerated for each module unit.

Innovation Solution

Implementing relocatable debugging information entries (Rel-DIEs) and relocation information tables allows compilers to reuse unchanged debugging information, merging and resolving only changes in the debugging information entries to generate relocated Debugging with Attributed Record Formats information efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If debugging information is fully regenerated for each module unit, then debugging information completeness is improved, but compile time increases

Engineering Contradiction:
Improvedebugging information completenessVSAvoidcompile time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments debugging information into relocatable debugging information entries (Rel-DIEs) that can be independently processed. Each Rel-DIE contains debugging information for a specific function or code section, allowing selective regeneration only for changed portions rather than regenerating all debugging information for the entire module unit.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by generating relocatable debugging information entries with placeholder relocation information during compilation. These Rel-DIEs are prepared in advance with the understanding that their final positions will be determined later through a relocation process, allowing the compilation to proceed without waiting for complete position resolution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 3:

The patent introduces relocation information tables as an intermediary mechanism between the compilation process and final debugging information generation. These tables store mapping information that connects Rel-DIEs to their final positions in the object file, allowing the compiler to separate the generation of debugging information from its final placement and resolution.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If debugging information is regenerated for every change, then debugging accuracy is improved, but build efficiency deteriorates

Engineering Contradiction:
Improvedebugging accuracyVSAvoidbuild efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies local quality by making debugging information generation localized to specific changed functions or code sections. When source code changes occur, only the Rel-DIEs corresponding to those specific changes are regenerated, while unchanged debugging information is preserved from previous compilations, maintaining debugging accuracy where needed while improving overall build efficiency.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent discards only the specific relocatable debugging information entries that correspond to changed source code portions, while recovering and reusing unchanged Rel-DIEs from previous compilation sessions. This selective discarding and recovery approach maintains debugging accuracy for modified code while preserving efficient reuse of unchanged debugging information.

Inventive Principle:
Principle #34Discarding and recovering

3Ease of operation

If complete debugging information is generated, then source-level debugging capability is improved, but incremental build time increases

Engineering Contradiction:
Improvesource-level debugging capabilityVSAvoidincremental build time
Core Design Contradiction:
Ease of operationVSDuration of action of moving object

Solution Approach 1:

The patent segments complete debugging information into individual relocatable debugging information entries (Rel-DIEs) that can be independently managed, copied, and merged. This segmentation allows incremental builds to selectively process only the Rel-DIEs corresponding to changed source code, maintaining full source-level debugging capability while reducing incremental build time by avoiding regeneration of unchanged entries.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent merges copied Rel-DIEs from unchanged source code portions with newly generated Rel-DIEs from changed portions to create complete debugging information for the entire module unit. This merging process preserves source-level debugging capability by combining both reused and newly generated debugging entries into a unified debugging information structure.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11615014B2Using relocatable debugging information entries to save compile time
Publication Date: 2023.03.28 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11615014B2 patent drawing
  • US11615014B2 patent drawing
  • US11615014B2 patent drawing

AI summary

Provided are techniques for using relocatable debugging information entries to save compile time when there are changes to source code. While compiling source code, for an unchanged function, a copy is made of a relocatable debugging information entries table and of a relocation information table. In addition, for a changed function, a new relocatable debugging information entries table and a new relocation information table are generated. The copy of the relocatable debugging information entries table and the new relocatable debugging information entries table are merged. The copy of the relocation information table and the new relocation information table are merged. The relocatable debugging information entries in the merged relocatable debugging information entries table are resolved according to information in the merged relocation information table to generate relocated Debugging with Attributed Record Formats information, which is stored in an object file that corresponds to the source code.