Skip to content
Snippets Groups Projects
Commit 49bb772c authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

use stalled only when TIMER set.

Former-commit-id: acc89a147cff089b894d2540e464ef9a33aae6e4
parent 57882237
No related branches found
No related tags found
No related merge requests found
......@@ -269,7 +269,7 @@ struct task *queue_gettask_old ( struct queue *q , int blocking , int keep ) {
struct task *queue_gettask ( struct queue *q , int rid , int blocking , int keep ) {
int k, tid = -1, qcount, *qtid = q->tid, hits = 0;
int k, tid = -1, qcount, *qtid = q->tid, hits;
lock_type *qlock = &q->lock;
struct task *qtasks = q->tasks, *res = NULL;
struct cell *ci_best = NULL, *cj_best = NULL;
......@@ -296,7 +296,7 @@ struct task *queue_gettask ( struct queue *q , int rid , int blocking , int keep
// }
/* Loop over the remaining task IDs. */
qcount = q->count; ind_best = -1;
qcount = q->count; ind_best = -1; hits = 0;
for ( k = q->next ; k < qcount && hits < queue_maxhits ; k++ ) {
/* Put a finger on the task. */
......
......@@ -479,7 +479,9 @@ void *runner_main ( void *data ) {
keep = e->policy & engine_policy_keep;
myq = &e->queues[ threadID % e->nr_queues ];
tpq = ceil( ((double)e->nr_threads) / e->nr_queues );
stalled = 0;
#ifdef TIMER
stalled = 0;
#endif
/* Set up the local list of active queues. */
naq = e->nr_queues;
......@@ -539,8 +541,10 @@ void *runner_main ( void *data ) {
/* Did I get anything? */
if ( t == NULL ) {
COUNT(runner_counter_stall);
if ( !stalled )
stalled = getticks();
#ifdef TIMER
if ( !stalled )
stalled = getticks();
#endif
continue;
}
#ifdef TIMER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment