PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
map.c
Go to the documentation of this file.
1 /****************************/
2 /* THIS IS OPEN SOURCE CODE */
3 /****************************/
4 
5 /*
6 * File: freebsd-map.c
7 * Author: Harald Servat
8 * redcrash@gmail.com
9 */
10 
11 #include "freebsd.h"
12 #include "papiStdEventDefs.h"
13 #include "map.h"
14 
18 
20 {
21  _papi_hwd_native_info[CPU_UNKNOWN].info = UnkProcessor_info;
22  _papi_hwd_native_info[CPU_P6].info = P6Processor_info;
23  _papi_hwd_native_info[CPU_P6_C].info = P6_C_Processor_info;
24  _papi_hwd_native_info[CPU_P6_2].info = P6_2_Processor_info;
25  _papi_hwd_native_info[CPU_P6_3].info = P6_3_Processor_info;
26  _papi_hwd_native_info[CPU_P6_M].info = P6_M_Processor_info;
27  _papi_hwd_native_info[CPU_P4].info = P4Processor_info;
28  _papi_hwd_native_info[CPU_K7].info = K7Processor_info;
29  _papi_hwd_native_info[CPU_K8].info = K8Processor_info;
30  _papi_hwd_native_info[CPU_ATOM].info = AtomProcessor_info;
31  _papi_hwd_native_info[CPU_CORE].info = CoreProcessor_info;
32  _papi_hwd_native_info[CPU_CORE2].info = Core2Processor_info;
33  _papi_hwd_native_info[CPU_CORE2EXTREME].info = Core2ExtremeProcessor_info;
34  _papi_hwd_native_info[CPU_COREI7].info = i7Processor_info;
35  _papi_hwd_native_info[CPU_COREWESTMERE].info = WestmereProcessor_info;
36 
37  _papi_hwd_native_info[CPU_LAST].info = NULL;
38 }
39 
40 int freebsd_number_of_events (int processortype)
41 {
42  int counter = 0;
43 
44  while (_papi_hwd_native_info[processortype].info[counter].name != NULL)
45  counter++;
46 
47  return counter;
48 }
Definition: map.h:28
Native_Event_LabelDescription_t * info
Definition: map.h:47
Native_Event_LabelDescription_t Core2Processor_info[]
Definition: map-core2.c:30
void init_freebsd_libpmc_mappings(void)
Definition: map.c:19
Definition: map.h:30
Native_Event_Info_t _papi_hwd_native_info[CPU_LAST+1]
Definition: map.c:17
Native_Event_LabelDescription_t AtomProcessor_info[]
Definition: map-atom.c:27
Native_Event_LabelDescription_t K7Processor_info[]
Definition: map-k7.c:28
Native_Event_LabelDescription_t P6_M_Processor_info[]
Definition: map-p6-m.c:27
int freebsd_number_of_events(int processortype)
Definition: map.c:40
Native_Event_LabelDescription_t K8Processor_info[]
Definition: map-k8.c:28
Definition: map.h:31
Native_Event_LabelDescription_t Core2ExtremeProcessor_info[]
Definition: map.h:26
Native_Event_LabelDescription_t P6_C_Processor_info[]
Definition: map-p6-c.c:27
Definition: map.h:27
Native_Event_LabelDescription_t i7Processor_info[]
Definition: map-i7.c:30
Native_Event_LabelDescription_t P6_3_Processor_info[]
Definition: map-p6-3.c:27
Definition: map.h:25
Definition: map.h:22
Definition: map.h:23
Native_Event_LabelDescription_t WestmereProcessor_info[]
Definition: map-westmere.c:30
Native_Event_LabelDescription_t UnkProcessor_info[]
Definition: map-unknown.c:26
Definition: map.h:24
Definition: map.h:35
Native_Event_LabelDescription_t P6Processor_info[]
Definition: map-p6.c:28
Native_Event_LabelDescription_t P6_2_Processor_info[]
Definition: map-p6-2.c:27
Definition: map.h:33
char * name
Definition: iozone.c:23648
Definition: map.h:29
Native_Event_LabelDescription_t P4Processor_info[]
Definition: map-p4.c:28
Native_Event_LabelDescription_t CoreProcessor_info[]
Definition: map-core.c:27
Definition: map.h:21