Changeset be3f75b for lib/libtrace_int.h


Ignore:
Timestamp:
07/30/14 19:17:14 (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:
f9a70ca
Parents:
a49a9eb
Message:

Fixs statistic counters for parallel traces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace_int.h

    ra49a9eb rbe3f75b  
    204204 */
    205205struct libtrace_thread_t {
     206        int accepted_packets; // The number of packets accepted only used if pread
     207        // is retreving packets
     208        // Set to true once the first packet has been stored
     209        bool recorded_first;
     210        // For thread safety reason we actually must store this here
     211        int64_t tracetime_offset_usec;
     212        void* user_data; // TLS for the user to use
     213        void* format_data; // TLS for the format to use
     214        libtrace_message_queue_t messages; // Message handling
     215        libtrace_ringbuffer_t rbuffer; // Input
     216        libtrace_vector_t vector; // Output
     217        libtrace_queue_t deque; // Real Output type makes more sense
    206218        libtrace_t * trace;
    207219        void* ret;
    208220        enum thread_types type;
    209221        enum thread_states state;
    210         void* user_data; // TLS for the user to use
    211         void* format_data; // TLS for the format to use
    212222        pthread_t tid;
    213223        int perpkt_num; // A number from 0-X that represents this perpkt threads number
    214224                                // in the table, intended to quickly identify this thread
    215225                                // -1 represents NA (such as the case this is not a perpkt thread)
    216         libtrace_ringbuffer_t rbuffer; // Input
    217         libtrace_vector_t vector; // Output
    218         libtrace_queue_t deque; // Real Output type makes more sense
    219         libtrace_message_queue_t messages; // Message handling
    220         // Temp storage for time sensitive results
    221         uint64_t tmp_key;
    222         void *tmp_data;
    223         pthread_spinlock_t tmp_spinlock;
    224         // Set to true once the first packet has been stored
    225         bool recorded_first;
    226         // For thread safety reason we actually must store this here
    227         int64_t tracetime_offset_usec;
    228226};
    229227
     
    347345        struct first_packets first_packets;
    348346        int tracetime;
     347
     348        /*
     349         * Caches statistic counters in the case that our trace is
     350         * paused or stopped before this counter is taken
     351         */
     352        uint64_t dropped_packets;
     353        uint64_t received_packets;
    349354};
    350355
Note: See TracChangeset for help on using the changeset viewer.