Events

Represents a collection of Events.

Element Hierarchy

Syntax

<Events Operation = OperationEnumeration = "Set" | "Add" | “Remove”>
  <!-- Child elements -->
  Event
</Events>

Attributes and Elements

Attributes

Attribute Description Data type Required Default
Operation Indicates whether events should be set or added. This attribute can have one of the following values:
  • Set
  • Add
  • Remove
No Set

Child Elements

Element Description Requirement
Event Describes the kernel events that counters to be collected with. Required, 1 or more.

Parent Elements

Element Description
HardwareCounter Represents a hardware counter provider.

Example

The following code example is to collect TotalCycles and InstructionRetired counter event on the CSwitch kernel event. The name of counters are based on CPU. Use wpr -pmcsources to enumerate available values. Refer to Event for available Event values.

<HardwareCounter Id="PerfWorkloads">
    <Counters>
        <Counter Value="TotalCycles"/>
        <Counter Value="InstructionRetired" />
    </Counters>
    <Events>
       <Event Value="CSwitch"/>
    </Events>
</HardwareCounter>

Elements

Counters

HardwareCounter