Skip to content

Commit

Permalink
[mono] remove redundant DISABLE_PERF_COUNTERS option (#56420)
Browse files Browse the repository at this point in the history
* [mono] remove redundant DISABLE_PERF_COUNTERS option

There is already a `DISABLE_PERFCOUNTERS` option, which is always set in src/mono/CMakeLists.txt

* fix log profiler in Android builds
  • Loading branch information
lambdageek authored Jul 29, 2021
1 parent 5285a89 commit 65de909
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/mono/cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ option (DISABLE_EXECUTABLES "Disable the build of the runtime executables")
option (DISABLE_CRASH_REPORTING "Disable crash reporting subsystem")
option (DISABLE_ICALL_TABLES "Enable separate icall table library")
option (DISABLE_QCALLS "Disable support for QCalls")
option (DISABLE_PERF_COUNTERS "Disable support for perf counters")
option (DISABLE_LOG_DEST "Disable MONO_LOG_DEST support")
option (ENABLE_ICALL_EXPORT "Export icall functions")
option (ENABLE_ICALL_SYMBOL_MAP "Generate tables which map icall functions to their C symbols")
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
</ItemGroup>
<!-- WASM specific options -->
<PropertyGroup Condition="'$(TargetsBrowser)' == 'true'">
<_MonoMinimal Condition="'$(Configuration)' == 'Release'">,debugger_agent,log_dest,perf_counters</_MonoMinimal>
<_MonoMinimal Condition="'$(Configuration)' == 'Release'">,debugger_agent,log_dest</_MonoMinimal>
<_MonoMinimal Condition="'$(Configuration)' == 'Release' and '$(MonoEnableAssertMessages)' != 'true'">$(_MonoMinimal),assert_messages</_MonoMinimal>
</PropertyGroup>
<ItemGroup Condition="'$(TargetsBrowser)' == 'true'">
Expand Down
8 changes: 7 additions & 1 deletion src/mono/mono/utils/mono-counters.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct _MonoCounter {
size_t size;
};

#ifndef DISABLE_PERF_COUNTERS
#ifndef DISABLE_PERFCOUNTERS

static MonoCounter *counters = NULL;
static mono_mutex_t counters_mutex;
Expand Down Expand Up @@ -777,6 +777,12 @@ mono_counter_get_type (MonoCounter *counter)
return 0;
}

const char*
mono_counter_get_name (MonoCounter *name)
{
return NULL;
}

size_t
mono_counter_get_size (MonoCounter *counter)
{
Expand Down

0 comments on commit 65de909

Please sign in to comment.