Changeset 29cb302
- Timestamp:
- Jun 24, 2020, 3:37:32 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d72c074
- Parents:
- 7bfc849
- Location:
- libcfa/src/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/concurrency/kernel.cfa ¶
r7bfc849 r29cb302 490 490 $thread * thrd_src = kernelTLS.this_thread; 491 491 492 #if !defined(__CFA_NO_STATISTICS__) 493 struct processor * last_proc = kernelTLS.this_processor; 494 #endif 495 492 496 // Run the thread on this processor 493 497 { … … 504 508 } 505 509 510 #if !defined(__CFA_NO_STATISTICS__) 511 if(last_proc != kernelTLS.this_processor) { 512 __tls_stats()->ready.threads.migration++; 513 } 514 #endif 515 506 516 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); 507 517 /* paranoid */ verifyf( ((uintptr_t)thrd_src->context.SP) < ((uintptr_t)__get_stack(thrd_src->curr_cor)->base ), "ERROR : Returning $thread %p has been corrupted.\n StackPointer too small.\n", thrd_src ); -
TabularUnified libcfa/src/concurrency/stats.cfa ¶
r7bfc849 r29cb302 17 17 stats->ready.pick.pop .local = 0; 18 18 stats->ready.pick.pop .lsuccess = 0; 19 stats->ready.threads.migration = 0; 19 20 stats->ready.sleep.halts = 0; 20 21 stats->ready.sleep.cancels = 0; … … 49 50 __atomic_fetch_add( &cltr->ready.pick.pop .local , proc->ready.pick.pop .local , __ATOMIC_SEQ_CST ); 50 51 __atomic_fetch_add( &cltr->ready.pick.pop .lsuccess, proc->ready.pick.pop .lsuccess, __ATOMIC_SEQ_CST ); 52 __atomic_fetch_add( &cltr->ready.threads.migration, proc->ready.threads.migration, __ATOMIC_SEQ_CST ); 51 53 __atomic_fetch_add( &cltr->ready.sleep.halts , proc->ready.sleep.halts , __ATOMIC_SEQ_CST ); 52 54 __atomic_fetch_add( &cltr->ready.sleep.cancels, proc->ready.sleep.cancels, __ATOMIC_SEQ_CST ); … … 113 115 "- local push avg prb len : %'18.2lf, %'18.2lf%% (%'15lu attempts)\n" 114 116 "- local pop avg prb len : %'18.2lf, %'18.2lf%% (%'15lu attempts)\n" 117 "- thread migrations : %'15lu\n" 115 118 "- Idle Sleep -\n" 116 119 "-- halts : %'15lu\n" … … 140 143 , lpush_len, lpush_sur, ready.pick.push.local 141 144 , lpop_len , lpop_sur , ready.pick.pop .local 145 , ready.threads.migration 142 146 , ready.sleep.halts, ready.sleep.cancels, ready.sleep.wakes, ready.sleep.exits 143 147 #if defined(HAVE_LINUX_IO_URING_H) -
TabularUnified libcfa/src/concurrency/stats.hfa ¶
r7bfc849 r29cb302 46 46 } pop; 47 47 } pick; 48 struct { 49 volatile uint64_t migration; 50 } threads; 48 51 struct { 49 52 volatile uint64_t halts;
Note: See TracChangeset
for help on using the changeset viewer.