Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Represents a collection of SampledCounters.
Element Hierarchy
- <WindowsPerformanceRecorder>
- <Profiles>
- <HardwareCounter>
- <SampledCounters>
- <Profile>
- <Collectors>
- <SystemCollectorId>
- <HardwareCounterId>
- <SampledCounters>
- <HardwareCounter>
- <SampledCounters>
- <HardwareCounterId>
- <SystemCollectorId>
- <Collectors>
- <HardwareCounter>
- <Profiles>
Syntax
<SampledCounters Operation = OperationEnumeration = "Set" | "Add" | “Remove”>
<!-- Child elements -->
SampledCounter
</SampledCounters>
Attributes and Elements
Attributes
Attribute | Description | Data type | Required | Default |
---|---|---|---|---|
Operation | Indicates whether SampledCounter should be set or added. | This attribute can have one of the following values:
|
No | Set |
Child Elements
Element | Description | Requirement |
---|---|---|
SampledCounter | Describes the Sampled hardware counter that can be enabled for the kernel-mode session. | Required, 1 or more. |
Parent Elements
Element | Description |
---|---|
HardwareCounter | Represents a hardware counter provider. |
Example
The following code example is to collect InstructionRetired counter event on PMU sampled profiling. PmcProfile keyword in SystemProvider is required for SampledCounter. The name of counters are based on CPU. Use wpr -pmcsources
to enumerate available values.
<SystemProvider Id="SystemProvider_forSampling">
<Keywords>
<Keyword Value="ProcessThread" />
<Keyword Value="Loader" />
<Keyword Value="PmcProfile" />
</Keywords>
</SystemProvider>
<HardwareCounter Id="PerfWorkloads">
<SampledCounters>
<SampledCounter Value="InstructionRetired" Interval="100000" />
</SampledCounters>
</HardwareCounter>