op_events.h File Reference

#include "op_cpu_type.h"
#include "op_types.h"
#include "op_list.h"
Include dependency graph for op_events.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  op_unit_mask
struct  op_unit_mask::op_described_um
struct  op_event
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

Enumerations

enum  unit_mask_type { utm_mandatory, utm_exclusive, utm_bitmask }
enum  op_event_check { OP_OK_EVENT = 0, OP_INVALID_EVENT = 1, OP_INVALID_UM = 2, OP_INVALID_COUNTER = 4 }

Functions

struct list_headop_events (op_cpu cpu_type)
struct op_eventop_find_event (op_cpu cpu_type, u32 nr, u32 um)
struct op_eventop_find_event_any (op_cpu cpu_type, u32 nr)
struct op_eventfind_event_by_name (char const *name, unsigned um, int um_valid)
char const * find_mapping_for_event (u32 val, op_cpu cpu_type)
int op_check_events (int ctr, u32 event, u32 um, op_cpu cpu_type)
void op_free_events (void)
void op_default_event (op_cpu cpu_type, struct op_default_event_descr *descr)
void op_resolve_unit_mask (struct parsed_event *pe, u32 *extra)

Detailed Description

Details of PMC profiling events

Remarks:
Copyright 2002 OProfile authors
Read the file COPYING
Author:
John Levon
Philippe Elie

Definition in file op_events.h.


Define Documentation

#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"
#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().


Enumeration Type Documentation

op_check_events() return code

Enumerator:
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.

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

Enumerator:
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.


Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int op_check_events ( int  ctr,
u32  event,
u32  um,
op_cpu  cpu_type 
)

sanity check event values

Parameters:
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

See also:
op_cpu, OP_EVENTS_OK

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().

Here is the call graph for this function:

Here is the caller graph for this 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

Parameters:
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().

Here is the call graph for this function:

Here is the caller graph for this function:

struct list_head* op_events ( op_cpu  cpu_type  )  [read]

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().

Here is the call graph for this function:

Here is the caller graph for this function:

struct op_event* op_find_event ( op_cpu  cpu_type,
u32  nr,
u32  um 
) [read]

Find a given event, returns NULL on error

Definition at line 993 of file op_events.c.

References find_event_um(), and load_events().

Here is the call graph for this function:

struct op_event* op_find_event_any ( op_cpu  cpu_type,
u32  nr 
) [read]

Definition at line 1004 of file op_events.c.

References find_event_any(), and load_events().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1