make lock counters thread-local