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
| Supported OS | Any | Linux only, kernel version >= 6.4 |
54
+
| Requires Admin/Root Privilege | No | Yes |
55
+
| Trace all processes simultaneously | No | Supported |
56
+
| Capture native library and kernel events | No | Supported |
57
+
| Event callstacks include native frames | No | Yes |
57
58
58
59
## Options
59
60
@@ -130,7 +131,7 @@ dotnet-trace collect
130
131
131
132
-**`--clrevents <clrevents>`**
132
133
133
-
A list of CLR runtime provider keywords to enable separated by `+` signs. This is a simple mapping that lets you specify event keywords via string aliases rather than their hex values. For example, `dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:3:4` requests the same set of events as `dotnet-trace collect --clrevents gc+gchandle --clreventlevel informational`. If the CLR runtime provider `Microsoft-Windows-DotNETRuntime` is also enabled through `--providers` or `--profile`, this option will be ignored. The table below shows the list of available keywords:
134
+
A list of CLR runtime provider keywords to enable separated by `+` signs. This is a simple mapping that lets you specify event keywords via string aliases rather than their hex values. For example, `dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:3:4` requests the same set of events as `dotnet-trace collect --clrevents gc+gchandle --clreventlevel informational`. If the CLR runtime provider `Microsoft-Windows-DotNETRuntime` is also enabled through `--providers` or `--profile`, this option is ignored. The following table shows the list of available keywords:
134
135
135
136
| Keyword String Alias | Keyword Hex Value |
136
137
| ------------ | ------------------- |
@@ -174,7 +175,7 @@ dotnet-trace collect
174
175
|`waithandle`|`0x40000000000`|
175
176
|`allocationsampling`|`0x80000000000`|
176
177
177
-
You can read about the CLR provider more in detail on the [.NET runtime provider reference documentation](../../fundamentals/diagnostics/runtime-events.md).
178
+
You can read about the CLR provider in more detail on the [.NET runtime provider reference documentation](../../fundamentals/diagnostics/runtime-events.md).
A profile is a pre-defined set of provider configurations for common tracing scenarios. Multiple profiles can be specified at a time, delimited by commas. Providers configured through `--providers` will override the profile's configuration. Similarly, if any profile configures the CLR runtime provider, it will override any configurations prescribed through `--clrevents`.
226
+
A profile is a predefined set of provider configurations for common tracing scenarios. Multiple profiles can be specified at a time, delimited by commas. Providers configured through `--providers` override the profile's configuration. Similarly, if any profile configures the CLR runtime provider, it will override any configurations prescribed through `--clrevents`.
226
227
227
228
When `--profile`, `--providers`, and `--clrevents` are all omitted, `dotnet-trace collect` enables profiles `dotnet-common` and `dotnet-sampled-thread-time` by default.
228
229
@@ -237,17 +238,16 @@ dotnet-trace collect
237
238
|`database`|Captures ADO.NET and Entity Framework database commands.|
238
239
239
240
> [!NOTE]
240
-
> In past versions of the dotnet-trace tool, the collect verb supported a profile called `cpu-sampling`. This profile was removed because the name was misleading. It sampled all threads regardless of their CPU usage. You can achieve a similar result now using `--profile dotnet-sampled-thread-time,dotnet-common`. If you need to match the former `cpu-sampling` behavior exactly use `--profile dotnet-sampled-thread-time --providers "Microsoft-Windows-DotNETRuntime:0x14C14FCCBD:4"`.
241
+
> In past versions of the dotnet-trace tool, the collect verb supported a profile called `cpu-sampling`. This profile was removed because the name was misleading. It sampled all threads regardless of their CPU usage. You can achieve a similar result now using `--profile dotnet-sampled-thread-time,dotnet-common`. If you need to match the former `cpu-sampling` behavior exactly, use `--profile dotnet-sampled-thread-time --providers "Microsoft-Windows-DotNETRuntime:0x14C14FCCBD:4"`.
A comma-separated list of `EventPipe` providers to be enabled. These providers supplement any providers implied by `--profile <list-of-comma-separated-profile-names>`. If there's any inconsistency for a particular provider, this configuration takes precedence over the implicit configuration from `--profile` and `--clrevents`.
245
246
246
-
This list of providers is in the form:
247
+
This list of providers is in the form`Provider[,Provider]`:
247
248
248
-
-`Provider[,Provider]`
249
-
-`Provider` is in the form: `KnownProviderName[:Flags[:Level[:KeyValueArgs]]]`.
250
-
-`KeyValueArgs` is in the form: `[key1=value1][;key2=value2]`.
249
+
-`Provider` is in the form: `KnownProviderName[:Flags[:Level[:KeyValueArgs]]]`
250
+
-`KeyValueArgs` is in the form: `[key1=value1][;key2=value2]`
251
251
252
252
To learn more about some of the well-known providers in .NET, refer to [Well-known Event Providers](./well-known-event-providers.md).
253
253
@@ -291,14 +291,14 @@ dotnet-trace collect
291
291
## dotnet-trace collect-linux
292
292
293
293
> [!NOTE]
294
-
> The collect-linux verb is a new preview feature and relies on an updated version of the .nettrace file format. The latest PerfView release supports these trace files but other ways of using the trace file such as [`convert`](#dotnet-trace-convert) and [`report`](#dotnet-trace-report) may not work yet.
294
+
> The `collect-linux` verb is a new preview feature and relies on an updated version of the .nettrace file format. The latest PerfView release supports these trace files, but other ways of using the trace file, such as [`convert`](#dotnet-trace-convert) and [`report`](#dotnet-trace-report), might not work yet.
295
295
296
296
Collects diagnostic traces using perf_events, a Linux OS technology. `collect-linux` enables the following additional features over [`collect`](#dotnet-trace-collect).
By default all processes on the machine will be traced. Use `-n, --name <name>` or `-p|--process-id <PID>` to trace only one process.
346
+
By default, all processes on the machine are traced. To trace only one process, use `-n, --name <name>` or `-p|--process-id <PID>`.
347
347
348
348
### Options
349
349
@@ -353,13 +353,12 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
353
353
354
354
A comma-separated list of `EventPipe` providers to be enabled. These providers supplement any providers implied by `--profile <list-of-comma-separated-profile-names>`. If there's any inconsistency for a particular provider, this configuration takes precedence over the implicit configuration from `--profile` and `--clrevents`.
355
355
356
-
This list of providers is in the form:
356
+
This list of providers is in the form`Provider[,Provider]`:
357
357
358
-
-`Provider[,Provider]`
359
-
-`Provider` is in the form: `KnownProviderName[:Flags[:Level[:KeyValueArgs]]]`.
360
-
-`KeyValueArgs` is in the form: `[key1=value1][;key2=value2]`.
358
+
-`Provider` is in the form: `KnownProviderName[:Flags[:Level[:KeyValueArgs]]]`
359
+
-`KeyValueArgs` is in the form: `[key1=value1][;key2=value2]`
361
360
362
-
To learn more about some of the well-known providers in .NET, refer to[Well-known Event Providers](./well-known-event-providers.md).
361
+
To learn more about some of the well-known providers in .NET, see[Well-known Event Providers](./well-known-event-providers.md).
363
362
364
363
-**`--clreventlevel <clreventlevel>`**
365
364
@@ -377,7 +376,7 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
377
376
378
377
-**`--clrevents <clrevents>`**
379
378
380
-
A list of CLR runtime provider keywords to enable separated by `+` signs. This is a simple mapping that lets you specify event keywords via string aliases rather than their hex values. For example, `dotnet-trace collect-linux --providers Microsoft-Windows-DotNETRuntime:3:4` requests the same set of events as `dotnet-trace collect-linux --clrevents gc+gchandle --clreventlevel informational`. If the CLR runtime provider `Microsoft-Windows-DotNETRuntime` is also enabled through `--providers` or `--profile`, this option will be ignored. The table below shows the list of available keywords:
379
+
A list of CLR runtime provider keywords to enable separated by `+` signs. This is a simple mapping that lets you specify event keywords via string aliases rather than their hex values. For example, `dotnet-trace collect-linux --providers Microsoft-Windows-DotNETRuntime:3:4` requests the same set of events as `dotnet-trace collect-linux --clrevents gc+gchandle --clreventlevel informational`. If the CLR runtime provider `Microsoft-Windows-DotNETRuntime` is also enabled through `--providers` or `--profile`, this option is ignored. The following table shows the list of available keywords:
381
380
382
381
| Keyword String Alias | Keyword Hex Value |
383
382
| ------------ | ------------------- |
@@ -421,7 +420,7 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
421
420
|`waithandle`|`0x40000000000`|
422
421
|`allocationsampling`|`0x80000000000`|
423
422
424
-
You can read about the CLR provider more in detail on the [.NET runtime provider reference documentation](../../fundamentals/diagnostics/runtime-events.md).
423
+
You can read about the CLR provider in more detail on the [.NET runtime provider reference documentation](../../fundamentals/diagnostics/runtime-events.md).
425
424
426
425
-**`--perf-events <list-of-perf-events>`**
427
426
@@ -431,7 +430,7 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
A profile is a pre-defined set of provider configurations for common tracing scenarios. Multiple profiles can be specified at a time, delimited by commas. Providers configured through `--providers` will override the profile's configuration. Similarly, if any profile configures the CLR runtime provider, it will override any configurations prescribed through `--clrevents`.
433
+
A profile is a predefined set of provider configurations for common tracing scenarios. Multiple profiles can be specified at a time, delimited by commas. Providers configured through `--providers` override the profile's configuration. Similarly, if any profile configures the CLR runtime provider, it will override any configurations prescribed through `--clrevents`.
435
434
436
435
When `--profile`, `--providers`, `--clrevents`, and `--perf-events` are all omitted, `dotnet-trace collect-linux` enables profiles `dotnet-common` and `cpu-sampling` by default.
437
436
@@ -470,7 +469,7 @@ See [Default collection behavior](#default-collection-behavior)
470
469
471
470
> [!NOTE]
472
471
473
-
> -To collect a trace using `dotnet-trace collect-linux`, it needs to be run with root permissions (`CAP_PERFMON`/`CAP_SYS_ADMIN`). Otherwise, the tool will fail to collect events.
472
+
> To collect a trace using `dotnet-trace collect-linux`, it needs to be run with root permissions (`CAP_PERFMON`/`CAP_SYS_ADMIN`). Otherwise, the tool will fail to collect events.
474
473
475
474
## dotnet-trace convert
476
475
@@ -612,7 +611,7 @@ To collect traces using `dotnet-trace collect`:
612
611
Trace completed.
613
612
```
614
613
615
-
- Stop collection by pressing the `<Enter>` key. `dotnet-trace` will finish logging events to the `.nettrace` file.
614
+
- Stop collection by pressing the <kbd>Enter</kbd> key. `dotnet-trace` will finish logging events to the `.nettrace` file.
616
615
617
616
## Launch a child application and collect a trace from its startup using dotnet-trace
0 commit comments