privat/nit — pull request #664 by privat (2014-08-13 03:21:15+00:00)
Title: lib: introduce module hash_debug

Nit-exclusivity thanks to class refinements, intrude imports and the control of the main function.

Inject behavior analysis to hash-collections (HashMap, HashSet, etc.)
Accesses to hash collections are instrumented, and statistics are automatically displayed at the end of the program.

This module helps to detect, and track bad behavior on hash-collections, especially collisions.

Simple usage:

1. compile your program with `-m hash_debug`
2. execute your program.

Advanced usage:

import `hash_debug` and use the functions `Sys::show_hash_stats` and `Sys::clear_hash_stats` at strategic points.

You can also use some dynamic call-graph tools (like valgrind) and look at callers of `HashCollection::gt_collide` and `HashCollection::st_collide`.