Changeset 88f2f0f for libcfa/src


Ignore:
Timestamp:
Jul 22, 2023, 8:37:38 AM (11 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
378096a
Parents:
d9b7b66
Message:

change zeroing of individual statistics fields to memset

File:
1 edited

Legend:

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

    rd9b7b66 r88f2f0f  
    1111#if !defined(__CFA_NO_STATISTICS__)
    1212        void __init_stats( struct __stats_t * stats ) {
    13                 stats->ready.push.local.attempt = 0;
    14                 stats->ready.push.local.success = 0;
    15                 stats->ready.push.share.attempt = 0;
    16                 stats->ready.push.share.success = 0;
    17                 stats->ready.push.extrn.attempt = 0;
    18                 stats->ready.push.extrn.success = 0;
    19                 stats->ready.pop.local .attempt = 0;
    20                 stats->ready.pop.local .success = 0;
    21                 stats->ready.pop.help  .attempt = 0;
    22                 stats->ready.pop.help  .success = 0;
    23                 stats->ready.pop.steal .attempt = 0;
    24                 stats->ready.pop.steal .success = 0;
    25                 stats->ready.pop.search.attempt = 0;
    26                 stats->ready.pop.search.success = 0;
    27                 stats->ready.threads.migration = 0;
    28                 stats->ready.threads.extunpark = 0;
    29                 stats->ready.threads.threads   = 0;
    30                 stats->ready.threads.cthreads  = 0;
    31                 stats->ready.threads.preempt.yield  = 0;
    32                 stats->ready.threads.preempt.rllfwd = 0;
    33                 stats->ready.sleep.halts   = 0;
    34                 stats->ready.sleep.cancels = 0;
    35                 stats->ready.sleep.early   = 0;
    36                 stats->ready.sleep.wakes   = 0;
    37                 stats->ready.sleep.seen    = 0;
    38                 stats->ready.sleep.exits   = 0;
     13                memset( &stats->ready, 0, sizeof( stats->ready ) );
    3914
    4015                #if defined(CFA_HAVE_LINUX_IO_URING_H)
    41                         stats->io.alloc.fast        = 0;
    42                         stats->io.alloc.slow        = 0;
    43                         stats->io.alloc.fail        = 0;
    44                         stats->io.alloc.revoke      = 0;
    45                         stats->io.alloc.block       = 0;
    46                         stats->io.submit.fast       = 0;
    47                         stats->io.submit.slow       = 0;
    48                         stats->io.submit.eagr       = 0;
    49                         stats->io.submit.nblk       = 0;
    50                         stats->io.submit.extr       = 0;
    51                         stats->io.flush.external    = 0;
    52                         stats->io.flush.signal      = 0;
    53                         stats->io.flush.dirty       = 0;
    54                         stats->io.flush.full        = 0;
    55                         stats->io.flush.idle        = 0;
    56                         stats->io.flush.eager       = 0;
    57                         stats->io.calls.flush       = 0;
    58                         stats->io.calls.submitted   = 0;
    59                         stats->io.calls.drain       = 0;
    60                         stats->io.calls.completed   = 0;
    61                         stats->io.calls.locked      = 0;
    62                         stats->io.calls.helped      = 0;
    63                         stats->io.calls.errors.busy = 0;
    64                         stats->io.ops.sockread      = 0;
    65                         stats->io.ops.epllread      = 0;
    66                         stats->io.ops.sockwrite     = 0;
    67                         stats->io.ops.epllwrite     = 0;
     16                        memset( &stats->io, 0, sizeof( stats->io ) );
    6817                #endif
    6918
Note: See TracChangeset for help on using the changeset viewer.