mco_perfmon_init

Initialize the perfmon database.

Prototype

 
    MCO_RET	mco_perfmon_init(	/*IN*/ void *memory, /*IN*/ mco_size_t memory_size);
 

Arguments

memory

Address of memory to use for the perfmon database

memory_size The size in bytes of the database memory segment

Description

This function initializes the perfmon database.

Return Codes

MCO_S_OK The perfmon database was initialized successfully
MCO_E_PERFMON_ALREADY_INITIALIZED An instance of the perfmon database has already been initialized

Example

 
    Application snippet:
        
     
    #define PERF_DATABASE_SEGMENT_SIZE ( 64<<20 )
     
    int main(int argc, char* argv[])
    {
        mco_db_h db;
        MCO_RET rc;
        ...
        void *perf_memory;
         
        ...
        perf_memory = malloc(PERF_DATABASE_SEGMENT_SIZE);
        rc = mco_perfmon_init(perf_memory, PERF_DATABASE_SEGMENT_SIZE);
        ...
         
    }
 

Files

Header file:
mcoperfmon.h
Source file:
mcoperf.c
Library:
libmcoperf.a