void monitor_point(void *group_data, void *frame_data, u32 mpoint) { struct fimc_is_group *group; BUG_ON(!group_data); BUG_ON(!frame_data); group = group_data; #if defined(MEASURE_TIME) && defined(MONITOR_TIME) { struct fimc_is_frame *frame; struct fimc_is_monitor *point; frame = frame_data; point = &frame->mpoint[mpoint]; do_gettimeofday(&point->time); /* only group thread postion */ if (mpoint >= 2 && mpoint <= 12) group->pcount = mpoint; point->pcount = mpoint; point->check = true; if (mpoint == TMM_DEQUE) monitor_report(group_data, frame_data); } #else group->pcount = mpoint; #endif }
cmd(a, args, b, source) { if (b && a == "report") { monitor_report("_warning_monitor_report_test", S("%O is testing monitor_report: %O", source || previous_object(), args)); return 1; } return ::cmd(a, args, b, source); }
static NORETURN void monitor_process(void) { int start = tot_req; while (1) { monitor_report(); kprintf("tot_req=%d [%d reqs/s]\n", tot_req, tot_req - start); start = tot_req; timer_delay(1000); } }
int main(void) { /* Hardware initialization */ init(); /* Create a new child process */ proc_new(led_process, NULL, KERN_MINSTACKSIZE * 2, NULL); /* * The main process is kept to periodically report the stack * utilization of all the processes (1 probe per second). */ while (1) { monitor_report(); timer_delay(1000); } }