Details of PMC profiling events. More...
#include "op_cpu_type.h"#include "op_types.h"#include "op_list.h"

Go to the source code of this file.
Classes | |
| struct | op_unit_mask |
| Describe an unit mask. More... | |
| struct | op_unit_mask::op_described_um |
| struct | op_event |
| Describe an event. More... | |
| struct | op_default_event_descr |
Defines | |
| #define | EXTRA_EDGE (1U << 18) |
| #define | EXTRA_ANY (1U << 21) |
| #define | EXTRA_INV (1U << 23) |
| #define | EXTRA_CMASK_SHIFT 24 |
| #define | EXTRA_CMASK_MASK 0xff |
| #define | TIMER_EVENT_NAME "TIMER" |
| #define | TIMER_EVENT_UNIT_MASK_NAME "timer_unit_mask" |
| #define | TIMER_EVENT_DESC "Timer based sampling" |
| #define | TIMER_EVENT_VALUE (u32)-1 |
| #define | MAX_UNIT_MASK 32 |
| up to thirty two allowed unit masks | |
Enumerations | |
| enum | unit_mask_type { utm_mandatory, utm_exclusive, utm_bitmask } |
Describe an unit mask type. More... | |
| enum | op_event_check { OP_OK_EVENT = 0, OP_INVALID_EVENT = 1, OP_INVALID_UM = 2, OP_INVALID_COUNTER = 4 } |
op_check_events() return code More... | |
Functions | |
| struct list_head * | op_events (op_cpu cpu_type) |
| Return the known events list. | |
| struct op_event * | op_find_event (op_cpu cpu_type, u32 nr, u32 um) |
| Find a given event, returns NULL on error. | |
| struct op_event * | op_find_event_any (op_cpu cpu_type, u32 nr) |
| struct op_event * | find_event_by_name (char const *name, unsigned um, int um_valid) |
| Find a given event by name. | |
| char const * | find_mapping_for_event (u32 val, op_cpu cpu_type) |
| Find a mapping for a given event ID for architectures requiring additional information from what is held in the events file. | |
| int | op_check_events (int ctr, u32 event, u32 um, op_cpu cpu_type) |
| sanity check event values | |
| void | op_free_events (void) |
| free memory used by any call to above function. | |
| void | op_default_event (op_cpu cpu_type, struct op_default_event_descr *descr) |
| op_default_event - return the details of the default event | |
| void | op_resolve_unit_mask (struct parsed_event *pe, u32 *extra) |
Details of PMC profiling events.
| #define EXTRA_ANY (1U << 21) |
Referenced by parse_extra().
| #define EXTRA_CMASK_MASK 0xff |
Referenced by parse_extra().
| #define EXTRA_CMASK_SHIFT 24 |
Referenced by parse_extra().
| #define EXTRA_EDGE (1U << 18) |
Referenced by parse_extra().
| #define EXTRA_INV (1U << 23) |
Referenced by parse_extra().
| #define MAX_UNIT_MASK 32 |
up to thirty two allowed unit masks
| #define TIMER_EVENT_DESC "Timer based sampling" |
| #define TIMER_EVENT_NAME "TIMER" |
Referenced by find_counter_event(), op_default_event(), and parse_events().
| #define TIMER_EVENT_UNIT_MASK_NAME "timer_unit_mask" |
| #define TIMER_EVENT_VALUE (u32)-1 |
| enum op_event_check |
op_check_events() return code
| enum unit_mask_type |
| struct op_event* find_event_by_name | ( | char const * | name, | |
| unsigned | um, | |||
| int | um_valid | |||
| ) | [read] |
Find a given event by name.
References op_event::event_next, list_entry, list_for_each, and op_event::name.
Referenced by op_resolve_unit_mask().
Find a mapping for a given event ID for architectures requiring additional information from what is held in the events file.
References CPU_PPC64_970, CPU_PPC64_970MP, CPU_PPC64_IBM_COMPAT_V1, CPU_PPC64_PA6T, CPU_PPC64_POWER4, CPU_PPC64_POWER5, CPU_PPC64_POWER5p, CPU_PPC64_POWER5pp, CPU_PPC64_POWER6, CPU_PPC64_POWER7, and op_get_cpu_name().
Referenced by main().
sanity check event values
| ctr | counter number | |
| event | value for counter | |
| um | unit mask for counter | |
| cpu_type | processor type |
Check that the counter event and unit mask values are allowed.
The function returns bitmask of failure cause 0 otherwise
References op_event::counter_mask, op_event::event_next, list_entry, list_for_each, op_unit_mask::num, OP_INVALID_COUNTER, OP_INVALID_EVENT, OP_INVALID_UM, OP_OK_EVENT, op_unit_mask::um, op_event::unit, op_unit_mask::unit_type_mask, utm_bitmask, op_event::val, and op_unit_mask::op_described_um::value.
| void op_default_event | ( | op_cpu | cpu_type, | |
| struct op_default_event_descr * | descr | |||
| ) |
op_default_event - return the details of the default event
| cpu_type | cpu type | |
| descr | filled event description |
Fills in the event description if applicable
References op_default_event_descr::count, CPU_ARCH_PERFMON, CPU_ARM_MPCORE, CPU_ARM_SCORPION, CPU_ARM_SCORPIONMP, CPU_ARM_V6, CPU_ARM_V7, CPU_ARM_V7_CA15, CPU_ARM_V7_CA5, CPU_ARM_V7_CA7, CPU_ARM_V7_CA9, CPU_ARM_XSCALE1, CPU_ARM_XSCALE2, CPU_ATHLON, CPU_ATOM, CPU_AVR32, CPU_AXP_EV4, CPU_AXP_EV5, CPU_AXP_EV6, CPU_AXP_EV67, CPU_AXP_PCA56, CPU_CORE, CPU_CORE_2, CPU_CORE_I7, CPU_FAMILY10, CPU_FAMILY11H, CPU_FAMILY12H, CPU_FAMILY14H, CPU_FAMILY15H, CPU_HAMMER, CPU_IA64, CPU_IA64_1, CPU_IA64_2, CPU_IVYBRIDGE, CPU_MIPS_1004K, CPU_MIPS_20K, CPU_MIPS_24K, CPU_MIPS_25K, CPU_MIPS_34K, CPU_MIPS_5K, CPU_MIPS_74K, CPU_MIPS_LOONGSON2, CPU_MIPS_R10000, CPU_MIPS_R12000, CPU_MIPS_RM7000, CPU_MIPS_RM9000, CPU_MIPS_SB1, CPU_MIPS_VR5432, CPU_MIPS_VR5500, CPU_NEHALEM, CPU_NO_GOOD, CPU_P4, CPU_P4_HT2, CPU_P6_MOBILE, CPU_PII, CPU_PIII, CPU_PPC64_970, CPU_PPC64_970MP, CPU_PPC64_CELL, CPU_PPC64_IBM_COMPAT_V1, CPU_PPC64_PA6T, CPU_PPC64_POWER4, CPU_PPC64_POWER5, CPU_PPC64_POWER5p, CPU_PPC64_POWER5pp, CPU_PPC64_POWER6, CPU_PPC64_POWER7, CPU_PPC_7450, CPU_PPC_E300, CPU_PPC_E500, CPU_PPC_E500_2, CPU_PPRO, CPU_RTC, CPU_S390_Z10, CPU_S390_Z196, CPU_SANDYBRIDGE, CPU_TILE_TILE64, CPU_TILE_TILEGX, CPU_TILE_TILEPRO, CPU_TIMER_INT, CPU_WESTMERE, MAX_CPU_TYPE, op_default_event_descr::name, op_get_nr_counters(), TIMER_EVENT_NAME, and op_default_event_descr::um.
Find a given event, returns NULL on error.
| void op_free_events | ( | void | ) |
free memory used by any call to above function.
Need to be called only once
References op_event::event_next, list_entry, list_for_each_safe, and op_unit_mask::um_next.
Referenced by main().
| void op_resolve_unit_mask | ( | struct parsed_event * | pe, | |
| u32 * | extra | |||
| ) |
References find_event_by_name(), and parsed_event::name.
1.6.1