|
PAPI
5.0.1.0
|
00001 /****************************/ 00002 /* THIS IS OPEN SOURCE CODE */ 00003 /****************************/ 00004 /* 00005 * File: freebsd-libpmc.c 00006 * Author: Kevin London 00007 * london@cs.utk.edu 00008 * Mods: Harald Servat 00009 * redcrash@gmail.com 00010 */ 00011 00012 #ifndef _PAPI_FreeBSD_H 00013 #define _PAPI_FreeBSD_H 00014 00015 #include <stdio.h> 00016 #include <stdlib.h> 00017 #include <stdarg.h> 00018 #include <sys/types.h> 00019 #include <sys/time.h> 00020 #include <sys/times.h> 00021 #include <unistd.h> 00022 #include <string.h> 00023 #include <errno.h> 00024 #include <assert.h> 00025 00026 #include "papi.h" 00027 #include <pmc.h> 00028 00029 #include "freebsd-config.h" 00030 00031 #define MAX_COUNTERS HWPMC_NUM_COUNTERS 00032 #define MAX_COUNTER_TERMS MAX_COUNTERS 00033 00034 #undef hwd_siginfo_t 00035 #undef hwd_register_t 00036 #undef hwd_reg_alloc_t 00037 #undef hwd_control_state_t 00038 #undef hwd_context_t 00039 #undef hwd_libpmc_context_t 00040 00041 typedef struct hwd_siginfo { 00042 int placeholder; 00043 } hwd_siginfo_t; 00044 00045 typedef struct hwd_register { 00046 int placeholder; 00047 } hwd_register_t; 00048 00049 typedef struct hwd_reg_alloc { 00050 int placeholder; 00051 } hwd_reg_alloc_t; 00052 00053 typedef struct hwd_control_state { 00054 int n_counters; /* Number of counters */ 00055 int hwc_domain; /* HWC domain {user|kernel} */ 00056 unsigned *caps; /* Capabilities for each counter */ 00057 pmc_id_t *pmcs; /* PMC identifiers */ 00058 pmc_value_t *values; /* Stored values for each counter */ 00059 char **counters; /* Name of each counter (with mode) */ 00060 } hwd_control_state_t; 00061 00062 typedef struct hwd_context { 00063 int placeholder; 00064 } hwd_context_t; 00065 00066 #include "freebsd-context.h" 00067 00068 typedef struct hwd_libpmc_context { 00069 int CPUtype; 00070 int use_rdtsc; 00071 } hwd_libpmc_context_t; 00072 00073 #define _papi_hwd_lock_init() { ; } 00074 00075 #endif /* _PAPI_FreeBSD_H */