op_cpu_type.h File Reference

CPU type determination. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  op_cpu {
  CPU_NO_GOOD = -1, CPU_PPRO, CPU_PII, CPU_PIII,
  CPU_ATHLON, CPU_TIMER_INT, CPU_RTC, CPU_P4,
  CPU_IA64, CPU_IA64_1, CPU_IA64_2, CPU_HAMMER,
  CPU_P4_HT2, CPU_AXP_EV4, CPU_AXP_EV5, CPU_AXP_PCA56,
  CPU_AXP_EV6, CPU_AXP_EV67, CPU_P6_MOBILE, CPU_ARM_XSCALE1,
  CPU_ARM_XSCALE2, CPU_PPC64_POWER4, CPU_PPC64_POWER5, CPU_PPC64_POWER5p,
  CPU_PPC64_970, CPU_MIPS_20K, CPU_MIPS_24K, CPU_MIPS_25K,
  CPU_MIPS_34K, CPU_MIPS_5K, CPU_MIPS_R10000, CPU_MIPS_R12000,
  CPU_MIPS_RM7000, CPU_MIPS_RM9000, CPU_MIPS_SB1, CPU_MIPS_VR5432,
  CPU_MIPS_VR5500, CPU_PPC_E500, CPU_PPC_E500_2, CPU_CORE,
  CPU_PPC_7450, CPU_CORE_2, CPU_PPC64_POWER6, CPU_PPC64_970MP,
  CPU_PPC64_CELL, CPU_FAMILY10, CPU_PPC64_PA6T, CPU_ARM_MPCORE,
  CPU_ARM_V6, CPU_PPC64_POWER5pp, CPU_PPC_E300, CPU_AVR32,
  CPU_ARM_V7, CPU_ARCH_PERFMON, CPU_FAMILY11H, CPU_PPC64_POWER7,
  CPU_PPC64_IBM_COMPAT_V1, CPU_CORE_I7, CPU_ATOM, CPU_MIPS_LOONGSON2,
  CPU_NEHALEM, CPU_ARM_V7_CA9, CPU_MIPS_74K, CPU_MIPS_1004K,
  CPU_FAMILY12H, CPU_FAMILY14H, CPU_FAMILY15H, CPU_WESTMERE,
  CPU_ARM_SCORPION, CPU_ARM_SCORPIONMP, CPU_SANDYBRIDGE, CPU_TILE_TILE64,
  CPU_TILE_TILEPRO, CPU_TILE_TILEGX, CPU_S390_Z10, CPU_S390_Z196,
  CPU_IVYBRIDGE, CPU_ARM_V7_CA5, CPU_ARM_V7_CA7, CPU_ARM_V7_CA15,
  CPU_HASWELL, CPU_S390_ZEC12, CPU_AMD64_GENERIC, CPU_PPC64_ARCH_V1,
  CPU_PPC64_POWER8, MAX_CPU_TYPE
}
 

Supported cpu type.

More...
enum  op_interface { OP_INTERFACE_NO_GOOD = -1, OP_INTERFACE_26 }

Functions

int op_cpu_variations (op_cpu cpu_type)
 the CPU lowest common denominator
op_cpu op_cpu_base_type (op_cpu cpu_type)
 get the CPU lowest common denominator
op_cpu op_get_cpu_type (void)
 get the CPU type from the kernel
op_cpu op_get_cpu_number (char const *cpu_string)
 get the cpu number based on string
char const * op_get_cpu_type_str (op_cpu cpu_type)
 get the cpu string.
char const * op_get_cpu_name (op_cpu cpu_type)
 op_get_cpu_name - get the cpu name
int op_get_nr_counters (op_cpu cpu_type)
 compute the number of counters available
op_interface op_get_interface (void)
 get the INTERFACE used to communicate between daemon and the kernel
int op_cpu_has_timer_fs (void)
 determine if the /dev/oprofile/timer is available

Detailed Description

CPU type determination.

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

Enumeration Type Documentation

enum op_cpu

Supported cpu type.

Always add new CPU types at the very end.

Enumerator:
CPU_NO_GOOD 

unsupported CPU type

CPU_PPRO 

Pentium Pro.

