Resolve "you are registering twice the same counter address" warning on Windows Relea...
authorlateralusX <lateralusx.github@gmail.com>
Tue, 20 Sep 2016 15:07:02 +0000 (17:07 +0200)
committerlateralusX <lateralusx.github@gmail.com>
Tue, 20 Sep 2016 15:07:02 +0000 (17:07 +0200)
commitb0a7eca6fd3a31cf57c7b111dceeb23dc552b819
tree788eb91525983a8f65a88531bf18431b9afd79cd
parent97ed6df1e2aa182b76eb90506e5cea8fdaca29d0
Resolve "you are registering twice the same counter address" warning on Windows Release builds.

When registering profile counters on optimized Windows build you will get the following logging twice:

"you are registering twice the same counter address"

This happens since the optimizer will collapse cpu_load_1min, cpu_load_5min and cpu_load15min into
the same function on optimized Windows builds and that is not expected by register_internal.

By preventing inlining of cpu_load we can keep the different callback methods unique and optimizer
won't fold them into one single representation in the final binary.
mono/utils/mono-counters.c