- client: add <cpu_sched_status> log flag.

This tells you what's running, not why
- client: add <std_debug> log flag; changes in STD

The above are to let you log just stuff relevant to debt.
Right now I'm not sure why we need STD at all.

svn path=/trunk/boinc/; revision=19726
This commit is contained in:
David Anderson 2009-11-28 00:07:39 +00:00
parent 6fc27ffc44
commit 91a7b38b2b
5 changed files with 42 additions and 4 deletions

View File

@ -9552,3 +9552,15 @@ David 27 Nov 2009
client/
cs_scheduler.cpp
David 27 Nov 2009
- client: add <cpu_sched_status> log flag.
This tells you what's running, not why
- client: add <std_debug> log flag; changes in STD
The above are to let you log just stuff relevant to debt.
Right now I'm not sure why we need STD at all.
client/
cpu_sched.cpp
log_flags.cpp,h

View File

@ -568,6 +568,7 @@ void CLIENT_STATE::adjust_debts() {
//
rrs = runnable_resource_share();
for (i=0; i<projects.size(); i++) {
double delta;
p = projects[i];
if (p->non_cpu_intensive) continue;
nprojects++;
@ -575,9 +576,16 @@ void CLIENT_STATE::adjust_debts() {
if (p->runnable()) {
nrprojects++;
share_frac = p->resource_share/rrs;
p->short_term_debt += share_frac*cpu_work_fetch.secs_this_debt_interval
delta = share_frac*cpu_work_fetch.secs_this_debt_interval
- p->cpu_pwf.secs_this_debt_interval;
p->short_term_debt += delta;
total_short_term_debt += p->short_term_debt;
if (log_flags.std_debug) {
msg_printf(p, MSG_INFO,
"[std_debug] std delta %.2f (work done %.2f)",
delta, cpu_work_fetch.secs_this_debt_interval
);
}
} else {
p->short_term_debt = 0;
p->anticipated_debt = 0;
@ -601,6 +609,11 @@ void CLIENT_STATE::adjust_debts() {
p->short_term_debt = -MAX_STD;
}
}
if (log_flags.std_debug) {
msg_printf(p, MSG_INFO,
"[std_debug] std %.2f", p->short_term_debt
);
}
}
}
@ -1489,6 +1502,12 @@ bool CLIENT_STATE::enforce_schedule() {
atp->run_interval_start_wall_time = now;
app_started = now;
}
if (log_flags.cpu_sched_status) {
msg_printf(atp->result->project, MSG_INFO,
"[css] running %s (%s)",
atp->result->name, atp->result->resources
);
}
atp->scheduler_state = CPU_SCHED_SCHEDULED;
swap_left -= atp->procinfo.swap_size;
}

View File

@ -79,8 +79,10 @@ int LOG_FLAGS::parse(XML_PARSER& xp) {
if (xp.parse_bool(tag, "coproc_debug", coproc_debug)) continue;
if (xp.parse_bool(tag, "cpu_sched", cpu_sched)) continue;
if (xp.parse_bool(tag, "cpu_sched_debug", cpu_sched_debug)) continue;
if (xp.parse_bool(tag, "cpu_sched_status", cpu_sched_status)) continue;
if (xp.parse_bool(tag, "dcf_debug", dcf_debug)) continue;
if (xp.parse_bool(tag, "debt_debug", debt_debug)) continue;
if (xp.parse_bool(tag, "std_debug", std_debug)) continue;
if (xp.parse_bool(tag, "file_xfer_debug", file_xfer_debug)) continue;
if (xp.parse_bool(tag, "guirpc_debug", guirpc_debug)) continue;
if (xp.parse_bool(tag, "http_debug", http_debug)) continue;
@ -137,6 +139,7 @@ void LOG_FLAGS::show() {
show_flag(buf, coproc_debug, "coproc_debug");
show_flag(buf, cpu_sched, "cpu_sched");
show_flag(buf, cpu_sched_debug, "cpu_sched_debug");
show_flag(buf, cpu_sched_status, "cpu_sched_status");
show_flag(buf, dcf_debug, "dcf_debug");
show_flag(buf, debt_debug, "debt_debug");
show_flag(buf, file_xfer_debug, "file_xfer_debug");
@ -153,6 +156,7 @@ void LOG_FLAGS::show() {
show_flag(buf, slot_debug, "slot_debug");
show_flag(buf, state_debug, "state_debug");
show_flag(buf, statefile_debug, "statefile_debug");
show_flag(buf, std_debug, "std_debug");
show_flag(buf, task_debug, "task_debug");
show_flag(buf, time_debug, "time_debug");
show_flag(buf, unparsed_xml, "unparsed_xml");

View File

@ -62,10 +62,14 @@ struct LOG_FLAGS {
// preemption and resumption
bool cpu_sched_debug;
// explain scheduler decisions
bool cpu_sched_status;
// show what's running
bool dcf_debug;
// show changes to duration correction factors
bool debt_debug;
// changes to debt
// changes to long-term debt
bool std_debug;
// changes to short-term debt
bool file_xfer_debug;
// show completion of FILE_XFER
bool guirpc_debug;

View File

@ -22,7 +22,6 @@ extern bool startup_idle_monitor();
extern bool attach_idle_monitor();
extern void shutdown_idle_monitor();
extern void detach_idle_monitor();
extern long get_idle_tick_count();
#endif
#endif