CPU_PII 

Pentium II series.

CPU_PIII 

Pentium III series.

CPU_ATHLON 

AMD P6 series.

CPU_TIMER_INT 

CPU using the timer interrupt.

CPU_RTC 

other CPU to use the RTC

CPU_P4 

Pentium 4 / Xeon series.

CPU_IA64 

Generic IA64.

CPU_IA64_1 

IA64 Merced.

CPU_IA64_2 

IA64 McKinley.

CPU_HAMMER 

AMD Hammer family.

CPU_P4_HT2 

Pentium 4 / Xeon series with 2 hyper-threads.

CPU_AXP_EV4 

Alpha EV4 family.

CPU_AXP_EV5 

Alpha EV5 family.

CPU_AXP_PCA56 

Alpha PCA56 family.

CPU_AXP_EV6 

Alpha EV6 family.

CPU_AXP_EV67 

Alpha EV67 family.

CPU_P6_MOBILE 

Pentium M series.

CPU_ARM_XSCALE1 

ARM XScale 1.

CPU_ARM_XSCALE2 

ARM XScale 2.

CPU_PPC64_POWER4 

ppc64 POWER4 family

CPU_PPC64_POWER5 

ppc64 POWER5 family

CPU_PPC64_POWER5p 

ppc64 Power5+ family

CPU_PPC64_970 

ppc64 970 family

CPU_MIPS_20K 

MIPS 20K.

CPU_MIPS_24K 

MIPS 24K.

CPU_MIPS_25K 

MIPS 25K.

CPU_MIPS_34K 

MIPS 34K.

CPU_MIPS_5K 

MIPS 5K.

CPU_MIPS_R10000 

MIPS R10000.

CPU_MIPS_R12000 

MIPS R12000.

CPU_MIPS_RM7000 

QED RM7000.

CPU_MIPS_RM9000 

PMC-Sierra RM9000.

CPU_MIPS_SB1 

Broadcom SB1.

CPU_MIPS_VR5432 

NEC VR5432.

CPU_MIPS_VR5500 

MIPS VR5500, VR5532 and VR7701.

CPU_PPC_E500 

e500

CPU_PPC_E500_2 

e500v2

CPU_CORE 

Core Solo / Duo series.

CPU_PPC_7450 

PowerPC G4.

CPU_CORE_2 

Intel Core 2.

CPU_PPC64_POWER6 

ppc64 POWER6 family

CPU_PPC64_970MP 

ppc64 970MP

CPU_PPC64_CELL 

ppc64 Cell Broadband Engine

CPU_FAMILY10 

AMD family 10.

CPU_PPC64_PA6T 

ppc64 PA6T

CPU_ARM_MPCORE 

ARM MPCore.

CPU_ARM_V6 

ARM V6.

CPU_PPC64_POWER5pp 

ppc64 Power5++ family

CPU_PPC_E300 

e300

CPU_AVR32 

AVR32.

CPU_ARM_V7 

ARM Cortex-A8.

CPU_ARCH_PERFMON 

Intel architectural perfmon.

CPU_FAMILY11H 

AMD family 11h.

CPU_PPC64_POWER7 

ppc64 POWER7 family

CPU_PPC64_IBM_COMPAT_V1 

IBM PPC64 processor compat mode version 1.

CPU_CORE_I7 
CPU_ATOM 
CPU_MIPS_LOONGSON2 
CPU_NEHALEM 
CPU_ARM_V7_CA9 

ARM Cortex-A9.

CPU_MIPS_74K 

MIPS 74K.

CPU_MIPS_1004K 

MIPS 1004K.

CPU_FAMILY12H 

AMD family 12h.

CPU_FAMILY14H 

AMD family 14h.

CPU_FAMILY15H 

AMD family 15h.

CPU_WESTMERE 
CPU_ARM_SCORPION 

ARM SCORPION.

CPU_ARM_SCORPIONMP 

ARM SCORPIONMP.

CPU_SANDYBRIDGE 
CPU_TILE_TILE64 

Tilera TILE64 family.

CPU_TILE_TILEPRO 

Tilera TILEPro family (Pro64 or Pro36).

CPU_TILE_TILEGX 

