HardwareCounter

Describes the configuration to enable the hardware counters. The hardware counter definition specifies which counters, events, and sampled counters to enable.

Element Hierarchy

Syntax

<HardwareCounter Id   = IdType
                Base = string>

  <!-- Child elements -->
  Counters,
  Events,
  SampledCounters

</HardwareCounter>

Attributes and Elements

Attributes

Attribute Description Data type Required Default
Id Uniquely identifies the system provider. String that must have at least one character and cannot contain colons (:) or spaces. Yes
Base Indicates the base of the system provider. Derived providers have all the attributes of the base provider by default. These can be overridden by explicitly specifying them in the derived provider. string No

Child Elements

Element Description Requirement
Counters Represents a collection of counters. Optional.
Events Represents a collection of events. Optional.
SampledCounters Represents a collection of sampled counters. Optional.

Parent Elements

Element Description
Profiles Represents a collection of collectors, providers, and profiles.
SystemCollectorId Represents a system collector identifier.

Example

<HardwareCounter Id="PerfWorkloads">
    <Counters>
        <Counter Value="TotalCycles"/>
        <Counter Value="InstructionRetired" />
    </Counters>
    <Events>
       <Event Value="CSwitch"/>
    </Events>
    <SampledCounters>
        <SampledCounter Value="CacheMisses" Interval="65536" />
    </SampledCounters>
</HardwareCounter>

Elements