Skip to content

Commit fc1421a

Browse files
committed
Updates
1 parent 3a30f36 commit fc1421a

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

aspnetcore/blazor/performance/profiling.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,14 @@ Built-in performance counters are available to track:
3737
* [JIT (Just-In-Time) interpolation](https://developer.mozilla.org/docs/Glossary/Just_In_Time_Compilation)
3838
* Call specification (":::no-loc text="callspec":::", sequence and timing of function calls) and instrumentation
3939

40-
Enable integration with the browser's developer tools profiler using the `<WasmProfilers>` property in the app's project file (`.csproj`). The following additional properties that the native code produced by AOT has symbols, which are visible in the browser devtools profiler:
40+
Enable integration with the browser's developer tools profiler using the `<WasmProfilers>` property in the app's project file (`.csproj`). Include the following additional properties:
41+
42+
* `<WasmProfilers>`: The "`browser`" profiler enables integration with the profiler in the browser's developer tools.
43+
* `<RunAOTCompilation>`: Run AOT compilation. Default: `false`
44+
* `<RunAOTCompilationAfterBuild>`: Run AOT compilation after build. By default, it is run only for publish. Default: `false`
45+
* `<WasmNativeStrip>`: Set to `false` to prevent stripping the native executable. Default: `true`
46+
* `<WasmNativeDebugSymbols>`: Build with native debug symbols. Default: `true`
47+
* `<WasmBuildNative>`: Build the native executable. Default: `false`
4148

4249
```xml
4350
<PropertyGroup>
@@ -68,11 +75,9 @@ Add Blazor start configuration in `wwwroot/index.html`, using the [fingerprinted
6875
</script>
6976
```
7077

71-
## Call specification (`callspec`)
72-
73-
If you want to filter profiled methods, you can use callspec
78+
## Call specification (:::no-loc text="callspec":::)
7479

75-
For more information, see [Trace MonoVM profiler events during startup](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md#trace-monovm-profiler-events-during-startup).
80+
If you want to filter profiled methods, you can use call specification (:::no-loc text="callspec":::). For more information, see [Trace MonoVM profiler events during startup](https://github.com/dotnet/runtime/blob/main/docs/design/mono/diagnostics-tracing.md#trace-monovm-profiler-events-during-startup).
7681

7782
Add `callspec` to the `browser` WebAssembly profiler in the `<WasmProfilers>` element. In the following example, the `{APP NAMESPACE}` placeholder is the app's namespace:
7883

@@ -109,20 +114,20 @@ Enable integration with the log profiler using the `<WasmProfilers>` and `<WasmB
109114
</PropertyGroup>
110115
```
111116

112-
In order to trigger a heap shot, add the following, where the `{APP NAMESPACE}` placeholder is the app's namespace:
117+
To trigger a heap shot, add the following, where the `{APP NAMESPACE}` placeholder is the app's namespace:
113118

114119
```csharp
115120
namespace {APP NAMESPACE};
116121

117-
class Profiling
122+
public class Profiling
118123
{
119124
[JSExport]
120125
[MethodImpl(MethodImplOptions.NoInlining)]
121126
public static void TakeHeapshot() { }
122127
}
123128
```
124129

125-
Invoke `{APP NAMESPACE}.Profiling.TakeHeapshot()` from your code in order to create a memory heap shot and flush the contents of the profile to the file system. Download the resulting `.mpld` file to analyze the data.
130+
Invoke `TakeHeapshot` to create a memory heap shot and flush the contents of the profile to the file system. Download the resulting `.mpld` file to analyze the data.
126131

127132
## EventPipe profiler
128133

@@ -181,7 +186,7 @@ The following example:
181186

182187
In the project file (`.csproj`), the following properties enable integration with the browser's profiler:
183188

184-
* `<WasmProfilers>`: Enables integration with the profiler in the browser's developer tools.
189+
* `<WasmProfilers>`: The "`browser`" profiler enables integration with the profiler in the browser's developer tools.
185190
* `<WasmPerfTracing>`: Enables diagnostic server.
186191
* `<WasmPerfInstrumentation>`: Enables performance instrumentation for the sampling CPU profiler.
187192
* `<MetricsSupport>`: Enables metrics. For more information, see the [`System.Diagnostics.Metrics` namespace](/dotnet/api/system.diagnostics.metrics).

0 commit comments

Comments
 (0)