Skip to content

Commit bfe5464

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 3a234f5 + ef7ab93 commit bfe5464

File tree

5 files changed

+55
-37
lines changed

5 files changed

+55
-37
lines changed

docs/build-insights/reference/sdk/c-event-data-types/event-data-struct.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: "EVENT_DATA structure"
3-
description: "The C++ Build Insights SDK EVENT_DATA structure reference."
4-
ms.date: "02/12/2020"
2+
title: "C++ Build Insights SDK EVENT_DATA structure"
3+
description: "The C++ Build Insights SDK EVENT_DATA structure reference. The EVENT_DATA structure describes an event received from an analysis or relogging session."
4+
ms.date: "04/27/2022"
5+
ms.topic: language-reference
6+
ms.custom: kr2b-contr-experiment
57
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "EVENT_DATA", "throughput analysis", "build time analysis", "vcperf.exe"]
68
---
79
# EVENT_DATA structure
@@ -13,7 +15,7 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To s
1315
::: moniker-end
1416
::: moniker range=">=msvc-150"
1517

16-
The `EVENT_DATA` structure describes an event received from an analysis or relogging session. These sessions are started by calling the [Analyze](../functions/analyze.md), [AnalyzeA](../functions/analyze-a.md), [AnalyzeW](../functions/analyze-w.md), [Relog](../functions/relog.md), [RelogA](../functions/relog-a.md), or [RelogW](../functions/relog-w.md) functions.
18+
The `EVENT_DATA` structure describes an event from an analysis or relogging session. The [Analyze](../functions/analyze.md), [AnalyzeA](../functions/analyze-a.md), [AnalyzeW](../functions/analyze-w.md), [Relog](../functions/relog.md), [RelogA](../functions/relog-a.md), or [RelogW](../functions/relog-w.md) functions start these sessions.
1719

1820
## Syntax
1921

@@ -51,14 +53,14 @@ typedef struct EVENT_DATA_TAG
5153
| `EventId` | A number that identifies the event. For a list of event identifiers, see [EVENT_ID](event-id-enum.md). |
5254
| `EventInstanceId` | A number that uniquely identifies the current event inside a trace. This value doesn't change when analyzing or relogging the same trace multiple times. Use this field to identify the same event in multiple analysis or relogging passes over the same trace. |
5355
| `TickFrequency` | The number of ticks per second to use when evaluating a duration measured in ticks. |
54-
| `StartTimestamp` | When the event is an *Activity*, this field is set to a tick value captured at the time the activity started. If this event is a *Simple Event*, this field is set to a tick value captured at the time the event occurred. |
55-
| `StopTimestamp` | When the event is an *Activity*, this field is set to a tick value captured at the time the activity stopped. If the stop event hasn't yet been received for this activity, this field is set to zero. If this event is a *Simple Event*, this field is set to zero. |
56-
| `ExclusiveDurationTicks` | If this event is an *Activity*, this field is set to the number of ticks that occurred directly in this activity. The number of ticks that occurred in a child activity are excluded. This field is set to zero for *Simple Events*. |
57-
| `CPUTicks` | If this event is an *Activity*, this field is set to the number of CPU ticks that occurred during this activity. A CPU tick is different from a regular tick. CPU ticks are only counted when the CPU is executing code in an activity. CPU ticks aren't counted when the thread associated with the activity is sleeping. This field is set to zero for *Simple Events*. |
58-
| `ExclusiveCPUTicks` | This field has the same meaning as `CPUTicks`, except that it doesn't include CPU ticks that occurred in children activities. This field is set to zero for *Simple Events*. |
59-
| `WallClockTimeResponsibilityTicks` | If this event is an *Activity*, this field is set to a tick count that represents this activity's contribution to overall wall-clock time. A wall-clock time responsibility tick is different from a regular tick. Wall-clock time responsibility ticks take into account parallelism between activities. For example, two parallel activities may have a duration of 50 ticks and the same start and stop time. In this case, both will be assigned a wall-clock time responsibility of 25 ticks. This field is set to zero for *Simple Events*. |
60-
| `ExclusiveWallClockTimeResponsibilityTicks` | This field has the same meaning as `WallClockTimeResponsibilityTicks`, except that it doesn't include the wall-clock time responsibility ticks of children activities. This field is set to zero for *Simple Events*. |
61-
| `Data` | Points to additional data stored in the event. The type of data pointed to is different, depending on the `EventId` field. |
56+
| `StartTimestamp` | When the event is an *Activity*, this field is the tick value captured at the time the activity started. If this event is a *Simple Event*, this field is a tick value captured at the time the event occurred. |
57+
| `StopTimestamp` | When the event is an *Activity*, this field is the tick value captured at the time the activity stopped. If the stop event hasn't yet been received for this activity, this field is zero. If this event is a *Simple Event*, this field is zero. |
58+
| `ExclusiveDurationTicks` | If this event is an *Activity*, this field is the number of ticks that occurred directly in this activity. The number of ticks that occurred in a child activity are excluded. This field is zero for *Simple Events*. |
59+
| `CPUTicks` | If this event is an *Activity*, this field is the number of CPU ticks that occurred during this activity. A CPU tick is different from a regular tick. CPU ticks are only counted when the CPU is executing code in an activity. CPU ticks aren't counted when the thread associated with the activity is sleeping. This field is zero for *Simple Events*. |
60+
| `ExclusiveCPUTicks` | This field has the same meaning as `CPUTicks`, except that it doesn't include CPU ticks that occurred in children activities. This field is zero for *Simple Events*. |
61+
| `WallClockTimeResponsibilityTicks` | If this event is an *Activity*, this field is a tick count that represents this activity's contribution to overall wall-clock time. A wall-clock time responsibility tick is different from a regular tick. Wall-clock time responsibility ticks take into account parallelism between activities. For example, two parallel activities may have a duration of 50 ticks and the same start and stop time. In this case, both will be assigned a wall-clock time responsibility of 25 ticks. This field is zero for *Simple Events*. |
62+
| `ExclusiveWallClockTimeResponsibilityTicks` | This field has the same meaning as `WallClockTimeResponsibilityTicks`, except that it doesn't include the wall-clock time responsibility ticks of children activities. This field is zero for *Simple Events*. |
63+
| `Data` | Points to other data stored in the event. The type of data pointed to is different, depending on the `EventId` field. |
6264
| `ProcessId` | The identifier for the process in which the event occurred. |
6365
| `ThreadId` | The identifier for the thread in which the event occurred. |
6466
| `ProcessorIndex` | The zero-indexed CPU number on which the event occurred. |
@@ -67,9 +69,13 @@ typedef struct EVENT_DATA_TAG
6769

