osprey/common/util/resource.c File Reference

#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <string.h>
#include "defs.h"
#include "resource.h"

Include dependency graph for resource.c:

Go to the source code of this file.

Data Types

type  resources
type  rstate

Typedefs

typedef struct rusage time_buf_t

Functions/Subroutines

static void Clear_Resource (RESOURCES *r)
static void Get_Resources (RESOURCES *r)
static void Get_Delta_Time (TIME_INFO *current, TIME_INFO *base, TIME_INFO *delta)
static void Get_Delta_Resource (RESOURCES *current, RESOURCES *base, RESOURCES *delta)
static void Accum_Delta_Time (TIME_INFO *delta, TIME_INFO *summary)
static void Accum_Delta_Resource (RESOURCES *delta, RESOURCES *summary)
void Resource_Init (void)
RSTATEResource_Alloc (const char *rname, RSTATE *parent)
void Resource_Accum (RSTATE *r, RES_REQUEST req)
TIME_INFOGet_Time (RSTATE *r, RES_REQUEST req)
const char * Get_Timer_Name (RSTATE *r)
INTPTR Get_Memory (RSTATE *r, RES_REQUEST req)
void Resource_Report (FILE *file, RES_REQUEST func, RSTATE *r, char *title)

Variables

static time_buf_t tbuf
static RESOURCES curtime
static RESOURCES deltime
static RSTATE runtime
static struct timeval start_time
static INT initialized = 0


Typedef Documentation

Definition at line 49 of file resource.c.


Function Documentation

static void Accum_Delta_Resource ( RESOURCES delta,
RESOURCES summary 
) [static]

static void Accum_Delta_Time ( TIME_INFO delta,
TIME_INFO summary 
) [static]

Definition at line 303 of file resource.c.

References time_info::secs, and time_info::usecs.

Referenced by Accum_Delta_Resource().

static void Clear_Resource ( RESOURCES r  )  [static]

static void Get_Delta_Resource ( RESOURCES current,
RESOURCES base,
RESOURCES delta 
) [static]

static void Get_Delta_Time ( TIME_INFO current,
TIME_INFO base,
TIME_INFO delta 
) [static]

Definition at line 253 of file resource.c.

References time_info::secs, and time_info::usecs.

Referenced by Get_Delta_Resource().

INTPTR Get_Memory ( RSTATE r,
RES_REQUEST  req 
)

Definition at line 498 of file resource.c.

Referenced by Report_Delta_Time().

static void Get_Resources ( RESOURCES r  )  [static]

TIME_INFO* Get_Time ( RSTATE r,
RES_REQUEST  req 
)

Definition at line 454 of file resource.c.

Referenced by Get_User_Time(), and Report_Delta_Time().

const char* Get_Timer_Name ( RSTATE r  ) 

Definition at line 481 of file resource.c.

Referenced by DIPA_Phase_Manager::Get_Phase_ID(), and Report_Delta_Time().

void Resource_Accum ( RSTATE r,
RES_REQUEST  req 
)

RSTATE* Resource_Alloc ( const char *  rname,
RSTATE parent 
)

Definition at line 384 of file resource.c.

References calloc(), rstate::dad, rstate::name, and r.

Referenced by Alloc_Phase(), and Initialize_Timing().

void Resource_Init ( void   ) 

Definition at line 350 of file resource.c.

Referenced by Get_Resources(), and Initialize_Timing().

void Resource_Report ( FILE file,
RES_REQUEST  func,
RSTATE r,
char *  title 
)

Definition at line 522 of file resource.c.

Referenced by DIPA_Phase::Dump_Stats().


Variable Documentation

RESOURCES curtime [static]

Definition at line 125 of file resource.c.

RESOURCES deltime [static]

Definition at line 125 of file resource.c.

INT initialized = 0 [static]

RSTATE runtime [static]

Definition at line 126 of file resource.c.

Referenced by add_type_for_runtime().

time_buf_t tbuf [static]


Generated on Wed Apr 8 14:43:31 2009 for Open64 by  doxygen 1.5.6