Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,24 +314,24 @@ If the .pkg that was created (if `CreatePackage` was enabled) should be signed.

Only applicable to macOS and Mac Catalyst.

## EnableProfiler
## EnableDiagnostics

Enable components that are required for profiling to work.
Enable components that are required for diagnostics (such as profiling) to work.

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

```xml
<PropertyGroup>
<EnableProfiler>true</EnableProfiler>
<EnableDiagnostics>true</EnableDiagnostics>
</PropertyGroup>
```

This will increase the app size slightly.

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

## EnableSGenConc

Expand Down
2 changes: 1 addition & 1 deletion dotnet/targets/Xamarin.Shared.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@
<ItemGroup>
<_MonoComponent Include="hot_reload" Condition="'$(MtouchInterpreter)' != ''" />
<_MonoComponent Include="debugger" Condition="'$(_BundlerDebug)' == 'true'" />
<_MonoComponent Include="diagnostics_tracing" Condition="'$(EnableProfiler)' == 'true'" />
<_MonoComponent Include="diagnostics_tracing" Condition="'$(EnableDiagnostics)' == 'true'" />
<_MonoComponent Include="marshal-ilgen" Condition="'$(_AppleExcludeMarshalIlgenComponent)' != 'true'" />
</ItemGroup>
</Target>
Expand Down
2 changes: 1 addition & 1 deletion msbuild/Xamarin.Shared/Xamarin.Shared.props
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Copyright (C) 2020 Microsoft. All rights reserved.
<!-- that also encapsulates whether we're a library or not (this makes conditions simpler) -->
<_BundleOriginalResources Condition="'$(OutputType)' == 'Library' And '$(IsAppExtension)' != 'true' And '$(BundleOriginalResources)' == 'true'">true</_BundleOriginalResources>

<EnableProfiler Condition="'$(EnableProfiler)' == '' And '$(_BundlerDebug)' == 'true'">true</EnableProfiler>
<EnableDiagnostics Condition="'$(EnableDiagnostics)' == '' And '$(_BundlerDebug)' == 'true'">true</EnableDiagnostics>

<!-- Set the name of the native executable -->
<_NativeExecutableName Condition="'$(_NativeExecutableName)' == ''">$(AssemblyName)</_NativeExecutableName>
Expand Down
2 changes: 1 addition & 1 deletion tools/common/Application.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public bool AreAnyAssembliesTrimmed {
public List<string> WarnOnTypeRef = new List<string> ();

public bool EnableSGenConc;
public bool EnableProfiling;
public bool EnableDiagnostics;
public bool? DebugTrack;

public Dictionary<string, string> EnvironmentVariables = new Dictionary<string, string> ();
Expand Down
6 changes: 3 additions & 3 deletions tools/common/Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public void CollectAllSymbols ()
}

#if MONOTOUCH
if (App.EnableProfiling && App.LibProfilerLinkMode == AssemblyBuildTarget.StaticObject)
if (App.EnableDiagnostics && App.LibProfilerLinkMode == AssemblyBuildTarget.StaticObject)
dynamic_symbols.AddFunction ("mono_profiler_init_log");
#endif

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

if (app.EnableProfiling)
if (app.EnableDiagnostics)
sw.WriteLine ("\txamarin_profiler_symbol = mono_profiler_init_log;");

if (app.UseInterpreter) {
Expand Down
Loading