This section discusses event-based sampling and how it is configured.
The Edit Event Configuration dialog box allows for changing a profile configuration that uses event-based sampling for data collection. This dialog corresponds to the dialog box opened by using the Edit button displayed in Normal Mode Session Settings dialog box. The Edit Event Configuration dialog box allows for defining one or more groups of performance counter events to be measured. A maximum of four events are allowed per group.
The current profile for event-based sampling opens another dialog box for defining one or more groups of performance counter events that can then be measured. A maximum of four events is allowed per group.
The options in the Edit Event Configuration dialog box allow for the following:
Event-based sampling uses the hardware performance counters to collect data about an application program (and other software like the operating system kernel) as it executes. The performance counters count hardware events (conditions) that occur during execution. These events provide specific information about program execution and can be used to identify and isolate performance issues. AMD Family 10h, AMD Athlon™ 64, and AMD Opteron™ processors provide four performance event counters per core.
AMD processors can measure a wide range of event types. These events are described in more detail in the section Performance Monitoring Events. Consult the BIOS and Kernel Developer's Guide for the AMD processor in your test platform for in-depth information about the performance monitoring events that it supports, including any processor revision-by-revision differences.
Performance counter event multiplexing eliminates the previous limitations of being able to monitor and collect only four events at a time. Event counter multiplexing organizes events into groups. Through the Edit event configuration dialog box, users can define one or more groups of performance counter events to be measured.
The following sections describe the options, settings and buttons in the Edit Event Configuration dialog box.
The Profile name field displays the name of the selected profile configuration previously selected for editing.
This section allows for using existing profiles to add events.
List of profile configurations. Select from the list the profile to be edited if different from selection in Profile name field.
Add events from configuration. Select a predefined profile from the list and click the Add events from configuration to button to add the events from an existing event-based profile configuration .
Configuration description.This field displays a brief description of the selected profile configuration.
An individual event can be selected from the extensive list of events. Click Add Event to add the event to a group. (A new group must first be created.)
The event groups and the individual events within the groups are shown here. Only four events are allowed per group.
Use the New group button to create a user-defined group. Each group displays with a + to open a level for adding events.
Use the Remove Event button to remove an event from a group. A maximum of four events can be included in a group. To remove an event group, all events assigned to the group must first be removed individually.
The green, up and down arrow buttons allow for moving a selected event into another group.
The number in the Event count: field specifies the event count (sampling period) for an event.
When specifying more than one group of events, the number in the Multiplexing Interval field specifies the profiling period before the next group of events is multiplexed during profile run.
Selecting Usr enables collection of user-level samples for an event.
Selecting Os enables collection of operating system-level samples for an event.
Edge detection and level detection control the way an event signal is sensed and affects the way an event is tallied as a count in a performance counter register. The occurrence of an event (a hardware condition) is asserted as a physical hardware signal. An event has a duration that may be as short as a single CPU clock cycle or may be several cycles long.
The presence of a hardware condition is asserted when the event signal is high. Absence of the condition is asserted when the event signal is low. When edge detection is used, each low-to-high transition of the event signal is counted as a single event, that is, the performance counter is incremented by one. When level detection is used, the level is sensed during each clock cycle and the performance counter is incremented by one for each cycle during which the event signal is asserted.
The typical setting for an event is level detect (the Edge box is unchecked). For example, if the event signal represents the "NOT HALTED" CPU state, then the performance counter will count the number of CPU clocks that the CPU spent in the "NOT HALTED" state. This configuration corresponds to the conventional "CPU Clocks Not Halted" event.
Performance counters count either specific processor events or the duration of events. The "Dispatch Stalls" counter event, for example, measures the number of processor cycles when the instruction decoder has stalled for any reason. Edge detection and level detection can be used to determine the average number of cycles per stall by: