JetsonLeap: A Framework to Measure Energy-Aware Code Optimizations in Embedded and Heterogeneous Systems

  • Tarsila Bessa
  • Pedro Quintão
  • Michael Frank
  • Fernando Magno Quintão Pereira
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9889)


Energy-aware techniques are becoming a staple feature among compiler analyses and optimizations. However, the programming languages community still does not have access to cheap and precise technology to measure the power dissipated by a given program. This paper describes a solution to this problem. To this end, we introduce JetsonLeap, a framework that enables the design and test of energy-aware code transformations. JetsonLeap consists of an embedded hardware, in our case, the Nvidia Tegra TK1 System on a Chip Device, a circuit to control the flow of energy, of our own design, plus a library to instrument program parts. We can measure reliably the energy spent by 400.000 instructions, about half a millisecond of program execution. Our entire infra-structure – board, power meter and circuit – can be reproduced with about $500.00. To demonstrate the efficacy of our framework, we have used it to measure energy consumption of programs running on ARM cores, on the GPU, and on a remote server. Furthermore, we have studied the impact of OpenACC directives on the energy efficiency of high-performance applications.


  1. 1.
    Beloglazov, A., Abawajy, J., Buyya, R.: Energy-aware resource allocation heuristics for efficient management of data centers for cloud computing. Future Gener. Comput. Syst. 28(5), 755–768 (2012)CrossRefGoogle Scholar
  2. 2.
    Demontiê, F., Cezar, J., Bigonha, M., Campos, F., Magno Quintão Pereira, F.: Automatic inference of loop complexity through polynomial interpolation. In: Pardo, A., Swierstra, S.D. (eds.) SBLP 2015. LNCS, vol. 9325, pp. 1–15. Springer, Heidelberg (2015). doi:10.1007/978-3-319-24012-1_1 CrossRefGoogle Scholar
  3. 3.
    Dunkels, A., Osterlind, F., Tsiftes, N., He, Z.: Software-based on-line energy estimation for sensor nodes. In: EmNets, pp. 28–32. ACM (2007)Google Scholar
  4. 4.
    Ge, R., Feng, X., Song, S., Chang, H.-C., Li, D., Cameron, K.W.: Powerpack: energy profiling and analysis of high-performance systems and applications. IEEE Trans. Parallel Distrib. Syst. 21(5), 658–671 (2010)CrossRefGoogle Scholar
  5. 5.
    Hähnel, M., Döbel, B., Völp, M., Härtig, H.: Measuring energy consumption for short code paths using RAPL. SIGMETRICS Perform. Eval. Rev. 40(3), 13–17 (2012)CrossRefGoogle Scholar
  6. 6.
    McIntire, D., Ho, K., Yip, B., Singh, A., Wu, W., Kaiser, W.J.: The low power energy aware processing (LEAP) embedded networked sensor system. In: IPSN, pp. 449–457. ACM (2006)Google Scholar
  7. 7.
    McIntire, D., Stathopoulos, T., Reddy, S., Schmidt, T., Kaiser, W.J.: Energy-efficient sensing with the low power, energy aware processing (LEAP) architecture. ACM Trans. Embedded Comput. Syst. 11(2), 27 (2012)CrossRefGoogle Scholar
  8. 8.
    Nazaré, H., Maffra, I., Santos, W., Barbosa, L., Gonnord, L., Quintão Pereira, F.M.: Validation of memory accesses through symbolic analyses. In: OOPSLA, pp. 791–809. ACM (2014)Google Scholar
  9. 9.
    Domingues Neto, J.L.: User-level online offloading framework. Master’s thesis, UFMG (2016)Google Scholar
  10. 10.
    Domingues Neto, J.L., Macedo, D.F., Nogueira, J.M.S.: A location aware decision engine to offload mobile computation to the cloud. In: NOMS, pp. 831–838 (2016)Google Scholar
  11. 11.
    Peterson, P.A.H., Singh, D., Kaiser, W.J., Reiher, P.L.: Investigating energy and security trade-offs in the classroom with the Atom LEAP testbed. In: CSET, pp. 1–11. USENIX (2011)Google Scholar
  12. 12.
    Pinto, G., Castor, F., Liu, Y.D.: Understanding energy behaviors of thread management constructs. In: OOPSLA, pp. 345–360. ACM (2014)Google Scholar
  13. 13.
    Reyes, R., López-Rodríguez, I., Fumero, J.J., de Sande, F.: accULL: an OpenACC implementation with CUDA and OpenCL support. In: Kaklamanis, C., Papatheodorou, T., Spirakis, P.G. (eds.) Euro-Par 2012. LNCS, vol. 7484, pp. 871–882. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  14. 14.
    Saputra, H., Kandemir, M., Vijaykrishnan, N., Irwin, M.J., Hu, J.S., Hsu, C-H., Kremer, U.: Energy-conscious compilation based on voltage scaling. In: SCOPES, pp. 2–11. ACM (2002)Google Scholar
  15. 15.
    Sartori, S., Kumar, R.: Compiling for energy efficiency on timing speculative processors. In: DAC, pp. 1301–1308. ACM (2012)Google Scholar
  16. 16.
    Silva, B.L.B., Guimarães Tavares, E.A., Martins Maciel, P.R., e Silva Nogueira, B.C., Oliveira, J., Lourenço Damaso, A.V., Rosa, N.S.: AMALGHMA -an environment for measuring execution time and energy consumption in embedded systems. In: SMC, pp. 3364–3369. IEEE (2014)Google Scholar
  17. 17.
    Steinke, S., Wehmeyer, L., Lee, B., Marwedel, P.: Assigning program and data objects to scratchpad for energy reduction. In: DATE, pp. 409–415. IEEE (2002)Google Scholar
  18. 18.
    Stokke, K.R., Stensland, H.K., Griwodz, C., Halvorsen, P.: Energy efficient video encoding using the tegra K1 mobile processor. In: MMSys, pp. 81–84. ACM (2015)Google Scholar
  19. 19.
    Valluri, M., John, L.K.: Is compiling for performance – compiling for power? In: Lee, G., Yew, P.-C. (eds.) Interaction between Compilers and Computer Architectures. The Springer International Series in Engineering and Computer Science, pp. 101–115. Springer, New York (2001)CrossRefGoogle Scholar
  20. 20.
    Vetro, A., Ardito, L., Procaccianti, G., Morisio, M.: Definition, implementation, validation of energy code smells: an exploratory study on an embedded system. In: ENERGY, pp. 34–39 (2013)Google Scholar
  21. 21.
    Weaver, V.M., Johnson, M., Kasichayanula, K., Ralph, J., Luszczek, P., Terpstra, D., Moore, S.: Measuring energy and power with papi. In: ICPPW, pp. 262–268. IEEE (2012)Google Scholar
  22. 22.
    Yuki, T., Rajopadhye, S.: Folklore confirmed: compiling for speed = compiling for energy. In: Caṣcaval, C., Montesinos-Ortego, P. (eds.) LCPC 2013. LNCS, vol. 8664, pp. 169–184. Springer, Heidelberg (2014)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Tarsila Bessa
    • 1
  • Pedro Quintão
    • 1
  • Michael Frank
    • 2
  • Fernando Magno Quintão Pereira
    • 1
  1. 1.UFMGBelo HorizonteBrazil
  2. 2.San Jose LabLG Mobile ResearchSan JoseUSA

Personalised recommendations