Skip to content

Commit ef2e7ae

Browse files
committed
[release/9.0.1xx] Use 'EnableDiagnostics' instead of 'EnableProfiler'.
Ref: dotnet/runtime#115473 (comment) Android will do the same. Backport of #22982.
1 parent 24fd1ca commit ef2e7ae

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

docs/building-apps/build-properties.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,24 +314,24 @@ If the .pkg that was created (if `CreatePackage` was enabled) should be signed.
314314

315315
Only applicable to macOS and Mac Catalyst.
316316

317-
## EnableProfiler
317+
## EnableDiagnostics
318318

319-
Enable components that are required for profiling to work.
319+
Enable components that are required for diagnostics (such as profiling) to work.
320320

321321
It's enabled by default for debug builds (when [MtouchDebug](#MtouchDebug) or
322322
[MmpDebug](#MmpDebug) is enabled), but needs to be enabled manually before
323323
profiling release builds:
324324

325325
```xml
326326
<PropertyGroup>
327-
<EnableProfiler>true</EnableProfiler>
327+
<EnableDiagnostics>true</EnableDiagnostics>
328328
</PropertyGroup>
329329
```
330330

331331
This will increase the app size slightly.
332332

333333
Only applicable when using the Mono runtime (CoreCLR always supports
334-
profiling, while NativeAOT never does).
334+
diagnostics, while NativeAOT never does).
335335

336336
## EnableSGenConc
337337

dotnet/targets/Xamarin.Shared.Sdk.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@
452452
<ItemGroup>
453453
<_MonoComponent Include="hot_reload" Condition="'$(MtouchInterpreter)' != ''" />
454454
<_MonoComponent Include="debugger" Condition="'$(_BundlerDebug)' == 'true'" />
455-
<_MonoComponent Include="diagnostics_tracing" Condition="'$(EnableProfiler)' == 'true'" />
455+
<_MonoComponent Include="diagnostics_tracing" Condition="'$(EnableDiagnostics)' == 'true'" />
456456
<_MonoComponent Include="marshal-ilgen" Condition="'$(_AppleExcludeMarshalIlgenComponent)' != 'true'" />
457457
</ItemGroup>
458458
</Target>

msbuild/Xamarin.Shared/Xamarin.Shared.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Copyright (C) 2020 Microsoft. All rights reserved.
237237
<!-- that also encapsulates whether we're a library or not (this makes conditions simpler) -->
238238
<_BundleOriginalResources Condition="'$(OutputType)' == 'Library' And '$(IsAppExtension)' != 'true' And '$(BundleOriginalResources)' == 'true'">true</_BundleOriginalResources>
239239

240-
<EnableProfiler Condition="'$(EnableProfiler)' == '' And '$(_BundlerDebug)' == 'true'">true</EnableProfiler>
240+
<EnableDiagnostics Condition="'$(EnableDiagnostics)' == '' And '$(_BundlerDebug)' == 'true'">true</EnableDiagnostics>
241241
</PropertyGroup>
242242

243243
<PropertyGroup Condition="'$(IsBindingProject)' == 'true'">

tools/common/Application.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public bool AreAnyAssembliesTrimmed {
148148
public List<string> WarnOnTypeRef = new List<string> ();
149149

150150
public bool EnableSGenConc;
151-
public bool EnableProfiling;
151+
public bool EnableDiagnostics;
152152
public bool? DebugTrack;
153153

154154
public Dictionary<string, string> EnvironmentVariables = new Dictionary<string, string> ();

tools/common/Target.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public void CollectAllSymbols ()
360360
}
361361

362362
#if MONOTOUCH
363-
if (App.EnableProfiling && App.LibProfilerLinkMode == AssemblyBuildTarget.StaticObject)
363+
if (App.EnableDiagnostics && App.LibProfilerLinkMode == AssemblyBuildTarget.StaticObject)
364364
dynamic_symbols.AddFunction ("mono_profiler_init_log");
365365
#endif
366366

@@ -678,7 +678,7 @@ void GenerateIOSMain (StringWriter sw, Abi abi)
678678
// On iOS we can pass -u to the native linker, but that doesn't work on tvOS, where
679679
// we're building with bitcode (even when bitcode is disabled, we still build with the
680680
// bitcode marker, which makes the linker reject -u).
681-
if (app.EnableProfiling) {
681+
if (app.EnableDiagnostics) {
682682
sw.WriteLine ("extern \"C\" { void mono_profiler_init_log (); }");
683683
sw.WriteLine ("typedef void (*xamarin_profiler_symbol_def)();");
684684
sw.WriteLine ("extern xamarin_profiler_symbol_def xamarin_profiler_symbol;");
@@ -706,7 +706,7 @@ void GenerateIOSMain (StringWriter sw, Abi abi)
706706
sw.WriteLine ("void xamarin_setup_impl ()");
707707
sw.WriteLine ("{");
708708

709-
if (app.EnableProfiling)
709+
if (app.EnableDiagnostics)
710710
sw.WriteLine ("\txamarin_profiler_symbol = mono_profiler_init_log;");
711711

712712
if (app.UseInterpreter) {

0 commit comments

Comments
 (0)