Skip to main content

Advertisement

Log in

Code refactoring techniques for reducing energy consumption in embedded computing environment

  • Published:
Cluster Computing Aims and scope Submit manuscript

Abstract

Code refactoring is the process of restructuring existing computer code without changing its external behavior to enhance reusability and maintainability of software components through improving nonfunctional attributes of the software. However, when we refactor source codes using existing refactoring techniques, those techniques do not consider energy consumption as one of the nonfunctional attributes. Reducing energy consumption is one of the important factors to develop embedded and/or mobile software because it is difficult to provide sustainable services based on limited power resources. This paper suggests new refactoring techniques for reducing energy consumption to support the restructuring of existing source codes. Especially we define energy-consuming constructs as suspicious codes that are predicted to consume a lot of energy, and then develop the techniques to remove these constructs. Our techniques can improve the performance as well as the energy efficiency of legacy codes.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

References

  1. Bunse, C., Hopfner, H., Mansour, E., Roychoudhury, S.: Exploring the energy consumption of data sorting algorithms in embedded and mobile environments. ln: The 10th IEEE International Conference on MDM, pp. 600–607 (2009)

  2. Zong, Z., Nijim, M., Manzanares, A., Qin, X.: Energy efficient scheduling for parallel applications on mobile clusters. Clust. Comput. J. 11(1), 91–113 (2008)

    Article  Google Scholar 

  3. Valentini, G.L., Lassonde, W., et al.: An overview of energy efficiency techniques in cluster computing systems. Clust. Comput. J. 16(1), 3–15 (2013)

    Article  Google Scholar 

  4. Julian, N., et al.: Power consumption modeling and characterization of the T1C620. IEEE Micro 23(5), 40–49 (2003)

    Article  Google Scholar 

  5. Chang, N., Kim, K.H., Lee, H.G.: Cycle-accurate energy consumption measurement and analysis: case study of ARM7TDMI. ln: The International Symposium on Low Power Electronics and Design, pp. 185–190 (2000)

  6. Tiwari, V., Malik, S., Wolfe, A.: Power analysis of embedded software: a first step towards software power minimization. IEEE Trans. VLSI Syst. 2(4), 437–445 (1994)

    Article  Google Scholar 

  7. Kiertscher, S., Zinke, J., Schnor, B.: CHERUB: power consumption aware cluster resource management. Clust. Comput. J. 16(1), 55–63 (2013)

    Article  Google Scholar 

  8. Tan, T.K., Raghunathan, A., Jha, N.K.: Energy macromodeling of embedded operating systems. ACM Trans. Embed. Comput. Syst. 4(1), 231–254 (2005)

    Article  Google Scholar 

  9. Jun, H., Xuandong, L., Guoliang, Z., Chenghua, W.: Modeling and analysis of power consumption for component-based embedded software. ln: Proceedings of the Embedded Ubiquitous Computing Workshops, pp. 795–804 (2006)

  10. Hao, S., Li, D., Halfond, W.G., Govindan, R.: Estimating mobile application energy consumption using program analysis. ln: The 35th IEEE International Conference on Software Engineering, pp. 92–101 (2013)

  11. Wang, Z., Xu, X., Xiong, N., Yang, L.T., Zhao, W.: Energy cost evaluation of parallel algorithms for multiprocessor systems. Clust. Comput. J. 16(1), 77–90 (2013)

    Article  Google Scholar 

  12. Kim, D.H., Hong, J.E.: ESUML-EAF: a framework to develop an energy-efficient design model for embedded software. Softw. Syst. Model. 14, 795–812 (2015)

    Article  Google Scholar 

  13. Nogueira, B., Maciel, P., Tavares, E., Andrade, E., Massa, R., Callou, G., Ferraz, R.: A formal model for performance and energy evaluation of embedded systems. EURASIP J. Embed. Syst. (2011). doi:10.1155/2011/316510

  14. Jelschen, J., et al.: Towards applying reengineering services to energy-efficient applications. lm: The 16th IEEE European Conference on Software Maintenance and Reengineering (2012)

  15. Brandolese, C., et al.: The impact of source code transformations on software power and energy consumption. J. Circuit Syst. Comput. 11, 477 (2002)

    Article  Google Scholar 

  16. Li, D., Hao, S., Halfond, W.G., Govindan, R.: Calculating source line level energy information for android applications. ln: The 2013 International Symposium on Software Testing and Analysis, pp. 78–89 (2013)

  17. Kwon, Y.W., Tilevich, E.: Reducing the energy consumption of mobile applications behind the scenes. ln: The 29th IEEE International Conference on Software Maintenance, pp. 170–179 (2013)

  18. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Addison Wesley, Boston (2002)

    Book  Google Scholar 

  19. Pinto, G., Castor, F., Liu, Y.D.: Understanding energy behaviors of thread management constructs. ln: The ACM International Conference on Object Oriented Programming Systems Languages & Applications (2014)

  20. Gottschalk, M., et al.: Removing energy code smells with reengineering services. ln: Proceedings of the GI-Jahrestagung (2012)

  21. Banerjee, A., Chong, L.K., Chattopadhyay, S., Roychoudhury, A.: Detecting energy bugs and hotspots in mobile apps. ln: The 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 588–598 (2014)

  22. da Silva, W.G.P., Brisolara, L., Correa, U.B., Carro, L.: Evaluation of the impact of code refactoring on embedded software efficiency. ln: Workshop de Sistemas Embarcados (2010)

  23. Pérez-Castillo, R., Piattini, M.: Analyzing the harmful effect of god class refactoring on power consumption. IEEE Softw. 31, 48–54 (2014)

    Google Scholar 

  24. Park, J.J., Hong, J.E., Lee, S.H.: Investigation for software power consumption of code refactoring techniques. ln: International Conference on Software Engineering & Knowledge Engineering (2014)

  25. Pathak, A., Charlie Hu, Y., Zhang, M.: Bootstrapping Energy debugging on smartphones: a first look at energy bugs in mobile devices. ln: Hotnets’11, November (2011)

  26. Gottschalk, M., Jelschen, J., Winter, A.: Energy-efficient code by refactoring. ln: The 15th Workshop on Software-Reengineering (2013)

  27. Kimura, S., et. al.: Move code refactoring with dynamic analysis. ln: The 28th IEEE International Conference on Software Maintenance, pp. 575–578 (2012)

  28. Kannangara, S.H., Wijayanake, W.M.J.I.: An empirical evaluation of impact of refactoring on internal and external measures of code quality. Int. J. Softw. Eng. Appl. 6(1), 51–67 (2015)

    Google Scholar 

  29. Ouni, A., Kessentini, M., Sahraoui, H.: Search-based refactoring using recorded code changes. ln: The 17th European Conference on Software Maintenance and Reengineering, pp. 221–230 (2013)

  30. Vetro, A., Ardito, L., Procaccianti, G., Morisio, M.: Definition, implementation and validation of energy code smells: an exploratory study on an embedded system. ln: ENERGY 2013, The Third International Conference on Smart Grids, Green Communications and IT Energy-aware Technologies, pp. 34–39 (2013)

  31. Planet Source Code. https://www.planet-source-code.com/. Available at 4 January 2016

  32. Dijkstra, E.W.: A Discipline of Programming. Prentice-Hall, Englewood Cliff (1976)

    MATH  Google Scholar 

  33. Milanova, A., Rountev, A., Ryder, B.G.: Precise call graphs for C programs with function pointers. Autom. Softw. Eng. 11(7), 7–26 (2004)

    Article  Google Scholar 

  34. Moschovakis, Y.N., van den Dries, L.: Arithmetic complexity. ACM Trans. Comput. Log. 10 (2009). doi:10.1145/1459010.1459012

  35. Herczeg, Z., Schmidt, D., et al.: Eergy simulation of embedded XScale systems with XEEMU. J. Embed. Comput. 3, 209–219 (2009)

    Google Scholar 

  36. Mark, T., et al.: Lame (Ver. 3.95:2000). http://lame.sourgeforge.net. Accessed 12 May 2016

  37. Wohlin, C., et al.: Experimentation in Software Engineering: An Introduction, pp. 64–74. Kluwer Academic Publishers, Norwell (2000)

    Book  MATH  Google Scholar 

  38. Senn, E., Laurent, J., Julien, N., Martin, E.: SoftExplorer: estimating and optimizing the power and energy consumption of a C program for DSP application. EURASIP J. Appl. Signal Process. 16, 2641–2654 (2005)

    MATH  Google Scholar 

  39. Tan, T.K., Raghunathan, A., Jha, N.K.: EMSIM: an energy simulation framework for an embedded operating system. ln: International Symposium of Circuits and Systems, pp. 464–467 (2002)

Download references

Acknowledgements

This research was supported by the National Research Foundation, funded by the Ministry of Education Korea (No. NRF-2014R1A1A4A01005566)

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jang-Eui Hong.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Kim, D., Hong, JE., Yoon, I. et al. Code refactoring techniques for reducing energy consumption in embedded computing environment. Cluster Comput 21, 1079–1095 (2018). https://doi.org/10.1007/s10586-016-0691-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10586-016-0691-5

Keywords

Navigation