Details of PMC profiling events. More...
#include "op_events.h"#include "op_libiberty.h"#include "op_fileio.h"#include "op_string.h"#include "op_cpufreq.h"#include "op_hw_specific.h"#include "op_parse_event.h"#include <string.h>#include <stdlib.h>#include <stdio.h>#include <ctype.h>
Functions | |
| unsigned | parse_extra (const char *s) |
| struct list_head * | op_events (op_cpu cpu_type) |
| Return the known events list. | |
| void | op_free_events (void) |
| free memory used by any call to above function. | |
| char const * | find_mapping_for_event (u32 nr, 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. | |
| struct op_event * | find_event_by_name (char const *name, unsigned um, int um_valid) |
| Find a given event by name. | |
| 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) |
| int | op_check_events (int ctr, u32 nr, u32 um, op_cpu cpu_type) |
| sanity check event values | |
| 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.
You can have silliness here.
| 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.
| unsigned parse_extra | ( | const char * | s | ) |
References EXTRA_ANY, EXTRA_CMASK_MASK, EXTRA_CMASK_SHIFT, EXTRA_EDGE, EXTRA_INV, and strisprefix().
1.6.1