linux-bgq-memory.c File Reference

Include dependency graph for linux-bgq-memory.c:

Go to the source code of this file.

Functions

int init_bgq (PAPI_mh_info_t *pMem_Info)
int _bgq_get_memory_info (PAPI_hw_info_t *pHwInfo, int pCPU_Type)
int _bgq_get_dmem_info (PAPI_dmem_info_t *pDmemInfo)

Function Documentation

int _bgq_get_dmem_info ( PAPI_dmem_info_t pDmemInfo  ) 

Definition at line 53 of file linux-bgq-memory.c.

00054 {
00055 //  pid_t xPID = getpid();
00056 //  prpsinfo_t xInfo;
00057 //  char xFile[256];
00058 //  int xFD;
00059 
00060 //  sprintf(xFile, "/proc/%05d", xPID);
00061 //  if ((fd = open(xFile, O_RDONLY)) < 0) {
00062 //     SUBDBG("PAPI_get_dmem_info can't open /proc/%d\n", xPID);
00063 //     return (PAPI_ESYS);
00064 //  }
00065 //  if (ioctl(xFD, PIOCPSINFO, &xInfo) < 0) {
00066 //     return (PAPI_ESYS);
00067 //  }
00068 //  close(xFD);
00069 
00070     pDmemInfo->size = PAPI_EINVAL;
00071     pDmemInfo->resident = PAPI_EINVAL;
00072     pDmemInfo->high_water_mark = PAPI_EINVAL;
00073     pDmemInfo->shared = PAPI_EINVAL;
00074     pDmemInfo->text = PAPI_EINVAL;
00075     pDmemInfo->library = PAPI_EINVAL;
00076     pDmemInfo->heap = PAPI_EINVAL;
00077     pDmemInfo->locked = PAPI_EINVAL;
00078     pDmemInfo->stack = PAPI_EINVAL;
00079     pDmemInfo->pagesize = PAPI_EINVAL;
00080 
00081     return PAPI_OK;
00082 }

int _bgq_get_memory_info ( PAPI_hw_info_t pHwInfo,
int  pCPU_Type 
)

Definition at line 33 of file linux-bgq-memory.c.

00034 {
00035     int retval = 0;
00036 
00037     switch ( pCPU_Type ) {
00038     default:
00039         //fprintf(stderr,"Default CPU type in %s (%d)\n",__FUNCTION__,__LINE__);
00040         retval = init_bgq( &pHwInfo->mem_hierarchy );
00041         break;
00042     }
00043 
00044     return retval;
00045 }

Here is the call graph for this function:

Here is the caller graph for this function:

int init_bgq ( PAPI_mh_info_t pMem_Info  ) 

Definition at line 88 of file linux-bgq-memory.c.

00089 {
00090     memset( pMem_Info, 0x0, sizeof ( *pMem_Info ) );
00091     //fprintf(stderr,"mem_info not est up [%s (%d)]\n",__FUNCTION__,__LINE__);
00092 
00093     return PAPI_OK;
00094 }

Here is the caller graph for this function:


Generated on 8 Sep 2016 for PAPI by  doxygen 1.6.1