Sharing between translation units in C++ program databases

  • Authors:
  • Samuel C. Kendall;Glenn Allin

  • Affiliations:
  • Sun Microsystems Laboratories, Inc., Chelmsford, MA;CenterLine Software, Inc., Cambridge, MA

  • Venue:
  • CTEC'94 Proceedings of the 6th conference on USENIX Sixth C++ Technical Conference - Volume 6
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

A C++ program database represents information about C++ code, typically to enable program browsing or debugging. Such databases can grow very large. The growth is fundamentally due to the translation unit (TU) program structure C++ inherited from C: a naively designed data-base will consist largely of representations of redundant or unused code from header files. This paper measures the effect of some techniques for shrinking this naively designed data-base: the elision of unused entities from a TU, and the sharing or linking (generically, the combination) of redundant entities across TUs. We also measure the overhead imposed by the segregation of class types with external linkage from those with internal linkage. We define and measure these techniques for our own database, which was designed with very specific requirements. We also discuss techniques and organizations used in other program databases to save space: sharing at header file granularity; ruthless simplification of the data-base; and lazy loading of data into the database. Finally, we note the potential problems associated with independently implemented translators feeding into the same database.