Changeset 368a1ae for lib/trace.c


Ignore:
Timestamp:
02/05/15 19:33:09 (7 years ago)
Author:
Richard Sanger <rsangerarj@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
858ce90
Parents:
75e088f
Message:

Fixes filtered and accepted stat counters

The accepted counter was an int instead of uint64_t.
The filtered counter was not thread safe.

This also tidies up the pread wrapper code - however includes some
changes from the next patch which changes its return so most
likely will not function correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r04bf7c5 r368a1ae  
    19571957{
    19581958        assert(trace);
     1959        int i = 0;
     1960        uint64_t ret = trace->filtered_packets;
     1961        for (i = 0; i < trace->perpkt_thread_count; i++) {
     1962                ret += trace->perpkt_threads[i].filtered_packets;
     1963        }
    19591964        if (trace->format->get_filtered_packets) {
    19601965                return trace->format->get_filtered_packets(trace)+
    1961                         trace->filtered_packets;
    1962         }
    1963         return trace->filtered_packets;
     1966                        ret;
     1967        }
     1968        return ret;
    19641969}
    19651970
Note: See TracChangeset for help on using the changeset viewer.