PAPI  5.1.0.2
linux-bgp-memory.c
Go to the documentation of this file.
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 #include <string.h>
00014 
00015 /*
00016  * Prototypes...
00017  */
00018 int init_bgp( PAPI_mh_info_t * pMem_Info );
00019 
00020 /*
00021  * Get Memory Information
00022  *
00023  * Fills in memory information - effectively set to all 0x00's
00024  */
00025 extern int
00026 _bgp_get_memory_info( PAPI_hw_info_t * pHwInfo, int pCPU_Type )
00027 {
00028     int retval = 0;
00029 
00030     switch ( pCPU_Type ) {
00031     default:
00032         //fprintf(stderr,"Default CPU type in %s (%d)\n",__FUNCTION__,__LINE__);
00033         retval = init_bgp( &pHwInfo->mem_hierarchy );
00034         break;
00035     }
00036 
00037     return retval;
00038 }
00039 
00040 /*
00041  * Get DMem Information for BG/P
00042  *
00043  * NOTE:  Currently, all values set to -1
00044  */
00045 extern int
00046 _bgp_get_dmem_info( PAPI_dmem_info_t * pDmemInfo )
00047 {
00048 
00049     pDmemInfo->size = PAPI_EINVAL;
00050     pDmemInfo->resident = PAPI_EINVAL;
00051     pDmemInfo->high_water_mark = PAPI_EINVAL;
00052     pDmemInfo->shared = PAPI_EINVAL;
00053     pDmemInfo->text = PAPI_EINVAL;
00054     pDmemInfo->library = PAPI_EINVAL;
00055     pDmemInfo->heap = PAPI_EINVAL;
00056     pDmemInfo->locked = PAPI_EINVAL;
00057     pDmemInfo->stack = PAPI_EINVAL;
00058     pDmemInfo->pagesize = PAPI_EINVAL;
00059 
00060     return PAPI_OK;
00061 }
00062 
00063 /*
00064  * Cache configuration for BG/P
00065  */
00066 int
00067 init_bgp( PAPI_mh_info_t * pMem_Info )
00068 {
00069     memset( pMem_Info, 0x0, sizeof ( *pMem_Info ) );
00070 
00071     return PAPI_OK;
00072 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines