mirror of https://github.com/BOINC/boinc.git
- client: enforce excluded app at startup
- win compile fix svn path=/trunk/boinc/; revision=26120
This commit is contained in:
parent
26f9e380d9
commit
5e5ec6f367
|
@ -5962,3 +5962,12 @@ Rom 13 Sept 2012
|
|||
|
||||
client/
|
||||
gpu_nvidia.cpp
|
||||
|
||||
David 16 Sept 2012
|
||||
- client: enforce excluded app at startup
|
||||
- win compile fix
|
||||
|
||||
client/
|
||||
app.cpp
|
||||
lib/
|
||||
filesys.h
|
||||
|
|
|
@ -300,16 +300,19 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
|||
int retval;
|
||||
static bool first = true;
|
||||
static double last_cpu_time;
|
||||
double diff;
|
||||
|
||||
double diff = gstate.now - last_mem_time;
|
||||
if (diff < 0 || diff > MEMORY_USAGE_PERIOD + 10) {
|
||||
// user has changed system clock,
|
||||
// or there has been a long system sleep
|
||||
//
|
||||
last_mem_time = gstate.now;
|
||||
return;
|
||||
if (!first) {
|
||||
diff = gstate.now - last_mem_time;
|
||||
if (diff < 0 || diff > MEMORY_USAGE_PERIOD + 10) {
|
||||
// user has changed system clock,
|
||||
// or there has been a long system sleep
|
||||
//
|
||||
last_mem_time = gstate.now;
|
||||
return;
|
||||
}
|
||||
if (diff < MEMORY_USAGE_PERIOD) return;
|
||||
}
|
||||
if (diff < MEMORY_USAGE_PERIOD) return;
|
||||
|
||||
last_mem_time = gstate.now;
|
||||
PROC_MAP pm;
|
||||
|
@ -345,18 +348,20 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
|||
procinfo_app(pi, v, pm, atp->app_version->graphics_exec_file);
|
||||
pi.working_set_size_smoothed = .5*(pi.working_set_size_smoothed + pi.working_set_size);
|
||||
|
||||
int pf = pi.page_fault_count - last_page_fault_count;
|
||||
pi.page_fault_rate = pf/diff;
|
||||
if (log_flags.mem_usage_debug) {
|
||||
msg_printf(atp->result->project, MSG_INFO,
|
||||
"[mem_usage] %s: WS %.2fMB, smoothed %.2fMB, page %.2fMB, %.2f page faults/sec, user CPU %.3f, kernel CPU %.3f",
|
||||
atp->result->name,
|
||||
pi.working_set_size/MEGA,
|
||||
pi.working_set_size_smoothed/MEGA,
|
||||
pi.swap_size/MEGA,
|
||||
pi.page_fault_rate,
|
||||
pi.user_time, pi.kernel_time
|
||||
);
|
||||
if (!first) {
|
||||
int pf = pi.page_fault_count - last_page_fault_count;
|
||||
pi.page_fault_rate = pf/diff;
|
||||
if (log_flags.mem_usage_debug) {
|
||||
msg_printf(atp->result->project, MSG_INFO,
|
||||
"[mem_usage] %s: WS %.2fMB, smoothed %.2fMB, page %.2fMB, %.2f page faults/sec, user CPU %.3f, kernel CPU %.3f",
|
||||
atp->result->name,
|
||||
pi.working_set_size/MEGA,
|
||||
pi.working_set_size_smoothed/MEGA,
|
||||
pi.swap_size/MEGA,
|
||||
pi.page_fault_rate,
|
||||
pi.user_time, pi.kernel_time
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -391,9 +396,7 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
|||
);
|
||||
}
|
||||
double new_cpu_time = pi.user_time + pi.kernel_time;
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
if (!first) {
|
||||
non_boinc_cpu_usage = (new_cpu_time - last_cpu_time)/(diff*gstate.host_info.p_ncpus);
|
||||
// processes might have exited in the last 10 sec,
|
||||
// causing this to be negative.
|
||||
|
@ -405,6 +408,7 @@ void ACTIVE_TASK_SET::get_memory_usage() {
|
|||
}
|
||||
}
|
||||
last_cpu_time = new_cpu_time;
|
||||
first = false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define _FILESYS_
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN32__)
|
||||
#include "boinc_win.h"
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#include <grp.h>
|
||||
|
@ -29,10 +30,6 @@
|
|||
#include <string>
|
||||
#endif
|
||||
|
||||
#ifndef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
#endif
|
||||
|
||||
#endif /* !WIN32 */
|
||||
|
||||
#define FILE_RETRY_INTERVAL 5
|
||||
|
|
Loading…
Reference in New Issue