Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
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.

Classes

struct  resources
struct  rstate

Typedefs

typedef struct rusage time_buf_t

Functions

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 (char *rname, RSTATE *parent)
void Resource_Accum (RSTATE *r, RES_REQUEST req)
TIME_INFOGet_Time (RSTATE *r, RES_REQUEST req)
char * Get_Timer_Name (RSTATE *r)
INT 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

typedef struct rusage time_buf_t

Definition at line 43 of file resource.c.


Function Documentation

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

Definition at line 298 of file resource.c.

References Accum_Delta_Time(), resources::etime, resources::freemem, MAX, resources::memory, resources::stime, and resources::utime.

Referenced by Resource_Accum().

Here is the call graph for this function:

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

Definition at line 274 of file resource.c.

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

Referenced by Accum_Delta_Resource().

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

Definition at line 249 of file resource.c.

References resources::etime, resources::freemem, Get_Delta_Time(), Get_Resources(), resources::memory, resources::stime, and resources::utime.

Referenced by Resource_Accum().

Here is the call graph for this function:

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

Definition at line 224 of file resource.c.

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

Referenced by Get_Delta_Resource().

INT Get_Memory ( RSTATE r,
RES_REQUEST  req 
)

Definition at line 469 of file resource.c.

References rstate::cur, rstate::del, resources::memory, RR_Current_Memory, and RR_Delta_Memory.

Referenced by Report_Delta_Time().

static void Get_Resources ( RESOURCES r) [static]
char* Get_Timer_Name ( RSTATE r)

Definition at line 452 of file resource.c.

References rstate::name.

Referenced by Report_Delta_Time().

void Resource_Accum ( RSTATE r,
RES_REQUEST  req 
)
RSTATE* Resource_Alloc ( char *  rname,
RSTATE parent 
)

Definition at line 355 of file resource.c.

References rstate::dad, and rstate::name.

Referenced by Initialize_Timing().

void Resource_Init ( void  )

Definition at line 321 of file resource.c.

References rstate::cur, Get_Resources(), initialized, rstate::name, NULL, and start_time.

Referenced by Get_Resources(), and Initialize_Timing().

Here is the call graph for this function:

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

Variable Documentation

RESOURCES curtime [static]

Definition at line 110 of file resource.c.

Referenced by Resource_Accum(), and Resource_Report().

RESOURCES deltime [static]

Definition at line 110 of file resource.c.

RSTATE runtime [static]

Definition at line 111 of file resource.c.

struct timeval start_time [static]

Definition at line 113 of file resource.c.

Referenced by Get_Resources(), main(), and Resource_Init().

time_buf_t tbuf [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines