struct eb32_node rq; /* ebtree node used to hold the task in the run queue */
int state; /* task state : bit field of TASK_* */
int expire; /* next expiration date for this task, in ticks */
+ unsigned int calls; /* number of times ->process() was called */
struct task * (*process)(struct task *t); /* the function which processes the task */
void *context; /* the task's context */
int nice; /* the task's current nice value from -1024 to +1024 */
}
chunk_printf(&msg, sizeof(trash),
- " si=(%d,%d) as=%d ts=%02x age=%s",
+ " si=(%d,%d) as=%d ts=%02x age=%s calls=%d",
curr_sess->si[0].state, curr_sess->si[1].state,
curr_sess->ana_state, curr_sess->task->state,
- human_time(now.tv_sec - curr_sess->logs.tv_accept.tv_sec, 1));
+ human_time(now.tv_sec - curr_sess->logs.tv_accept.tv_sec, 1),
+ curr_sess->task->calls);
if (task_in_rq(curr_sess->task))
chunk_printf(&msg, sizeof(trash), " run(nice=%d)\n", curr_sess->task->nice);
/* This is an optimisation to help the processor's branch
* predictor take this most common call.
*/
+ t->calls++;
if (likely(t->process == process_session))
t = process_session(t);
else