PAPI  5.0.1.0
map.c
Go to the documentation of this file.
00001 /****************************/
00002 /* THIS IS OPEN SOURCE CODE */
00003 /****************************/
00004 
00005 /* 
00006 * File:    freebsd-map.c
00007 * Author:  Harald Servat
00008 *          redcrash@gmail.com
00009 */
00010 
00011 #include "freebsd.h"
00012 #include "papiStdEventDefs.h"
00013 #include "map.h"
00014 
00017 Native_Event_Info_t _papi_hwd_native_info[CPU_LAST+1];
00018 
00019 void init_freebsd_libpmc_mappings (void)
00020 {
00021     _papi_hwd_native_info[CPU_UNKNOWN].info = UnkProcessor_info;
00022     _papi_hwd_native_info[CPU_P6].info = P6Processor_info;
00023     _papi_hwd_native_info[CPU_P6_C].info = P6_C_Processor_info;
00024     _papi_hwd_native_info[CPU_P6_2].info = P6_2_Processor_info;
00025     _papi_hwd_native_info[CPU_P6_3].info = P6_3_Processor_info;
00026     _papi_hwd_native_info[CPU_P6_M].info = P6_M_Processor_info;
00027     _papi_hwd_native_info[CPU_P4].info = P4Processor_info;
00028     _papi_hwd_native_info[CPU_K7].info = K7Processor_info;
00029     _papi_hwd_native_info[CPU_K8].info = K8Processor_info;
00030     _papi_hwd_native_info[CPU_ATOM].info = AtomProcessor_info;
00031     _papi_hwd_native_info[CPU_CORE].info = CoreProcessor_info;
00032     _papi_hwd_native_info[CPU_CORE2].info = Core2Processor_info;
00033     _papi_hwd_native_info[CPU_CORE2EXTREME].info = Core2ExtremeProcessor_info;
00034     _papi_hwd_native_info[CPU_COREI7].info = i7Processor_info;
00035     _papi_hwd_native_info[CPU_COREWESTMERE].info = WestmereProcessor_info;
00036 
00037     _papi_hwd_native_info[CPU_LAST].info = NULL;
00038 }
00039 
00040 int freebsd_number_of_events (int processortype)
00041 {
00042     int counter = 0;
00043 
00044     while (_papi_hwd_native_info[processortype].info[counter].name != NULL)
00045         counter++;
00046 
00047     return counter;
00048 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines