Changeset 150d21a


Ignore:
Timestamp:
Feb 19, 2021, 4:17:45 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
18a7594
Parents:
4c4d854
Message:

Fixed clashing stat counter.

Location:
libcfa/src/concurrency
Files:
3 edited

Legend:

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

    r4c4d854 r150d21a  
    173173                __u32 count = tail - head;
    174174                /* paranoid */ verify( count != 0 );
    175                 __STATS__( false, io.calls.submitted += count; )
     175                __STATS__( false, io.calls.completed += count; )
    176176
    177177                for(i; count) {
     
    233233
    234234                        __STATS__( false,
    235                                 io.calls.blocks += 1;
     235                                io.poller.sleeps += 1;
    236236                        )
    237237                        __cfadbg_print_safe(io_core, "Kernel I/O : Parking io poller %d (%p)\n", this.fd, &this);
  • libcfa/src/concurrency/stats.cfa

    r4c4d854 r150d21a  
    3838                        stats->io.calls.blocks      = 0;
    3939                        stats->io.calls.errors.busy = 0;
     40                        stats->io.poller.sleeps     = 0;
    4041                #endif
    4142        }
     
    7172                        __atomic_fetch_add( &cltr->io.calls.blocks     , proc->io.calls.blocks     , __ATOMIC_SEQ_CST ); proc->io.calls.blocks      = 0;
    7273                        __atomic_fetch_add( &cltr->io.calls.errors.busy, proc->io.calls.errors.busy, __ATOMIC_SEQ_CST ); proc->io.calls.errors.busy = 0;
     74                        __atomic_fetch_add( &cltr->io.poller.sleeps    , proc->io.poller.sleeps    , __ATOMIC_SEQ_CST ); proc->io.poller.sleeps     = 0;
    7375                #endif
    7476        }
     
    144146                                        "-     blocking calls     : %'15" PRIu64 "\n"
    145147                                        "- io_uring_enter EBUSYs  : %'15" PRIu64 "\n"
     148                                        "- poller sleeping        : %'15" PRIu64 "\n"
    146149                                        "\n"
    147150                                        , type,  name, id
     
    161164                                        , io.calls.blocks
    162165                                        , io.calls.errors.busy
     166                                        , io.poller.sleeps
    163167                                );
    164168                        }
  • libcfa/src/concurrency/stats.hfa

    r4c4d854 r150d21a  
    8888                                } errors;
    8989                        } calls;
     90                        struct {
     91                                volatile uint64_t sleeps;
     92                        } poller;
    9093                };
    9194        #endif
Note: See TracChangeset for help on using the changeset viewer.