Advertisement

Vertical Object Layout and Compression for Fixed Heaps

  • Ben L. Titzer
  • Jens Palsberg
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5700)

Abstract

Research into embedded sensor networks has placed increased focus on the problem of developing reliable and flexible software for microcontroller-class devices. Languages such as nesC [10] and Virgil [20] have brought higher-level programming idioms to this lowest layer of software, thereby adding expressiveness. Both languages are marked by the absence of dynamic memory allocation, which removes the need for a runtime system to manage memory. While nesC offers code modules with statically allocated fields, arrays and structs, Virgil allows the application to allocate and initialize arbitrary objects during compilation, producing a fixed object heap for runtime. This paper explores techniques for compressing fixed object heaps with the goal of reducing the RAM footprint of a program. We explore table-based compression and introduce a novel form of object layout called vertical object layout. We provide experimental results that measure the impact on RAM size, code size, and execution time for a set of Virgil programs. Our results show that compressed vertical layout has better execution time and code size than table-based compression while achieving more than 20% heap reduction on 6 of 12 benchmark programs and 2–17% heap reduction on the remaining 6. We also present a formalization of vertical object layout and prove tight relationships between three styles of object layout.

Keywords

Execution Time Code Size Garbage Collector Object Label Benchmark Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Adl-Tabatabai, A.-R., Bharadwaj, J., Cierniak, M., Eng, M., Fang, J., Lewis, B.T., Murphy, B.R., Stichnoth, J.M.: Improving 64-bit Java IPF performance by compressing heap references. In: Proceedings of CGO 2004, pp. 100–110 (2004)Google Scholar
  2. 2.
    Ananian, C.S., Rinard, M.: Data size optimizations for Java programs. In: LCTES 2003, Languages, Compilers, and Tools for Embedded Systems (2003)Google Scholar
  3. 3.
    Bacon, D.F.: Kava: a Java dialect with a uniform object model for lightweight classes. Concurrency and Computation: Practice and Experience 15(3–5), 185–206 (2003)CrossRefzbMATHGoogle Scholar
  4. 4.
    Bacon, D.F., Fink, S.J., Grove, D.: Space- and time-efficient implementation of the Java object model. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 111–132. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  5. 5.
    Bagley, D.: Computer language shootout benchmarks, http://shootout.alioth.debian.org/gp4
  6. 6.
    Chapman, R., Barnes, J., Dobbing, B.: On the principled design of object-oriented programming languages for high-integrity systems. In: Proceedings of the 2nd NASA/FAA Object-Oriented Technology Workshop (2003)Google Scholar
  7. 7.
    Chen, G., Kandemir, M.T., Vijaykrishnan, N., Irwin, M.J., Mathiske, B., Wolczko, M.: Heap compression for memory-constrained Java environments. In: Proceedings of OOPSLA 2003, ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 282–301 (2003)Google Scholar
  8. 8.
    Cohen, N.H.: Type-extension type tests can be performed in constant time. ACM Transactions on Programming Languages and Systems 13(4), 626–629 (1991)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Cooprider, N., Regehr, J.: Offline compression for on-chip RAM. In: Proceedings of PLDI 2007, ACM SIGPLAN Conference on Programming Language Design and Implementation, San Diego, California, June 2007, pp. 363–372 (2007)Google Scholar
  10. 10.
    Gay, D., Levis, P., von Behren, J.R., Welsh, M., Brewer, E.A., Culler, D.E.: The nesC language: A holistic approach to networked embedded systems. In: Proceedings of PLDI 2003, ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 1–11 (2003)Google Scholar
  11. 11.
    Lattner, C., Adve, V.S.: Automatic pool allocation for disjoint data structures. In: Proceedings of The Workshop on Memory Systems Performance (MSP 2002) and The International Symposium on Memory Management (ISMM 2002), pp. 13–24 (2002)Google Scholar
  12. 12.
    Mogul, J.C., Bartlett, J.F., Mayo, R.N., Srivastava, A.: Performance implications of multiple pointer sizes. In: Proceedings of USENIX Winter, pp. 187–200 (1995)Google Scholar
  13. 13.
    Mosses, P.D.: A semantic algebra for binding constructs. In: Proceedings of ICFPC 1981, International Colloquium on Formalization of Programming Concepts, pp. 408–418 (1981)Google Scholar
  14. 14.
    Mosses, P.D.: Abstract semantic algebras! In: Proceedings of IFIP TC2 Working Conference on Formal Description of Programming Concepts II (Garmisch-Partenkirchen, 1982), pp. 45–70. North-Holland, Amsterdam (1983)Google Scholar
  15. 15.
    Mosses, P.D.: A basic abstract semantic algebra. In: Plotkin, G., MacQueen, D.B., Kahn, G. (eds.) Semantics of Data Types 1984. LNCS, vol. 173, pp. 87–107. Springer, Heidelberg (1984)CrossRefGoogle Scholar
  16. 16.
    Myers, A.: Bidirectional object layout for separate compilation. In: Proceedings of OOPSLA 1995, ACM SIGPLAN Tenth Annual Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 124–139 (1995)Google Scholar
  17. 17.
    Pugh, W., Weddell, G.E.: Two-directional record layout for multiple inheritance. In: Proceedings of PLDI 1990, ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 85–91 (1990)Google Scholar
  18. 18.
    Schubert, L.K., Papalaskaris, M.A., Taugher, J.: Determining type, part, color and time relationships. IEEE Computer 16(10), 53–60 (1983)CrossRefGoogle Scholar
  19. 19.
    Taha, W., Ellner, S., Xi, H.: Generating heap-bounded programs in a functional setting. In: Alur, R., Lee, I. (eds.) EMSOFT 2003. LNCS, vol. 2855, pp. 340–355. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  20. 20.
    Titzer, B.L.: Virgil: Objects on the head of a pin. In: Proceedings of OOPSLA 2006, ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (2006)Google Scholar
  21. 21.
    Titzer, B.L., Lee, D.K., Palsberg, J.: Avrora: Scalable sensor network simulation with precise timing. In: Proceedings of IPSN 2005, Fourth International Conference on Information Processing in Sensor Networks, Los Angeles, April 2005, pp. 477–482 (2005)Google Scholar
  22. 22.
    Titzer, B.L., Palsberg, J.: Nonintrusive precision instrumentation of microcontroller software. In: Proceedings of LCTES 2005, Conference on Languages, Compilers and Tools for Embedded Systems, Chicago, Illinois, June 2005, pp. 59–68 (2005)Google Scholar
  23. 23.
    Titzer, B.L., Palsberg, J.: Vertical object layout and compression for fixed heaps. In: Proceedings of CASES 2007, International Conference on Compilers, Architecture, and Synthesis for Embedded Systems, Salzburg, Austria, September 2007, pp. 170–178 (2007)Google Scholar
  24. 24.
    Wilson, P.: Operating system support for small objects. In: Proceedings of Object Orientation in Operating Systems, pp. 80–86 (1991)Google Scholar
  25. 25.
    Wright, G., Seidl, M.L., Wolczko, M.: An object-aware memory architecture. Science of Computer Programming 62(2), 145–163 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Zhang, Y., Gupta, R.: Compressing heap data for improved memory performance. Software – Practice & Experience 36(10), 1081–1111 (2006)CrossRefGoogle Scholar
  27. 27.
    Zibin, Y., Gil, J.: Efficient subtyping tests with pq-encoding. In: Proceedings of OOPSLA 2001, ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, Tampa Bay, Florida, October 2001, pp. 96–107 (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Ben L. Titzer
    • 1
  • Jens Palsberg
    • 2
  1. 1.Sun Microsystems LaboratoriesMenlo Park
  2. 2.UCLAUniversity of CaliforniaLos Angeles

Personalised recommendations