[TSan] Reorganise / clean up counters logic in mini-generic-sharing.c (#5502)
authorArmin Hasitzka <cherusker@users.noreply.github.com>
Thu, 7 Sep 2017 10:19:23 +0000 (12:19 +0200)
committerBernhard Urban <bernhard.urban@xamarin.com>
Thu, 7 Sep 2017 10:19:23 +0000 (12:19 +0200)
commitbcf0ad586011ad240a32090805237795e05418d7
treeda4acb0bcf9e8de2b81c6c822c75451a1102add0
parent5b22c773bd37a859319a945b1940e861ed326037
[TSan] Reorganise / clean up counters logic in mini-generic-sharing.c (#5502)

* Reorganise counters:
- use `Interlocked* ()` and `Unlocked* ()` to fix / mark (possible) races
- change the initialisation location and the visbility of some counters
- fix a few typos

* Extend the warning when re-registering counters

* also print counter address if we have a duplicate
mono/mini/mini-generic-sharing.c
mono/utils/mono-counters.c