Program performance is always a concern, even in this era of high-performance hardware. This article, the first in a two-part series, guides you around the many pitfalls associated with benchmarking Java code. Part 2 covers the statistics of benchmarking and offers a framework for performing Java benchmarking. Because almost all new languages are virtual machine-based, the general principles the article describes have broad significance for the programming community at large.
I recently diagnosed the root cause of a concurrency bug, CR6822370,
and thought it sufficiently interesting to share the details. (CR 6822370 actually represents a
cluster of bugs that are now thought to be related by a common underlying issue).
Briefly, we have a lost wakeup bug in the native C++ Parker::park() platform-specific
infrastructure code that implements java.util.concurrent.LockSupport.park().
The lost wakeup arises from a race that itself arises because of architectural
reordering that in turn occurs because of missing memory barrier instructions.
The lost wakeup may manifest as various 'hangs' or instances of progress failure.
J. Auerbach, D. Bacon, P. Cheng, и R. Rabbah. OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applications, стр. 89--108. New York, NY, USA, ACM, (2010)
A. Azevedo, A. Kejariwal, A. Veidenbaum, и A. Nicolau. EMSOFT '05: Proceedings of the 5th ACM international conference on Embedded software, стр. 52--61. New York, NY, USA, ACM, (2005)
M. Bebenita, A. Gal, и M. Franz. PPPJ '07: Proceedings of the 5th international symposium on Principles and practice of programming in Java, стр. 145--154. New York, NY, USA, ACM, (сентября 2007)
N. Beckman, D. Kim, и J. Aldrich. ECOOP 2011 – Object-Oriented Programming, том 6813 из Lecture Notes in Computer Science, Springer Berlin Heidelberg, (2011)
P. Bertels, и D. Stroobandt. International Conference on Complex, Intelligent and Software Intensive Systems, стр. 627-631. Los Alamitos, CA, USA, IEEE Computer Society, (2008)
M. Braux, и J. Noyé. Proceedings of the 2000 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, стр. 2--11. ACM, (1999)
B. Claudel, Q. Sabah, и J. Stefani. Formal Techniques for Distributed Objects, Components, and Systems, том 9039 из Lecture Notes in Computer Science, Springer, (2015)
D. Costa, A. Andrzejak, J. Seboek, и D. Lo. Proceedings of the 8th ACM/SPEC on International Conference on Performance Engineering, стр. 389--400. New York, NY, USA, ACM, (2017)
T. Cutsem, S. Mostinckx, и W. Meuter. Computer Languages, Systems & Structures, 35 (1):
80 - 98(2009)ESUG 2007 International Conference on Dynamic Languages (ESUG/ICDL 2007).
M. De Wael, S. Marr, и T. Van Cutsem. Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools, стр. 39--50. (сентября 2014)(acceptance rate 39%).
B. Demsky, и P. Lam. Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering - Volume 1, стр. 395--404. New York, NY, USA, ACM, (2010)
B. Dufour, K. Driesen, L. Hendren, и C. Verbrugge. Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-oriented Programing, Systems, Languages, and Applications, стр. 149--168. ACM, (2003)
B. Folliot, I. Piumarta, и F. Riccardi. Proceedings of the 8th ACM SIGOPS European workshop on Support for composing distributed applications, стр. 175--181. New York, NY, USA, ACM, (1998)
N. Geoffray, G. Thomas, C. Clément, и B. Folliot. PPPJ '08: Proceedings of the 6th international symposium on Principles and practice of programming in Java, стр. 73--82. New York, NY, USA, ACM, (2008)
A. Georges, D. Buytaert, и L. Eeckhout. OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications, стр. 57--76. New York, NY, USA, ACM, (2007)
E. Hilsdale, и J. Hugunin. Proceedings of the 3rd international conference on Aspect-oriented software development, стр. 26--35. New York, NY, USA, ACM, (2004)
P. Hofer, F. Hörschläger, и H. Mössenböck. Proceedings of the 6th ACM/SPEC International Conference on Performance Engineering, стр. 87--90. ACM, (2015)
C. Häubl, C. Wimmer, и H. Mössenböck. Computer Languages, Systems & Structures, 39 (4):
123 - 141(2013)Special issue on the Programming Languages track at the 27th \ACM\ Symposium on Applied Computing.
H. Inoue, H. Hayashizaki, P. Wu, и T. Nakatani. Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, стр. 179--194. New York, NY, USA, ACM, (2012)
R. Kaiabachev, и B. Richards. Proc. of Fifteenth IASTED International Conference on Parallel and Distributed Computing and Systems, стр. 648-653. Marina del Ray, CA, USA, (ноября 2003)
V. Kumar, D. Frampton, S. Blackburn, D. Grove, и O. Tardieu. Proceedings of the 2012 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA 2012), Tucson, AZ, October 19-26, 2012, том 47 из SIGPLAN Notices, стр. 297--314. ACM, (октября 2012)
S. Lauterburg, R. Karmani, D. Marinov, и G. Agha. Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, стр. 363--364. New York, NY, USA, ACM, (2010)
H. Masuhara, и A. Yonezawa. International Colloquium on Partial Evaluation and Program Transformation (PE Day'99), стр. 83--102. Waseda University, Tokyo, Japan, (ноября 1999)
T. Mytkowicz, A. Diwan, M. Hauswirth, и P. Sweeney. Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation, стр. 187--197. ACM, (июня 2010)
M. Paleczny, C. Vick, и C. Click. JVM'01: Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium, стр. 1--1. Berkeley, CA, USA, USENIX Association, (2001)
F. Pizlo, L. Ziarek, и J. Vitek. JTRES '09: Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems, стр. 110--119. New York, NY, USA, ACM, (2009)
G. Pothier, \. Tanter, и J. Piquer. Proceedings of the 22Nd Annual ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications, стр. 535--552. ACM, (2007)
J. Roemer, K. Genc, и M. Bond. Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, стр. 374--389. ACM, (2018)
I. Ruiz, M. Nagappan, B. Adams, и A. Hassan. Proceedings of the 20th IEEE International Conference on Program Comprehension (ICPC), стр. 113--122. Passau, Germany, (июня 2012)
S. Ryu, и N. Ramsey. Compiler Construction: 14th International Conference, CC 2005, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, Edinburgh, UK, April 4-8, 2005. Proceedings, стр. 10--26. Springer, (2005)
V. Saraswat, R. Jagadeesan, M. Michael, и C. von Praun. PPoPP '07: Proceedings of the 12th ACM SIGPLAN symposium on Principles and practice of parallel programming, стр. 161--172. New York, NY, USA, ACM, (2007)
H. Schippers, T. Van Cutsem, S. Marr, M. Haupt, и R. Hirschfeld. Proceedings of the Fourth Workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS), стр. 4--9. ACM, (06.07.2009)
A. Shali, и W. Cook. Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, стр. 375--390. ACM, (2011)
L. Smith, J. Bull, и J. Obdrzálek. Supercomputing '01: Proceedings of the 2001 ACM/IEEE conference on Supercomputing (CDROM), стр. 8--8. New York, NY, USA, ACM, (2001)
M. Steindorfer, и J. Vinju. Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, стр. 783--800. New York, NY, USA, ACM, (2015)
C. Thalinger, и J. Rose. Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java, стр. 1--9. New York, NY, USA, ACM, (2010)
M. Tikir, J. Hollingsworth, и G. Lueh. Proceedings of the 2002 ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering, стр. 10--17. New York, NY, USA, ACM, (2002)
R. Veldema, R. Hofman, R. Bhoedjang, C. Jacobs, и H. Bal. PPoPP '01: Proceedings of the eighth ACM SIGPLAN symposium on Principles and practices of parallel programming, стр. 83--92. New York, NY, USA, ACM, (2001)
A. Welc, S. Jagannathan, и A. Hosking. Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, стр. 439--453. ACM, (2005)
P. Welch, N. Brown, J. Moores, K. Chalmers, и B. Sputh. Communicating Process Architectures 2007CPA, том 65 из Concurrent Systems Engineering Series, стр. 349--370. IOS Press, (2007)