|
PAPI
5.0.1.0
|
00001 /* 00002 * File: linux-bgp-memory.c 00003 * Author: Dave Hermsmeier 00004 * dlherms@us.ibm.com 00005 */ 00006 00007 #include "papi.h" 00008 #include "papi_internal.h" 00009 #ifdef __LINUX__ 00010 #include <limits.h> 00011 #endif 00012 #include <stdio.h> 00013 00014 /* 00015 * Prototypes... 00016 */ 00017 int init_bgp( PAPI_mh_info_t * pMem_Info ); 00018 00019 /* 00020 * Get Memory Information 00021 * 00022 * Fills in memory information - effectively set to all 0x00's 00023 */ 00024 extern int 00025 _bgp_get_memory_info( PAPI_hw_info_t * pHwInfo, int pCPU_Type ) 00026 { 00027 int retval = 0; 00028 00029 switch ( pCPU_Type ) { 00030 default: 00031 //fprintf(stderr,"Default CPU type in %s (%d)\n",__FUNCTION__,__LINE__); 00032 retval = init_bgp( &pHwInfo->mem_hierarchy ); 00033 break; 00034 } 00035 00036 return retval; 00037 } 00038 00039 /* 00040 * Get DMem Information for BG/P 00041 * 00042 * NOTE: Currently, all values set to -1 00043 */ 00044 extern int 00045 _bgp_get_dmem_info( PAPI_dmem_info_t * pDmemInfo ) 00046 { 00047 00048 pDmemInfo->size = PAPI_EINVAL; 00049 pDmemInfo->resident = PAPI_EINVAL; 00050 pDmemInfo->high_water_mark = PAPI_EINVAL; 00051 pDmemInfo->shared = PAPI_EINVAL; 00052 pDmemInfo->text = PAPI_EINVAL; 00053 pDmemInfo->library = PAPI_EINVAL; 00054 pDmemInfo->heap = PAPI_EINVAL; 00055 pDmemInfo->locked = PAPI_EINVAL; 00056 pDmemInfo->stack = PAPI_EINVAL; 00057 pDmemInfo->pagesize = PAPI_EINVAL; 00058 00059 return PAPI_OK; 00060 } 00061 00062 /* 00063 * Cache configuration for BG/P 00064 */ 00065 int 00066 init_bgp( PAPI_mh_info_t * pMem_Info ) 00067 { 00068 memset( pMem_Info, 0x0, sizeof ( *pMem_Info ) ); 00069 00070 return PAPI_OK; 00071 }