6870
## Remarks
6971

70-
Many fields in `EVENT_DATA` contain tick counts. C++ Build Insights uses Window's performance counter as a source of ticks. A tick count must be used with the `TickFrequency` field to convert it into an appropriate time unit such as seconds. See the example below for performing this conversion. `EVENT_DATA` doesn't contain a field for the regular tick count of an activity. To obtain this value, subtract `StartTimestamp` from `StopTimestamp`. `EVENT_DATA` is a structure that's meant to be used by C API users. For C++ API users, classes like [Event](../cpp-event-data-types/event.md) do time conversions automatically.
72+
Many fields in `EVENT_DATA` contain tick counts. C++ Build Insights uses the Windows performance counter as a source of ticks. A tick count must be used with the `TickFrequency` field to convert it into an appropriate time unit such as seconds. See the [tick conversion example](#tick-conversion-example), below.
7173

72-
The value of the `EVENT_DATA` `Data` field depends on the value of its `EventId` field. The value of `Data` is described in the table below. Some entity identifiers may be missing from the table below. In this case, the `Data` field is set to **`nullptr`** or zero.
74+
`EVENT_DATA` doesn't contain a field for the regular tick count of an activity. To obtain this value, subtract `StartTimestamp` from `StopTimestamp`.
75+
76+
`EVENT_DATA` is a structure that's meant to be used by C API users. For C++ API users, classes like [Event](../cpp-event-data-types/event.md) do time conversions automatically.
77+
78+
The value of the `EVENT_DATA` `Data` field depends on the value of its `EventId` field. The value of `Data` is described in the table below. Some entity identifiers may be missing from the table below. In this case, the `Data` field is set to `nullptr` or zero.
7379

7480
| `EventId` value | Type pointed to by `Data` |
7581
|--|--|

docs/build-insights/reference/sdk/cpp-event-data-types/function.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: "Function class"
3-
description: "The C++ Build Insights SDK Function class reference."
4-
ms.date: "02/12/2020"
2+
title: "C++ Build Insights SDK Function class"
3+
description: "The C++ Build Insights SDK Function class reference. Use the Function class to match a FUNCTION event."
4+
ms.date: "04/27/2022"
5+
ms.topic: language-reference
6+
ms.custom: kr2b-contr-experiment
57
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Function", "throughput analysis", "build time analysis", "vcperf.exe"]
68
---
79
# Function class
@@ -29,7 +31,7 @@ public:
2931

3032
## Members
3133

32-
Along with the inherited members from its [Activity](activity.md) base class, the `Function` class contains the following members:
34+
Along with the inherited members from the [Activity](activity.md) base class, the `Function` class contains the following members:
3335

3436
### Constructors
3537

@@ -39,7 +41,7 @@ Along with the inherited members from its [Activity](activity.md) base class, th
3941

4042
[Name](#name)
4143

42-
## <a name="function"></a> Function
44+
## Function
4345

4446
```cpp
4547
Function(const RawEvent& event);
@@ -50,7 +52,7 @@ Function(const RawEvent& event);
5052
*event*\
5153
A [FUNCTION](../event-table.md#function) event.
5254
53-
## <a name="name"></a> Name
55+
## Name
5456
5557
```cpp
5658
const char* Name() const;

docs/build-insights/reference/sdk/cpp-event-data-types/pass1.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: "Pass1 class"
3-
description: "The C++ Build Insights SDK Pass1 class reference."
4-
ms.date: "02/12/2020"
2+
title: "C++ Build Insights SDK Pass1 class"
3+
description: "The C++ Build Insights SDK Pass1 class reference. Use the Pass1 class to match a PASS1 event"
4+
ms.date: "04/27/2022"
5+
ms.topic: language-reference
6+
ms.custom: kr2b-contr-experiment
57
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "Pass1", "throughput analysis", "build time analysis", "vcperf.exe"]
68
---
79
# Pass1 class
@@ -27,13 +29,13 @@ public:
2729

2830
## Members
2931

30-
Along with the inherited members from its [LinkerPass](linker-pass.md) base class, the `Pass1` class contains the following members:
32+
Along with the inherited members from the [LinkerPass](linker-pass.md) base class, the `Pass1` class contains the following members:
3133

3234
### Constructors
3335

3436
[Pass1](#pass1)
3537

36-
## <a name="pass1"></a> Pass1
38+
## Pass1
3739

3840
```cpp
3941
Pass1(const RawEvent& event);

docs/build-insights/reference/sdk/functions/make-static-analyzer-group.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: "MakeStaticAnalyzerGroup"
3-
description: "The C++ Build Insights SDK MakeStaticAnalyzerGroup function reference."
4-
ms.date: "02/12/2020"
2+
title: "C++ Build Insights SDK MakeStaticAnalyzerGroup"
3+
description: "The C++ Build Insights SDK MakeStaticAnalyzerGroup function reference. Use this function to create a static analyzer group for functions like Analyze or Relog."
4+
ms.date: "04/27/2022"
5+
ms.topic: language-reference
6+
ms.custom: kr2b-contr-experiment
57
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "MakeStaticAnalyzerGroup", "throughput analysis", "build time analysis", "vcperf.exe"]
68
---
79
# MakeStaticAnalyzerGroup
@@ -13,7 +15,7 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To s
1315
::: moniker-end
1416
::: moniker range=">=msvc-150"
1517

16-
The `MakeStaticAnalyzerGroup` function is used to create a static analyzer group that can be passed to functions such as [`Analyze`](analyze.md) or [`Relog`](relog.md). Members of an analyzer group receive events one by one from left to right, until all events in a trace get analyzed.
18+
The `MakeStaticAnalyzerGroup` function creates a static analyzer group that you can pass to functions such as [`Analyze`](analyze.md) or [`Relog`](relog.md). Members of an analyzer group receive events one by one from left to right, until all events in a trace are analyzed.
1719

1820
## Syntax
1921

@@ -32,10 +34,12 @@ A parameter pack of [`IAnalyzer`](../other-types/ianalyzer-class.md) pointers in
3234
3335
### Return Value
3436
35-
A static analyzer group. Use the **`auto`** keyword to capture the return value.
37+
A static analyzer group. Use the `auto` keyword to capture the return value.
3638
3739
## Remarks
3840
39-
Unlike dynamic analyzer groups, the members of a static analyzer group must be known at compile time. Additionally, a static analyzer group contains [`IAnalyzer`](../other-types/ianalyzer-class.md) pointers that don't have polymorphic behavior. When using a static analyzer group to analyze an Event Tracing for Windows (ETW) trace, calls to the `IAnalyzer` interface always resolve to the object directly pointed to by the analyzer group member. This loss of flexibility comes with a possibility of faster event processing times. If the members of an analyzer group can't be known at compile time, or if you require polymorphic behavior on your `IAnalyzer` pointers, consider using a dynamic analyzer group. To use a dynamic analyzer group, call [`MakeDynamicAnalyzerGroup`](make-static-analyzer-group.md) instead.
41+
Unlike dynamic analyzer groups, the members of a static analyzer group must be known at compile time. Also, a static analyzer group contains [`IAnalyzer`](../other-types/ianalyzer-class.md) pointers that don't have polymorphic behavior. When a static analyzer group analyzes an Event Tracing for Windows (ETW) trace, calls to the `IAnalyzer` interface always resolve to the object directly pointed to by the analyzer group member. This loss of flexibility comes with a possibility of faster event processing.
42+
43+
If the members of an analyzer group can't be known at compile time, or if you require polymorphic behavior on your `IAnalyzer` pointers, consider using a dynamic analyzer group. To use a dynamic analyzer group, call [`MakeDynamicAnalyzerGroup`](make-static-analyzer-group.md) instead.
4044
4145
::: moniker-end

docs/build-insights/reference/sdk/functions/stop-tracing-session.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
title: "StopTracingSession"
3-
description: "The C++ Build Insights SDK StopTracingSession function reference."
4-
ms.date: "02/12/2020"
2+
title: "C++ Build Insights SDK StopTracingSession"
3+
description: "The C++ Build Insights SDK StopTracingSession function reference. StopTracingSession stops an ongoing tracing session and produces a raw trace file."
4+
ms.date: "04/27/2022"
5+
ms.topic: language-reference
6+
ms.custom: kr2b-contr-experiment
57
helpviewer_keywords: ["C++ Build Insights", "C++ Build Insights SDK", "StopTracingSession", "throughput analysis", "build time analysis", "vcperf.exe"]
68
---
79
# StopTracingSession
@@ -13,7 +15,9 @@ The C++ Build Insights SDK is compatible with Visual Studio 2017 and later. To s
1315
::: moniker-end
1416
::: moniker range=">=msvc-150"
1517

16-
The `StopTracingSession` function stops an ongoing tracing session and produces a raw trace file. Raw trace files can be passed to the [Analyze](analyze.md), [AnalzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. Raw trace files can also be passed to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start a relogging session. Executables calling `StopTracingSession` must have administrator privileges.
18+
The `StopTracingSession` function stops an ongoing tracing session and produces a raw trace file. You can pass raw trace files to the [Analyze](analyze.md), [AnalzeA](analyze-a.md), and [AnalyzeW](analyze-w.md) functions to start an analysis session. You can pass raw trace files to the [Relog](relog.md), [RelogA](relog-a.md), and [RelogW](relog-w.md) functions to start a relogging session.
19+
20+
The caller must have administrator permissions to use `StopTracingSession`.
1721

1822
## Syntax
1923

@@ -32,10 +36,10 @@ inline RESULT_CODE StopTracingSession(
3236
### Parameters
3337
3438
*sessionName*\
35-
The name of the tracing session to stop. Use the same session name as the one passed to [StartTracingSession](start-tracing-session.md), [StartTracingSessionA](start-tracing-session-a.md), or [StartTracingSessionW](start-tracing-session-w.md).
39+
The name of the tracing session to stop. Use the same session name as used for [StartTracingSession](start-tracing-session.md), [StartTracingSessionA](start-tracing-session-a.md), or [StartTracingSessionW](start-tracing-session-w.md).
3640
3741
*outputLogFile*\
38-
Path to the final output log file where the raw trace should be saved.
42+
Full path of the final output log file to save the raw trace.
3943
4044
*statistics*\
4145
Pointer to a [TRACING_SESSION_STATISTICS](../other-types/tracing-session-statistics-struct.md) object. `StopTracingSession` writes trace collection statistics in this object before returning.

0 commit comments

Comments
 (0)