Interlock `inflated_signatures_size`, `memberref_sig_cache_size`, `methods_size`...
commitfc524c47564325aea4780a6a2d765ff40b424b98
authorArmin Hasitzka <cherusker@users.noreply.github.com>
Wed, 6 Sep 2017 12:16:02 +0000 (6 14:16 +0200)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 6 Sep 2017 12:16:02 +0000 (6 14:16 +0200)
tree98998d360487cff411f221ee821a658ebbc31181
parent586d10d3ababa67742cb1cb907460afe30896f96
Interlock `inflated_signatures_size`, `memberref_sig_cache_size`, `methods_size` and `signatures_size` (#5489)

[TSan] Interlocking loader.c

`loader.c` contains four statistics counters and all of them are invovled in data races. This PR focuses on dealing with them:

- All of them can be `gint32` as they are registered as `MONO_COUNTER_INT` anyways.
- Since there is already a lot of locking involved in `loader.c` (including an approved usage of `Interlocked* ()` with with `mono_stats`), I think that `Interlocked* ()` can be used here instead of `Unlocked* ()`. If this assumption is wrong, I would kindly ask to correct me by commenting the affected rows and I will change it to `Unlocked* ()`.
mono/metadata/loader.c