Blame src/components/appio/appio.h

Packit 577717
/****************************/
Packit 577717
/* THIS IS OPEN SOURCE CODE */
Packit 577717
/****************************/
Packit 577717
Packit 577717
/**
Packit 577717
 * @file    appio.h
Packit 577717
 * CVS:     $Id: appio.h,v 1.1.2.4 2012/02/01 05:01:00 tmohan Exp $
Packit 577717
 *
Packit 577717
 * @author  Philip Mucci
Packit 577717
 *          phil.mucci@samaratechnologygroup.com
Packit 577717
 *
Packit 577717
 * @author  Tushar Mohan
Packit 577717
 *          tushar.mohan@samaratechnologygroup.com
Packit 577717
 *
Packit 577717
 * @ingroup papi_components
Packit 577717
 *
Packit 577717
 * @brief appio component
Packit 577717
 *  This file contains the source code for a component that enables
Packit 577717
 *  PAPI to access application level file and socket I/O information.
Packit 577717
 *  It does this through function replacement in the first person and
Packit 577717
 *  by trapping syscalls in the third person.
Packit 577717
 */
Packit 577717
Packit 577717
#ifndef _PAPI_APPIO_H
Packit 577717
#define _PAPI_APPIO_H
Packit 577717
Packit 577717
#include <unistd.h>
Packit 577717
Packit 577717
/*************************  DEFINES SECTION  ***********************************/
Packit 577717
Packit 577717
/* Set this equal to the number of elements in _appio_counter_info array */
Packit 577717
#define APPIO_MAX_COUNTERS 45
Packit 577717
Packit 577717
/** Structure that stores private information of each event */
Packit 577717
typedef struct APPIO_register
Packit 577717
{
Packit 577717
    /* This is used by the framework. It likes it to be !=0 to do something */
Packit 577717
    unsigned int selector;
Packit 577717
} APPIO_register_t;
Packit 577717
Packit 577717
Packit 577717
/*
Packit 577717
 * The following structures mimic the ones used by other components. It is more
Packit 577717
 * convenient to use them like that as programming with PAPI makes specific
Packit 577717
 * assumptions for them.
Packit 577717
 */
Packit 577717
Packit 577717
Packit 577717
/* This structure is used to build the table of events */
Packit 577717
Packit 577717
typedef struct APPIO_native_event_entry
Packit 577717
{
Packit 577717
    APPIO_register_t resources;
Packit 577717
    const char* name;
Packit 577717
    const char* description;
Packit 577717
} APPIO_native_event_entry_t;
Packit 577717
Packit 577717
Packit 577717
typedef struct APPIO_reg_alloc
Packit 577717
{
Packit 577717
    APPIO_register_t ra_bits;
Packit 577717
} APPIO_reg_alloc_t;
Packit 577717
Packit 577717
Packit 577717
typedef struct APPIO_control_state
Packit 577717
{
Packit 577717
    int num_events;
Packit 577717
    int counter_bits[APPIO_MAX_COUNTERS];
Packit 577717
    long long values[APPIO_MAX_COUNTERS]; // used for caching
Packit 577717
} APPIO_control_state_t;
Packit 577717
Packit 577717
Packit 577717
typedef struct APPIO_context
Packit 577717
{
Packit 577717
    APPIO_control_state_t state;
Packit 577717
} APPIO_context_t;
Packit 577717
Packit 577717
Packit 577717
/*************************  GLOBALS SECTION  ***********************************
Packit 577717
 *******************************************************************************/
Packit 577717
Packit 577717
#endif /* _PAPI_APPIO_H */
Packit 577717
Packit 577717
/* vim:set ts=4 sw=4 sts=4 et: */