Changeset 8bb239d for libcfa/src


Ignore:
Timestamp:
Jul 2, 2020, 4:38:58 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b9237fe
Parents:
e46c753
Message:

Added statistic for number of busies when eager submitting.

Location:
libcfa/src/concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/io.cfa

    re46c753 r8bb239d  
    768768
    769769                                // If some one else collected our index, we are done
     770                                #warning ABA problem
    770771                                if( ring.submit_q.ready[picked] != idx ) {
    771772                                        #if !defined(__CFA_NO_STATISTICS__)
     
    783784                                        break;
    784785                                }
     786
     787                                #if !defined(__CFA_NO_STATISTICS__)
     788                                        disable_interrupts();
     789                                                __tls_stats()->io.submit_q.busy += 1;
     790                                        enable_interrupts( __cfaabi_dbg_ctx );
     791                                #endif
    785792                        }
    786793
  • libcfa/src/concurrency/stats.cfa

    re46c753 r8bb239d  
    3636                        stats->io.submit_q.helped = 0;
    3737                        stats->io.submit_q.leader = 0;
     38                        stats->io.submit_q.busy   = 0;
    3839                        stats->io.complete_q.completed_avg.val = 0;
    3940                        stats->io.complete_q.completed_avg.slow_cnt = 0;
     
    7172                        __atomic_fetch_add( &cltr->io.submit_q.helped                  , proc->io.submit_q.helped                  , __ATOMIC_SEQ_CST );
    7273                        __atomic_fetch_add( &cltr->io.submit_q.leader                  , proc->io.submit_q.leader                  , __ATOMIC_SEQ_CST );
     74                        __atomic_fetch_add( &cltr->io.submit_q.busy                    , proc->io.submit_q.busy                    , __ATOMIC_SEQ_CST );
    7375                        __atomic_fetch_add( &cltr->io.complete_q.completed_avg.val     , proc->io.complete_q.completed_avg.val     , __ATOMIC_SEQ_CST );
    7476                        __atomic_fetch_add( &cltr->io.complete_q.completed_avg.slow_cnt, proc->io.complete_q.completed_avg.slow_cnt, __ATOMIC_SEQ_CST );
     
    145147                                        "- total helped entries   : %'15" PRIu64 "\n"
    146148                                        "- total leader entries   : %'15" PRIu64 "\n"
     149                                        "- total busy submit      : %'15" PRIu64 "\n"
    147150                                        "- total ready search     : %'15" PRIu64 "\n"
    148151                                        "- avg ready search len   : %'18.2lf\n"
     
    157160                                        , io.submit_q.submit_avg.cnt
    158161                                        , avgrdy, avgcsm
    159                                         , io.submit_q.helped, io.submit_q.leader
     162                                        , io.submit_q.helped, io.submit_q.leader, io.submit_q.busy
    160163                                        , io.submit_q.look_avg.cnt
    161164                                        , lavgv, lavgb
  • libcfa/src/concurrency/stats.hfa

    re46c753 r8bb239d  
    8585                                volatile uint64_t helped;
    8686                                volatile uint64_t leader;
     87                                volatile uint64_t busy;
    8788                        } submit_q;
    8889                        struct {
Note: See TracChangeset for help on using the changeset viewer.