PAPI 7.1.0.0
Loading...
Searching...
No Matches
freebsd-memory.c
Go to the documentation of this file.
1/****************************/
2/* THIS IS OPEN SOURCE CODE */
3/****************************/
4
5/*
6* File: freebsd-memory.c
7* Author: Harald Servat
8* redcrash@gmail.com
9* Mod: James Ralph
10* ralph@cs.utk.edu
11*/
12
13#include "papi.h"
14#include "papi_internal.h"
15
16#include "x86_cpuid_info.h"
17
18#define UNREFERENCED(x) (void)x
19
20
21#if defined(__i386__)||defined(__x86_64__)
22static int
23x86_get_memory_info( PAPI_hw_info_t *hw_info )
24{
25 int retval = PAPI_OK;
26
27 switch ( hw_info->vendor ) {
28 case PAPI_VENDOR_AMD:
31 break;
32 default:
33 PAPIERROR( "Unknown vendor in memory information call for x86." );
34 return PAPI_ENOIMPL;
35 }
36 return retval;
37}
38#endif
39
40
41int
43{
44 UNREFERENCED(id);
46
47#if defined(__i386__)||defined(__x86_64__)
48 x86_get_memory_info( hw_info );
49#endif
50
51 return PAPI_ENOIMPL;
52}
53
55{
56 /* TODO */
57 d->pagesize = getpagesize();
58 return PAPI_OK;
59}
60
static const PAPI_hw_info_t * hw_info
Definition: byte_profile.c:28
#define PAPI_OK
Definition: f90papi.h:73
#define PAPI_VENDOR_INTEL
Definition: f90papi.h:275
#define PAPI_VENDOR_AMD
Definition: f90papi.h:230
#define PAPI_ENOIMPL
Definition: f90papi.h:219
#define UNREFERENCED(x)
int _freebsd_get_memory_info(PAPI_hw_info_t *hw_info, int id)
int _papi_freebsd_get_dmem_info(PAPI_dmem_info_t *d)
Return codes and api definitions.
void PAPIERROR(char *format,...)
A pointer to the following is passed to PAPI_get_dmem_info()
Definition: papi.h:865
long long pagesize
Definition: papi.h:876
Hardware info structure.
Definition: papi.h:774
PAPI_mh_info_t mem_hierarchy
Definition: papi.h:793
int vendor
Definition: papi.h:781
int _x86_cache_info(PAPI_mh_info_t *mh_info)
int retval
Definition: zero_fork.c:53