Skip to content

Commit e865aab

Browse files
committed
Address grammatical feedback
1 parent c98ecd5 commit e865aab

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

docs/core/diagnostics/dotnet-trace.md

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ The `dotnet-trace` tool:
4444
* Enables the collection of .NET Core traces of a running process without a native profiler.
4545
* Is built on [`EventPipe`](./eventpipe.md) of the .NET Core runtime.
4646
* Supports two different ways of collecting traces:
47-
- The [`collect` verb](#dotnet-trace-collect) offers consistent functionality on any OS
48-
- The [`collect-linux` verb](#dotnet-trace-collect-linux) uses Linux-specific OS capabilities to provide additional features
4947

50-
| | collect | collect-linux |
51-
|------------------------------------------|----------|-----------------------------------|
52-
| Supported OS | Any | Linux only, kernel version >= 6.4 |
53-
| Requires Admin/Root Privilege | No | Yes |
54-
| Trace all processes simultaneously | No | Supported |
55-
| Capture native library and kernel events | No | Supported |
56-
| Event callstacks include native frames | No | Yes |
48+
- The [`collect` verb](#dotnet-trace-collect) offers consistent functionality on any OS.
49+
- The [`collect-linux` verb](#dotnet-trace-collect-linux) uses Linux-specific OS capabilities to provide additional features.
50+
51+
| Characteristic | `collect` | `collect-linux` |
52+
|------------------------------------------|----------|-----------------------------------|
53+
| 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 |
5758

5859
## Options
5960

@@ -130,7 +131,7 @@ dotnet-trace collect
130131

131132
- **`--clrevents <clrevents>`**
132133

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:
134135

135136
| Keyword String Alias | Keyword Hex Value |
136137
| ------------ | ------------------- |
@@ -174,7 +175,7 @@ dotnet-trace collect
174175
| `waithandle` | `0x40000000000` |
175176
| `allocationsampling` | `0x80000000000` |
176177

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).
178179

179180
- **`--dsrouter {ios|ios-sim|android|android-emu}**
180181

@@ -222,7 +223,7 @@ dotnet-trace collect
222223
223224
- **`--profile <list-of-comma-separated-profile-names>`**
224225

225-
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`.
226227

227228
When `--profile`, `--providers`, and `--clrevents` are all omitted, `dotnet-trace collect` enables profiles `dotnet-common` and `dotnet-sampled-thread-time` by default.
228229

@@ -237,17 +238,16 @@ dotnet-trace collect
237238
|`database`|Captures ADO.NET and Entity Framework database commands.|
238239

239240
> [!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"`.
241242
242243
- **`--providers <list-of-comma-separated-providers>`**
243244

244245
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`.
245246

246-
This list of providers is in the form:
247+
This list of providers is in the form `Provider[,Provider]`:
247248

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]`
251251

252252
To learn more about some of the well-known providers in .NET, refer to [Well-known Event Providers](./well-known-event-providers.md).
253253

@@ -291,14 +291,14 @@ dotnet-trace collect
291291
## dotnet-trace collect-linux
292292

293293
> [!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.
295295
296296
Collects diagnostic traces using perf_events, a Linux OS technology. `collect-linux` enables the following additional features over [`collect`](#dotnet-trace-collect).
297297

298298
| | collect | collect-linux |
299299
|------------------------------------------|----------|-----------------------------------|
300300
| Supported OS | Any | Linux only, kernel version >= 6.4 |
301-
| Requires Admin/Root Privilege | No | Yes |
301+
| Requires Admin/Root privilege | No | Yes |
302302
| Trace all processes simultaneously | No | Supported |
303303
| Capture native library and kernel events | No | Supported |
304304
| Event callstacks include native frames | No | Yes |
@@ -343,7 +343,7 @@ When `--providers`, `--profile`, `--clrevents`, and `--perf-events` aren’t spe
343343
- `dotnet-common` — lightweight .NET runtime diagnostics.
344344
- `cpu-sampling` — kernel CPU sampling.
345345

346-
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>`.
347347

348348
### Options
349349

@@ -353,13 +353,12 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
353353

354354
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`.
355355

356-
This list of providers is in the form:
356+
This list of providers is in the form `Provider[,Provider]`:
357357

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]`
361360

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).
363362

364363
- **`--clreventlevel <clreventlevel>`**
365364

@@ -377,7 +376,7 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
377376

378377
- **`--clrevents <clrevents>`**
379378

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:
381380

382381
| Keyword String Alias | Keyword Hex Value |
383382
| ------------ | ------------------- |
@@ -421,7 +420,7 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
421420
| `waithandle` | `0x40000000000` |
422421
| `allocationsampling` | `0x80000000000` |
423422

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).
425424

426425
- **`--perf-events <list-of-perf-events>`**
427426

@@ -431,7 +430,7 @@ By default all processes on the machine will be traced. Use `-n, --name <name>`
431430

432431
- **`--profile <list-of-comma-separated-profile-names>`**
433432

434-
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`.
435434

436435
When `--profile`, `--providers`, `--clrevents`, and `--perf-events` are all omitted, `dotnet-trace collect-linux` enables profiles `dotnet-common` and `cpu-sampling` by default.
437436

@@ -470,7 +469,7 @@ See [Default collection behavior](#default-collection-behavior)
470469

471470
> [!NOTE]
472471
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.
474473
475474
## dotnet-trace convert
476475

@@ -612,7 +611,7 @@ To collect traces using `dotnet-trace collect`:
612611
Trace completed.
613612
```
614613

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.
616615

617616
## Launch a child application and collect a trace from its startup using dotnet-trace
618617

0 commit comments

Comments
 (0)