Skip to main content

Frequency Estimation of Virtual Call Targets for Object-Oriented Programs

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6813))

Abstract

The information of execution frequencies of virtual call targets is valuable for program analyses and optimizations of object-oriented programs. However, to obtain this information, most of the existing approaches rely on dynamic profiling. They usually require running the programs with representative workloads, which are often absent in practice. Additionally, some kinds of programs are very sensitive to run-time disturbance, thus are generally not suitable for dynamic profiling. Therefore, a technique which can statically estimate the execution frequencies of virtual call targets will be very useful.

In this paper we propose an evidence-based approach to frequency estimation of virtual call targets. By applying machine learning algorithms on the data collected from a group of selected programs, our approach builds an estimation model to capture the relations between static features and run-time program behaviors. Then, for a new program, the approach estimates the relative frequency for each virtual call target by applying the model to the static features of the program. Once the model has been built, the estimation step is purely static, thus does not suffer the shortcomings of existing dynamic techniques. We have performed a number of experiments on real-world large-scale programs to evaluate our approach. The results show that our approach can estimate frequency distributions which are much more informative than the commonly used uniform distribution.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. ANTLR Parser Generator, http://www.antlr.org/

  2. CLOC – Count Lines of Code, http://cloc.sourceforge.net/

  3. Kendall tau distance, http://en.wikipedia.org/wiki/Kendall_tau_distance

  4. Soot: a Java Optimization Framework, http://www.sable.mcgill.ca/soot/

  5. Baah, G.K., Podgurski, A., Harrold, M.J.: The probabilistic program dependence graph and its application to fault diagnosis. In: ISSTA 2008: Proceedings of the 2008 International Symposium on Software Testing and Analysis, pp. 189–200. ACM, New York (2008)

    Chapter  Google Scholar 

  6. Ball, T., Larus, J.R.: Branch prediction for free. In: PLDI 1993: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pp. 300–313. ACM, New York (1993)

    Chapter  Google Scholar 

  7. Blackburn, S.M., Garner, R., Hoffmann, C., Khang, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J.E.B., Moss, B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The dacapo benchmarks: java benchmarking development and analysis. In: OOPSLA 2006: Proceedings of the 21st annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications, pp. 169–190. ACM, New York (2006)

    Chapter  Google Scholar 

  8. Bodden, E., Sewe, A., Sinschek, J., Mezini, M.: Taming Reflection (Extended version). Technical Report TUD-CS-2010-0066, CASED (March 2010), http://cased.de/

  9. Boogerd, C., Moonen, L.: Prioritizing software inspection results using static profiling. In: Sixth IEEE International Workshop on Source Code Analysis and Manipulation, pp. 149–160 (2006)

    Google Scholar 

  10. Buse, R.P.L., Weimer, W.: The road not taken: Estimating path execution frequency statically. In: ICSE 2009: Proceedings of the 31st International Conference on Software Engineering, pp. 144–154. IEEE Computer Society, Washington, DC, USA (2009)

    Chapter  Google Scholar 

  11. Calder, B., Grunwald, D., Jones, M., Lindsay, D., Martin, J., Mozer, M., Zorn, B.: Evidence-based static branch prediction using machine learning. ACM Trans. Program. Lang. Syst. 19(1), 188–222 (1997)

    Article  Google Scholar 

  12. Chambers, C., Dean, J., Grove, D.: Whole-program optimization of object-oriented languages. Technical report, Department of Computer Science and Engineering, University of Washington (1996)

    Google Scholar 

  13. Dean, J., Grove, D., Chambers, C.: Optimization of object-oriented programs using static class hierarchy analysis. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995)

    Google Scholar 

  14. Ertl, M.A., Gregg, D.: Optimizing indirect branch prediction accuracy in virtual machine interpreters. In: PLDI 2003: Proceedings of the ACM SIGPLAN 2003 conference on Programming Language Design and Implementation, pp. 278–288. ACM, New York (2003)

    Chapter  Google Scholar 

  15. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston (1995)

    MATH  Google Scholar 

  16. Grove, D., Dean, J., Garrett, C., Chambers, C.: Profile-guided receiver class prediction. SIGPLAN Not 30(10), 108–123 (1995)

    Article  Google Scholar 

  17. Hovemeyer, D., Pugh, W.: Finding bugs is easy. SIGPLAN Not 39(12), 92–106 (2004)

    Article  Google Scholar 

  18. Hwang, Y.-S., Chen, P.-S., Lee, J.K., Ju, R.D.-C.: Probabilistic points-to analysis. In: Rauchwerger, L. (ed.) LCPC 2003. LNCS, vol. 2958, pp. 290–305. Springer, Heidelberg (2004)

    Google Scholar 

  19. Joao, J.A., Mutlu, O., Kim, H., Agarwal, R., Patt, Y.N.: Improving the performance of object-oriented languages with dynamic predication of indirect jumps. In: ASPLOS XIII: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 80–90. ACM, New York (2008)

    Chapter  Google Scholar 

  20. Lhoták, O.: Spark: A flexible points-to analysis framework for Java. Master’s Thesis, McGill University (2002)

    Google Scholar 

  21. Li, T., John, L.K.: Understanding control flow transfer and its predictability in Java processing. In: IEEE International Symposium on Performance Analysis of Systems and Software, pp. 65–76 (2001)

    Google Scholar 

  22. Wagner, T.A., Maverick, V., Graham, S.L., Harrison, M.A.: Accurate static estimators for program optimization. In: PLDI 1994: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, pp. 85–96. ACM, New York (1994)

    Chapter  Google Scholar 

  23. Wall, D.W.: Predicting program behavior using real or estimated profiles. SIGPLAN Not 26(6), 59–70 (1991)

    Article  Google Scholar 

  24. Witten, I.H., Frank, E.: Data Mining: Practical Machine Learning Tools and Techniques, 2nd edn. Morgan Kaufmann, San Francisco (2005)

    MATH  Google Scholar 

  25. Wu, Y., Larus, J.R.: Static branch frequency and program profile analysis. In: MICRO 27: Proceedings of the 27th Annual International Symposium on Microarchitecture, pp. 1–11. ACM, New York (1994)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zhang, C., Xu, H., Zhang, S., Zhao, J., Chen, Y. (2011). Frequency Estimation of Virtual Call Targets for Object-Oriented Programs. In: Mezini, M. (eds) ECOOP 2011 – Object-Oriented Programming. ECOOP 2011. Lecture Notes in Computer Science, vol 6813. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22655-7_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22655-7_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22654-0

  • Online ISBN: 978-3-642-22655-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics