|
|
@ -155,22 +155,17 @@ sandbox_print_perf(struct sandbox *sandbox)
|
|
|
|
/* If the log was not defined by an environment variable, early out */
|
|
|
|
/* If the log was not defined by an environment variable, early out */
|
|
|
|
if (runtime_sandbox_perf_log == NULL) return;
|
|
|
|
if (runtime_sandbox_perf_log == NULL) return;
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t total_time_us = sandbox->total_time / runtime_processor_speed_MHz;
|
|
|
|
uint64_t queued_duration = sandbox->allocation_timestamp - sandbox->request_arrival_timestamp;
|
|
|
|
uint32_t queued_us = (sandbox->allocation_timestamp - sandbox->request_arrival_timestamp)
|
|
|
|
|
|
|
|
/ runtime_processor_speed_MHz;
|
|
|
|
|
|
|
|
uint32_t initializing_us = sandbox->initializing_duration / runtime_processor_speed_MHz;
|
|
|
|
|
|
|
|
uint32_t runnable_us = sandbox->runnable_duration / runtime_processor_speed_MHz;
|
|
|
|
|
|
|
|
uint32_t running_us = sandbox->running_duration / runtime_processor_speed_MHz;
|
|
|
|
|
|
|
|
uint32_t blocked_us = sandbox->blocked_duration / runtime_processor_speed_MHz;
|
|
|
|
|
|
|
|
uint32_t returned_us = sandbox->returned_duration / runtime_processor_speed_MHz;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Assumption: A sandbox is never able to free pages. If linear memory management
|
|
|
|
* Assumption: A sandbox is never able to free pages. If linear memory management
|
|
|
|
* becomes more intelligent, then peak linear memory size needs to be tracked
|
|
|
|
* becomes more intelligent, then peak linear memory size needs to be tracked
|
|
|
|
* seperately from current linear memory size.
|
|
|
|
* seperately from current linear memory size.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
fprintf(runtime_sandbox_perf_log, "%lu,%s():%d,%s,%u,%u,%u,%u,%u,%u,%u,%u,%u\n", sandbox->id,
|
|
|
|
fprintf(runtime_sandbox_perf_log, "%lu,%s,%d,%s,%lu,%lu,%lu,%lu,%lu,%lu,%lu,%lu,%u,%u\n", sandbox->id,
|
|
|
|
sandbox->module->name, sandbox->module->port, sandbox_state_stringify(sandbox->state),
|
|
|
|
sandbox->module->name, sandbox->module->port, sandbox_state_stringify(sandbox->state),
|
|
|
|
sandbox->module->relative_deadline_us, total_time_us, queued_us, initializing_us, runnable_us,
|
|
|
|
sandbox->module->relative_deadline, sandbox->total_time, queued_duration,
|
|
|
|
running_us, blocked_us, returned_us, sandbox->linear_memory_size);
|
|
|
|
sandbox->initializing_duration, sandbox->runnable_duration, sandbox->running_duration,
|
|
|
|
|
|
|
|
sandbox->blocked_duration, sandbox->returned_duration, runtime_processor_speed_MHz,
|
|
|
|
|
|
|
|
sandbox->linear_memory_size);
|
|
|
|
}
|
|
|
|
}
|
|
|
|