Changeset fd1f65e for libcfa/src/concurrency/ready_queue.cfa
- Timestamp:
- Apr 1, 2021, 8:02:19 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a344425
- Parents:
- b580bcc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/ready_queue.cfa
rb580bcc rfd1f65e 244 244 __cfadbg_print_safe(ready_queue, "Kernel : Pushing %p on cluster %p\n", thrd, cltr); 245 245 246 #if !defined(__CFA_NO_STATISTICS__) 247 const bool external = cltr == kernelTLS().this_processor->cltr; 248 #endif 249 246 250 // write timestamp 247 251 thrd->link.ts = rdtscl(); … … 266 270 [i, local] = idx_from_r(r, preferred); 267 271 272 i %= __atomic_load_n( &lanes.count, __ATOMIC_RELAXED ); 273 268 274 #if !defined(__CFA_NO_STATISTICS__) 269 if(local) { 270 __tls_stats()->ready.pick.push.local++; 271 } 272 #endif 273 274 i %= __atomic_load_n( &lanes.count, __ATOMIC_RELAXED ); 275 276 #if !defined(__CFA_NO_STATISTICS__) 277 __tls_stats()->ready.pick.push.attempt++; 275 if(external) { 276 if(local) __atomic_fetch_add(&cltr->stats->ready.pick.ext.local, 1, __ATOMIC_RELAXED); 277 __atomic_fetch_add(&cltr->stats->ready.pick.ext.attempt, 1, __ATOMIC_RELAXED); 278 } 279 else { 280 if(local) __tls_stats()->ready.pick.push.local++; 281 __tls_stats()->ready.pick.push.attempt++; 282 } 278 283 #endif 279 284 … … 310 315 // Update statistics 311 316 #if !defined(__CFA_NO_STATISTICS__) 312 #if defined(BIAS) 313 if( local ) __tls_stats()->ready.pick.push.lsuccess++; 314 #endif 315 __tls_stats()->ready.pick.push.success++; 317 if(external) { 318 if(local) __atomic_fetch_add(&cltr->stats->ready.pick.ext.lsuccess, 1, __ATOMIC_RELAXED); 319 __atomic_fetch_add(&cltr->stats->ready.pick.ext.success, 1, __ATOMIC_RELAXED); 320 } 321 else { 322 if(local) __tls_stats()->ready.pick.push.lsuccess++; 323 __tls_stats()->ready.pick.push.success++; 324 } 316 325 #endif 317 326
Note: See TracChangeset
for help on using the changeset viewer.