PAPI 7.1.0.0
Loading...
Searching...
No Matches
linux-bgp-memory.c
Go to the documentation of this file.
1/*
2 * File: linux-bgp-memory.c
3 * Author: Dave Hermsmeier
4 * dlherms@us.ibm.com
5 */
6
7#include "papi.h"
8#include "papi_internal.h"
9#ifdef __LINUX__
10#include <limits.h>
11#endif
12#include <stdio.h>
13#include <string.h>
14
15/*
16 * Prototypes...
17 */
18int init_bgp( PAPI_mh_info_t * pMem_Info );
19
20/*
21 * Get Memory Information
22 *
23 * Fills in memory information - effectively set to all 0x00's
24 */
25extern int
26_bgp_get_memory_info( PAPI_hw_info_t * pHwInfo, int pCPU_Type )
27{
28 int retval = 0;
29
30 switch ( pCPU_Type ) {
31 default:
32 //fprintf(stderr,"Default CPU type in %s (%d)\n",__FUNCTION__,__LINE__);
33 retval = init_bgp( &pHwInfo->mem_hierarchy );
34 break;
35 }
36
37 return retval;
38}
39
40/*
41 * Get DMem Information for BG/P
42 *
43 * NOTE: Currently, all values set to -1
44 */
45extern int
47{
48
49 pDmemInfo->size = PAPI_EINVAL;
50 pDmemInfo->resident = PAPI_EINVAL;
51 pDmemInfo->high_water_mark = PAPI_EINVAL;
52 pDmemInfo->shared = PAPI_EINVAL;
53 pDmemInfo->text = PAPI_EINVAL;
54 pDmemInfo->library = PAPI_EINVAL;
55 pDmemInfo->heap = PAPI_EINVAL;
56 pDmemInfo->locked = PAPI_EINVAL;
57 pDmemInfo->stack = PAPI_EINVAL;
58 pDmemInfo->pagesize = PAPI_EINVAL;
59
60 return PAPI_OK;
61}
62
63/*
64 * Cache configuration for BG/P
65 */
66int
68{
69 memset( pMem_Info, 0x0, sizeof ( *pMem_Info ) );
70
71 return PAPI_OK;
72}
#define PAPI_OK
Definition: f90papi.h:73
#define PAPI_EINVAL
Definition: f90papi.h:115
int _bgp_get_dmem_info(PAPI_dmem_info_t *pDmemInfo)
int init_bgp(PAPI_mh_info_t *pMem_Info)
int _bgp_get_memory_info(PAPI_hw_info_t *pHwInfo, int pCPU_Type)
Return codes and api definitions.
A pointer to the following is passed to PAPI_get_dmem_info()
Definition: papi.h:865
long long locked
Definition: papi.h:874
long long shared
Definition: papi.h:870
long long text
Definition: papi.h:871
long long heap
Definition: papi.h:873
long long size
Definition: papi.h:867
long long library
Definition: papi.h:872
long long stack
Definition: papi.h:875
long long pagesize
Definition: papi.h:876
long long high_water_mark
Definition: papi.h:869
long long resident
Definition: papi.h:868
Hardware info structure.
Definition: papi.h:774
PAPI_mh_info_t mem_hierarchy
Definition: papi.h:793
mh for mem hierarchy maybe?
Definition: papi.h:767
int retval
Definition: zero_fork.c:53