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. Roemer, K. Genc, и M. Bond. Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, стр. 374--389. ACM, (2018)
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)
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)
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)
B. Claudel, Q. Sabah, и J. Stefani. Formal Techniques for Distributed Objects, Components, and Systems, том 9039 из Lecture Notes in Computer Science, Springer, (2015)
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%).