Trace Execution Automata in Dynamic Binary Translation

  • João Porto
  • Guido Araujo
  • Edson Borin
  • Youfeng Wu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6161)

Abstract

Program performance can be dynamically improved by optimizing its frequent execution traces. Once traces are collected, they can be analyzed and optimized based on the dynamic information derived from the program’s previous runs. The ability to record traces is thus central to any dynamic binary translation system. Recording traces, as well as loading them for use in different runs, requires code replication to represent the trace. This paper presents a novel technique which records execution traces by using an automaton called TEA (Trace Execution Automata). Contrary to other approaches, TEA stores traces implicitly, without the need to replicate execution code. TEA can also be used to simulate the trace execution in a separate environment, to store profile information about the generated traces, as well to instrument optimized versions of the traces. In our experiments, we showed that TEA decreases memory needs to represent the traces (nearly 80% savings).

Keywords

Dynamic Binary Translation Deterministic Finite Automaton Trace Recording Trace Replaying 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bala, V., Duesterwald, E., Banerjia, S.: Dynamo: a transparent dynamic optimization system. SIGPLAN Not. 35(5), 1–12 (2000)CrossRefGoogle Scholar
  2. 2.
    Baraz, L., Devor, T., Etzion, O., Goldenberg, S., Skaletsky, A., Wang, Y., Zemach, Y.: Ia-32 execution layer: a two-phase dynamic translator designed to support ia-32 applications on itanium®-based systems. In: MICRO 36: Proceedings of the 36th Annual IEEE/ACM International Symposium on Microarchitecture, p. 191 (2003)Google Scholar
  3. 3.
    Cifuentes, C., Emmerik, M.V.: Uqbt: Adaptable binary translation at low cost. Computer 33(3), 60–66 (2000)CrossRefGoogle Scholar
  4. 4.
    Dehnert, J.C., Grant, B.K., Banning, J.P., Johnson, R., Kistler, T., Klaiber, A., Mattson, J.: The transmeta code morphingTMsoftware: using speculation, recovery, and adaptive retranslation to address real-life challenges. In: CGO 2003: Proceedings of the International Symposium on Code Generation and Optimization, pp. 15–24 (2003)Google Scholar
  5. 5.
    Duesterwald, E., Bala, V.: Software profiling for hot path prediction: less is more. In: ASPLOS-IX: Proceedings of the Ninth International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 202–211 (2000)Google Scholar
  6. 6.
    Ebcioğlu, K., Altman, E.R.: Daisy: dynamic compilation for 100% architectural compatibility. In: ISCA 1997: Proceedings of the 24th Annual International Symposium on Computer Architecture, pp. 26–37 (1997)Google Scholar
  7. 7.
    Ebcioğlu, K., Altman, E.R., Gschwind, M., Sathaye, S.: Optimizations and oracle parallelism with dynamic translation. In: MICRO 32: Proceedings of the 32nd annual ACM/IEEE International Symposium on Microarchitecture, pp. 284–295 (1999)Google Scholar
  8. 8.
    Friendly, D.H., Patel, S.J., Patt, Y.N.: Putting the fill unit to work: dynamic optimizations for trace cache microprocessors. In: MICRO 31: Proceedings of the 31st Annual ACM/IEEE International Symposium on Microarchitecture, pp. 173–181 (1998)Google Scholar
  9. 9.
    Gal, A., Franz, M.: Incremental dynamic code generation with trace trees. Tech. Rep. 06-16, Donald Bren School of Information and Computer Science, University of California, Irvine (November 2006)Google Scholar
  10. 10.
    Gal, A., Eich, B., Shaver, M., Anderson, D., Mandelin, D., Haghighat, M.R., Kaplan, B., Hoare, G., Zbarsky, B., Orendorff, J., Ruderman, J., Smith, E.W., Reitmaier, R., Bebenita, M., Chang, M., Franz, M.: Trace-based just-in-time type specialization for dynamic languages. In: PLDI 2009: Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 465–478 (2009)Google Scholar
  11. 11.
    Gschwind, M., Ebcioğlu, K., Altman, E., Sathaye, S.: Binary translation and architecture convergence issues for ibm system/390. In: ICS 2000: Proceedings of the 14th International Conference on Supercomputing, pp. 336–347 (2000)Google Scholar
  12. 12.
    Hookway, R.: Digital fx!32: Running 32-bit x86 applications on alpha nt. In: COMPCON 1997: Proceedings of the 42nd IEEE International Computer Conference, p. 37 (1997)Google Scholar
  13. 13.
    Klaiber, A.: The technology behind CrusoeTM processors, Tansmeta Corporation (January 2000)Google Scholar
  14. 14.
    Luk, C.K., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V.J., Hazelwood, K.: Pin: building customized program analysis tools with dynamic instrumentation. In: PLDI 2005: Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 190–200 (2005)Google Scholar
  15. 15.
    Porto, J.P., Araujo, G., Wu, Y., Borin, E., Wang, C.: Compact trace trees in dynamic binary translators. In: 2nd Workshop on Architectural and Micro-Architectural Support for Binary Translation, AMAS-BT 2009 (2009)Google Scholar
  16. 16.
    Rotenberg, E., Bennett, S., Smith, J.E.: Trace cache: a low latency approach to high bandwidth instruction fetching. In: MICRO 29: Proceedings of the 29th Annual ACM/IEEE International Symposium on Microarchitecture, pp. 24–35 (1996)Google Scholar
  17. 17.
    Sprangle, E., Carmean, D.: Increasing processor performance by implementing deeper pipelines. SIGARCH Comput. Archit. News 30(2), 25–34 (2002)CrossRefGoogle Scholar
  18. 18.
    Suganuma, T., Yasue, T., Nakatani, T.: A region-based compilation technique for dynamic compilers. ACM Trans. Program. Lang. Syst. 28(1), 134–174 (2006)CrossRefGoogle Scholar
  19. 19.
    Wang, C., Hu, S., Kim, H., Nair, S.R., Breternitz, M., Ying, Z., Wu, Y.: Stardbt: An efficient multi-platform dynamic binary translation system. In: Asia-Pacific Computer Systems Architecture Conference, pp. 4–15 (2007)Google Scholar
  20. 20.
    Wimmer, C., Cintra, M.S., Bebenita, M., Chang, M., Gal, A., Franz, M.: Phase detection using trace compilation. In: PPPJ 2009: Proceedings of the 7th International Conference on Principles and Practice of Programming in Java, pp. 172–181 (2009)Google Scholar
  21. 21.
    Zaleski, M., Brown, A.D., Stoodley, K.: Yeti: a gradually extensible trace interpreter. In: VEE 2007: Proceedings of the 3rd International Conference on Virtual Execution Environments, pp. 83–93 (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • João Porto
    • 1
  • Guido Araujo
    • 1
  • Edson Borin
    • 2
  • Youfeng Wu
    • 2
  1. 1.LSC - IC - UnicampBrazil
  2. 2.PSL - IntelUSA

Personalised recommendations