PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
freebsd.h
Go to the documentation of this file.
1 /****************************/
2 /* THIS IS OPEN SOURCE CODE */
3 /****************************/
4 /*
5 * File: freebsd-libpmc.c
6 * Author: Kevin London
7 * london@cs.utk.edu
8 * Mods: Harald Servat
9 * redcrash@gmail.com
10 */
11 
12 #ifndef _PAPI_FreeBSD_H
13 #define _PAPI_FreeBSD_H
14 
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <stdarg.h>
18 #include <sys/types.h>
19 #include <sys/time.h>
20 #include <sys/times.h>
21 #include <unistd.h>
22 #include <string.h>
23 #include <errno.h>
24 #include <assert.h>
25 
26 #include "papi.h"
27 #include <pmc.h>
28 
29 #include "freebsd-config.h"
30 
31 #define MAX_COUNTERS HWPMC_NUM_COUNTERS
32 #define MAX_COUNTER_TERMS MAX_COUNTERS
33 
34 #undef hwd_siginfo_t
35 #undef hwd_register_t
36 #undef hwd_reg_alloc_t
37 #undef hwd_control_state_t
38 #undef hwd_context_t
39 #undef hwd_libpmc_context_t
40 
41 typedef struct hwd_siginfo {
44 
45 typedef struct hwd_register {
48 
49 typedef struct hwd_reg_alloc {
52 
53 typedef struct hwd_control_state {
54  int n_counters; /* Number of counters */
55  int hwc_domain; /* HWC domain {user|kernel} */
56  unsigned *caps; /* Capabilities for each counter */
57  pmc_id_t *pmcs; /* PMC identifiers */
58  pmc_value_t *values; /* Stored values for each counter */
59  char **counters; /* Name of each counter (with mode) */
61 
62 typedef struct hwd_context {
65 
66 #include "freebsd-context.h"
67 
68 typedef struct hwd_libpmc_context {
69  int CPUtype;
70  int use_rdtsc;
72 
73 #define _papi_hwd_lock_init() { ; }
74 
75 #endif /* _PAPI_FreeBSD_H */
#define hwd_control_state_t
#define hwd_reg_alloc_t
pmc_value_t * values
Definition: freebsd.h:58
unsigned * caps
Definition: freebsd.h:56
pmc_id_t * pmcs
Definition: freebsd.h:57
Return codes and api definitions.
int placeholder
Definition: freebsd.h:50
int placeholder
Definition: freebsd.h:46
#define hwd_context_t
#define hwd_siginfo_t
char ** counters
Definition: freebsd.h:59
int placeholder
Definition: freebsd.h:42
#define hwd_register_t
int placeholder
Definition: freebsd.h:63