Tilera TILE-GX family.

CPU_S390_Z10 
CPU_S390_Z196 
CPU_IVYBRIDGE 
CPU_ARM_V7_CA5 

ARM Cortex-A5.

CPU_ARM_V7_CA7 

ARM Cortex-A7.

CPU_ARM_V7_CA15 

ARM Cortex-A15.

CPU_HASWELL 
CPU_S390_ZEC12 

< Intel Haswell microarchitecture

IBM zEnterprise EC12

CPU_AMD64_GENERIC 

AMD64 Generic.

CPU_PPC64_ARCH_V1 
CPU_PPC64_POWER8 

< IBM Power architected events version 1

ppc64 POWER8 family

MAX_CPU_TYPE 
Enumerator:
OP_INTERFACE_NO_GOOD 
OP_INTERFACE_26 

Function Documentation

op_cpu op_cpu_base_type ( op_cpu  cpu_type  ) 

get the CPU lowest common denominator

returns cpu_type if cpu_type does not have a lowest common denominator.

References CPU_ARCH_PERFMON, CPU_ATOM, CPU_CORE_2, CPU_CORE_I7, CPU_HASWELL, CPU_IVYBRIDGE, CPU_NEHALEM, CPU_SANDYBRIDGE, and CPU_WESTMERE.

int op_cpu_has_timer_fs ( void   ) 

determine if the /dev/oprofile/timer is available

return true if the kernel modules provides the /dev/oprofile interface for timer mode sampling.

Referenced by find_counter_event(), and op_get_nr_counters().

int op_cpu_variations ( op_cpu  cpu_type  ) 

the CPU lowest common denominator

returns 1 if there are variations for the base cpu type;

References CPU_ARCH_PERFMON.

Referenced by op_get_cpu_type().

char const* op_get_cpu_name ( op_cpu  cpu_type  ) 

op_get_cpu_name - get the cpu name

Parameters:
cpu_type the cpu identifier name

The function always return a valid char const * Return the OProfile CPU name, e.g. "i386/pii"

References MAX_CPU_TYPE, and cpu_descr::name.

Referenced by describe_cpu(), and find_mapping_for_event().

op_cpu op_get_cpu_number ( char const *  cpu_string  ) 

get the cpu number based on string

Parameters:
cpu_string with either the cpu type identifier or cpu type number

The function returns CPU_NO_GOOD if no matching string was found.

References cpu_descr::cpu, CPU_NO_GOOD, and MAX_CPU_TYPE.

Referenced by main(), and op_get_cpu_type().

op_cpu op_get_cpu_type ( void   ) 

get the CPU type from the kernel

returns CPU_NO_GOOD if the CPU could not be identified. This function can not work if the module is not loaded

References CPU_NO_GOOD, op_cpu_variations(), and op_get_cpu_number().

Referenced by main(), map_event_to_counter(), and oprof_start::oprof_start().

char const* op_get_cpu_type_str ( op_cpu  cpu_type  ) 

get the cpu string.

Parameters:
cpu_type the cpu type identifier

The function always return a valid char const * the core cpu denomination or "invalid cpu type" if cpu_type is not valid.

References MAX_CPU_TYPE, and cpu_descr::pretty.

Referenced by describe_cpu(), and main().

op_interface op_get_interface ( void   ) 

get the INTERFACE used to communicate between daemon and the kernel

returns OP_INTERFACE_NO_GOOD if the INTERFACE could not be identified. This function will identify the interface as OP_INTERFACE_NO_GOOD if the module is not loaded.

References op_file_readable(), OP_INTERFACE_26, and OP_INTERFACE_NO_GOOD.

Referenced by daemon_status::daemon_status(), and oprof_start::oprof_start().

int op_get_nr_counters ( op_cpu  cpu_type  ) 

compute the number of counters available

Parameters:
cpu_type numeric processor type

returns 0 if the CPU could not be identified

References MAX_CPU_TYPE, cpu_descr::nr_counters, and op_cpu_has_timer_fs().

Referenced by map_event_to_counter(), op_default_event(), and oprof_start::oprof_start().


Generated on 29 Jul 2013 for oprofile by  doxygen 1.6.1