PIPS
|
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/times.h>
#include <sys/time.h>
#include "genC.h"
#include "database.h"
#include "linear.h"
#include "ri.h"
#include "pipsdbm.h"
#include <unistd.h>
Go to the source code of this file.
Macros | |
#define | MAX_TIME_STRING_LENGTH 1024 |
Functions | |
void | interrupt_pipsmake_asap () |
misc.c More... | |
void | dont_interrupt_pipsmake_asap () |
bool | interrupt_pipsmake_asap_p () |
static double | get_real_timer () |
Get real time in seconds in a double representation. More... | |
static void | set_current_time (struct tms *now, double *rnow) |
set current usage and time in two formats More... | |
void | init_request_timers () |
Functions for timing one request. More... | |
void | init_log_timers () |
Functions for timing one phase. More... | |
void | dbm_start_timer () |
void | dbm_stop_timer () |
accumulate dbm related times for one phase More... | |
void | get_string_timers (string *with_io, string *io) |
compute times elapsed since init_log_timers(), i.e. More... | |
void | get_request_string_timers (string *global, string *phases, string *dbm) |
compute times elapsed since init_request_log_timers(), i.e. More... | |
void | init_resource_usage_check () |
init variables More... | |
void | add_read_resource (string rname, string oname) |
add an element to the read set More... | |
void | add_write_resource (string rname, string oname) |
add an element to the write set More... | |
void | get_logged_resources (set *sr, set *sw) |
Get the made sets. More... | |
Variables | |
static bool | flag_interrupt_pipsmake_asap = false |
static struct tms | request_time |
Timing of one request. More... | |
static double | real_request_time |
static struct tms | request_phase_time |
static double | real_request_phase_time |
static struct tms | request_dbm_time |
static double | real_request_dbm_time |
static struct tms | phase_time |
Timing of one phase. More... | |
static double | real_phase_time |
static struct tms | dbm_time |
static double | real_dbm_time |
static struct tms | total_dbm_time |
static double | real_total_dbm_time |
static set | res_read = set_undefined |
Sets of the readwrite resources by pipsdbm. More... | |
static set | res_write = set_undefined |
add an element to the read set
rname | name |
oname | name |
Definition at line 251 of file misc.c.
References concatenate(), res_read, set_add_element(), set_undefined_p, and strdup().
add an element to the write set
rname | name |
oname | name |
Definition at line 260 of file misc.c.
References concatenate(), res_write, set_add_element(), set_undefined_p, and strdup().
void dbm_start_timer | ( | void | ) |
Definition at line 131 of file misc.c.
References dbm_time, real_dbm_time, and set_current_time().
void dbm_stop_timer | ( | void | ) |
accumulate dbm related times for one phase
Definition at line 137 of file misc.c.
References current, dbm_time, real_dbm_time, real_total_dbm_time, set_current_time(), and total_dbm_time.
void dont_interrupt_pipsmake_asap | ( | void | ) |
Definition at line 53 of file misc.c.
References flag_interrupt_pipsmake_asap.
Referenced by apply(), concurrent_apply(), delete_some_resources(), and make().
|
static |
Get real time in seconds in a double representation.
Definition at line 89 of file misc.c.
Referenced by set_current_time().
compute times elapsed since init_request_log_timers(), i.e.
for one request to pipsmake (btw this code is misplaced...)
global | lobal |
phases | hases |
dbm | bm |
Definition at line 196 of file misc.c.
References MAX_TIME_STRING_LENGTH, real_request_dbm_time, real_request_phase_time, real_request_time, request_dbm_time, request_phase_time, request_time, s1, and set_current_time().
Referenced by logs_off().
compute times elapsed since init_log_timers(), i.e.
for one phase
accumulate phase times in request times, ignoring sub-processes ???
with_io | ith_io |
io | o |
Definition at line 155 of file misc.c.
References MAX_TIME_STRING_LENGTH, phase_time, real_phase_time, real_request_dbm_time, real_request_phase_time, real_total_dbm_time, request_dbm_time, request_phase_time, s1, set_current_time(), and total_dbm_time.
Referenced by apply_a_rule().
void init_log_timers | ( | void | ) |
Functions for timing one phase.
Definition at line 122 of file misc.c.
References phase_time, real_phase_time, real_total_dbm_time, set_current_time(), and total_dbm_time.
Referenced by apply_a_rule().
void init_request_timers | ( | void | ) |
Functions for timing one request.
initialize accumulators for dbm and phase times
Definition at line 106 of file misc.c.
References real_request_dbm_time, real_request_phase_time, real_request_time, request_dbm_time, request_phase_time, request_time, and set_current_time().
Referenced by logs_on().
void init_resource_usage_check | ( | void | ) |
init variables
Definition at line 240 of file misc.c.
References res_read, res_write, set_clear(), set_make(), set_string, and set_undefined_p.
Referenced by apply_a_rule().
void interrupt_pipsmake_asap | ( | void | ) |
misc.c
Definition at line 48 of file misc.c.
References flag_interrupt_pipsmake_asap.
Referenced by pips_signal_handler(), and wpips_interrupt_pipsmake().
bool interrupt_pipsmake_asap_p | ( | void | ) |
Definition at line 58 of file misc.c.
References flag_interrupt_pipsmake_asap.
Referenced by apply_a_rule().
|
static |
set current usage and time in two formats
Definition at line 98 of file misc.c.
References get_real_timer().
Referenced by dbm_start_timer(), dbm_stop_timer(), get_request_string_timers(), get_string_timers(), init_log_timers(), and init_request_timers().
|
static |
Definition at line 79 of file misc.c.
Referenced by dbm_start_timer(), dbm_stop_timer(), and logs_off().
Definition at line 46 of file misc.c.
Referenced by dont_interrupt_pipsmake_asap(), interrupt_pipsmake_asap(), and interrupt_pipsmake_asap_p().
|
static |
Timing of one phase.
Definition at line 75 of file misc.c.
Referenced by get_string_timers(), init_log_timers(), and logs_off().
|
static |
Definition at line 82 of file misc.c.
Referenced by dbm_start_timer(), and dbm_stop_timer().
|
static |
Definition at line 79 of file misc.c.
Referenced by get_string_timers(), and init_log_timers().
|
static |
Definition at line 75 of file misc.c.
Referenced by get_request_string_timers(), get_string_timers(), and init_request_timers().
|
static |
Definition at line 72 of file misc.c.
Referenced by get_request_string_timers(), get_string_timers(), and init_request_timers().
|
static |
Definition at line 69 of file misc.c.
Referenced by get_request_string_timers(), and init_request_timers().
|
static |
Definition at line 85 of file misc.c.
Referenced by dbm_stop_timer(), get_string_timers(), and init_log_timers().
|
static |
Definition at line 72 of file misc.c.
Referenced by get_request_string_timers(), get_string_timers(), and init_request_timers().
|
static |
Definition at line 69 of file misc.c.
Referenced by get_request_string_timers(), get_string_timers(), and init_request_timers().
|
static |
Timing of one request.
Definition at line 58 of file misc.c.
Referenced by get_request_string_timers(), init_request_timers(), and logs_off().
|
static |
Sets of the readwrite resources by pipsdbm.
Definition at line 236 of file misc.c.
Referenced by add_read_resource(), do_resource_usage_check(), get_logged_resources(), and init_resource_usage_check().
|
static |
Definition at line 237 of file misc.c.
Referenced by add_write_resource(), do_resource_usage_check(), get_logged_resources(), and init_resource_usage_check().
|
static |
Definition at line 82 of file misc.c.
Referenced by dbm_stop_timer(), get_string_timers(), and init_log_timers().