Reducing program image size by extracting frozen code and data

  • Authors:
  • Daniel Citron;Gadi Haber;Roy Levin

  • Affiliations:
  • IBM Haifa Labs, Haifa, Israel;IBM Haifa Labs, Haifa, Israel;IBM Haifa Labs, Haifa, Israel

  • Venue:
  • Proceedings of the 4th ACM international conference on Embedded software
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Constraints on the memory size of embedded systems require reducing the image size of executing programs. Common techniques include code compression and reduced instruction sets. We propose a novel technique that eliminates large portions of the executable image without compromising execution time (due to decompression) or code generation (due to reduced instruction sets). Frozen code and data portions are identified using profiling techniques and removed from the loadable image. They are replaced with branches to code stubs that load them in the unlikely case that they are accessed. The executable is sustained in a runnable mode.Analysis of the frozen portions reveals that most are error and uncommon input handlers. Only a minority of the code (less than 1%) that was identified as frozen during a training run, is also accessed with production datasets.The technique was applied on three benchmark suites (SPEC CINT2000, SPEC CFP2000, and MediaBench) and results in image size reductions of up to 73%, 92%, and 85% per suite, The average reductions are 59%, 79%, and 78% per suite.