Ignore:
Timestamp:
Jun 16, 2020, 12:53: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:
2073d207
Parents:
d29255c
Message:

Moved statistics to stats.cfa to combine ready Q stats and IO stats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel.hfa

    rd29255c r8834751  
    5050struct __processor_id_t {
    5151        unsigned id;
     52
     53        #if !defined(__CFA_NO_STATISTICS__)
     54                struct __stats_t * stats;
     55        #endif
    5256};
    5357
     
    165169                volatile size_t count;
    166170        } lanes;
    167 
    168         // Statistics
    169         #if !defined(__CFA_NO_STATISTICS__)
    170                 struct __attribute__((aligned(64))) {
    171                         struct {
    172                                 // Push statistic
    173                                 struct {
    174                                         // number of attemps at pushing something
    175                                         volatile size_t attempt;
    176 
    177                                         // number of successes at pushing
    178                                         volatile size_t success;
    179                                 } push;
    180 
    181                                 // Pop statistic
    182                                 struct {
    183                                         // number of reads of the mask
    184                                         // picking an empty __cfa_readyQ_mask_t counts here
    185                                         // but not as an attempt
    186                                         volatile size_t maskrds;
    187 
    188                                         // number of attemps at poping something
    189                                         volatile size_t attempt;
    190 
    191                                         // number of successes at poping
    192                                         volatile size_t success;
    193                                 } pop;
    194                         } pick;
    195 
    196                         // stats on the "used" struct of the queue
    197                         // tracks average number of queues that are not empty
    198                         // when pushing / poping
    199                         struct {
    200                                 volatile size_t value;
    201                                 volatile size_t count;
    202                         } used;
    203                 } global_stats;
    204 
    205         #endif
    206171};
    207172
     
    242207        #if !defined(__CFA_NO_STATISTICS__)
    243208                bool print_stats;
     209                struct __stats_t * stats;
    244210        #endif
    245211};
Note: See TracChangeset for help on using the changeset viewer.