You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Call specification (":::no-loc text="callspec":::", sequence and timing of function calls) and instrumentation
39
39
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`
41
48
42
49
```xml
43
50
<PropertyGroup>
@@ -68,11 +75,9 @@ Add Blazor start configuration in `wwwroot/index.html`, using the [fingerprinted
68
75
</script>
69
76
```
70
77
71
-
## Call specification (`callspec`)
72
-
73
-
If you want to filter profiled methods, you can use 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).
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).
76
81
77
82
Add `callspec` to the `browser` WebAssembly profiler in the `<WasmProfilers>` element. In the following example, the `{APP NAMESPACE}` placeholder is the app's namespace:
78
83
@@ -109,20 +114,20 @@ Enable integration with the log profiler using the `<WasmProfilers>` and `<WasmB
109
114
</PropertyGroup>
110
115
```
111
116
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:
113
118
114
119
```csharp
115
120
namespace {APP NAMESPACE};
116
121
117
-
classProfiling
122
+
publicclassProfiling
118
123
{
119
124
[JSExport]
120
125
[MethodImpl(MethodImplOptions.NoInlining)]
121
126
publicstaticvoidTakeHeapshot() { }
122
127
}
123
128
```
124
129
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.
126
131
127
132
## EventPipe profiler
128
133
@@ -181,7 +186,7 @@ The following example:
181
186
182
187
In the project file (`.csproj`), the following properties enable integration with the browser's profiler:
183
188
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.
185
190
*`<WasmPerfTracing>`: Enables diagnostic server.
186
191
*`<WasmPerfInstrumentation>`: Enables performance instrumentation for the sampling CPU profiler.
187
192
*`<MetricsSupport>`: Enables metrics. For more information, see the [`System.Diagnostics.Metrics` namespace](/dotnet/api/system.diagnostics.metrics).
0 commit comments