Selective optimization of locks by runtime statistics and just-in-time compilation | IEEE Conference Publication | IEEE Xplore