During the lifecycle of a Java HashMap is there a way to determine how many collisions/chaining occured. How many times the HashMap was resized and how long each resize event took? 

I checked source code for HashMap(1.6), and it looks like it can be extended to add the above functionality to it.

A little background, i have inherited some legacy application and since we are using CMS-GC, which happens to be non-compacting. These hashtables can have more than a million entries. We are facing some performance issues in production that occur only during activity spikes. And we have been unable to reproduce them in our production replica. 

In my previous project we do print the our cache usage statistics periodically to determine their effectiveness.

Also would appreciate your opinion/criticism as to if this a right line of thinking?