#include "op_cpu_type.h"
#include "op_types.h"
#include "op_list.h"
Go to the source code of this file.
Details of PMC profiling events
Definition in file op_events.h.
#define EXTRA_ANY (1U << 21) |
Definition at line 24 of file op_events.h.
Referenced by parse_extra().
#define EXTRA_CMASK_MASK 0xff |
Definition at line 27 of file op_events.h.
Referenced by help_for_event(), and parse_extra().
#define EXTRA_CMASK_SHIFT 24 |
Definition at line 26 of file op_events.h.
Referenced by help_for_event(), and parse_extra().
#define EXTRA_EDGE (1U << 18) |
Definition at line 23 of file op_events.h.
Referenced by help_for_event(), and parse_extra().
#define EXTRA_INV (1U << 23) |
Definition at line 25 of file op_events.h.
Referenced by help_for_event(), and parse_extra().
#define MAX_UNIT_MASK 32 |
up to thirty two allowed unit masks
Definition at line 49 of file op_events.h.
Referenced by merge_um(), and read_unit_masks().
#define TIMER_EVENT_DESC "Timer based sampling" |
Definition at line 37 of file op_events.h.
Referenced by load_events().
#define TIMER_EVENT_NAME "TIMER" |
Definition at line 35 of file op_events.h.
Referenced by find_counter_event(), load_events(), op_default_event(), parse_events(), and resolve_events().
#define TIMER_EVENT_UNIT_MASK_NAME "timer_unit_mask" |
Definition at line 36 of file op_events.h.
Referenced by load_events().
#define TIMER_EVENT_VALUE (u32)-1 |
Definition at line 38 of file op_events.h.
Referenced by load_events().
enum op_event_check |
op_check_events() return code
OP_OK_EVENT |
event is valid and allowed |
OP_INVALID_EVENT |
event number is invalid |
OP_INVALID_UM |
unit mask is invalid |
OP_INVALID_COUNTER |
event is not allowed for the given counter |
Definition at line 101 of file op_events.h.
enum unit_mask_type |
Describe an unit mask type. Events can optionally use a filter called the unit mask. the mask type can be a bitmask or a discrete value
utm_mandatory |
useless but required by the hardware |
utm_exclusive |
only one of the values is allowed |
utm_bitmask |
bitmask |
Definition at line 42 of file op_events.h.
struct op_event* find_event_by_name | ( | char const * | name, | |
unsigned | um, | |||
int | um_valid | |||
) | [read] |
Find a given event by name
Definition at line 958 of file op_events.c.
References op_event::event_next, list_entry, list_for_each, and match_event().
Referenced by oprof_start::alloc_selected_events(), check_event(), do_test(), get_default_event(), ibs_parse_and_set_events(), op_resolve_unit_mask(), and resolve_events().
Find a mapping for a given event ID for architectures requiring additional information from what is held in the events file.
Definition at line 909 of file op_events.c.
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, filename, get_mapping(), op_get_cpu_name(), and open_event_mapping_file().
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
Definition at line 1011 of file op_events.c.
References op_event::event_next, list_entry, list_for_each, load_events(), OP_INVALID_COUNTER, OP_INVALID_EVENT, OP_INVALID_UM, OP_OK_EVENT, and utm_bitmask.
Referenced by check_event().
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
Definition at line 1056 of file op_events.c.
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.
Referenced by get_default_event(), oprof_start::setup_default_event(), and show_default_event().
Return the known events list. Idempotent
Definition at line 722 of file op_events.c.
References arch_filter_events(), and load_events().
Referenced by do_test(), oprof_start::fill_events(), get_default_event(), ibs_parse_and_set_events(), and main().
Find a given event, returns NULL on error
Definition at line 993 of file op_events.c.
References find_event_um(), and load_events().
Definition at line 1004 of file op_events.c.
References find_event_any(), and load_events().
void op_free_events | ( | void | ) |
free memory used by any call to above function. Need to be called only once
Definition at line 758 of file op_events.c.
References delete_event(), delete_unit_mask(), op_event::event_next, list_entry, list_for_each_safe, and op_unit_mask::um_next.
Referenced by clean_exit(), cleanup(), do_test(), and main().
void op_resolve_unit_mask | ( | struct parsed_event * | pe, | |
u32 * | extra | |||
) |
Definition at line 1317 of file op_events.c.
References do_resolve_unit_mask(), find_event_by_name(), and parsed_event::name.
Referenced by check_event(), resolve_events(), show_extra_mask(), and show_unit_mask().