Changeset 17a3dff for lib/trace.c


Ignore:
Timestamp:
04/26/14 23:23:17 (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:
5ce14a5
Parents:
60e8e86
Message:

Rename from google map/reduce framework names to something more meaningful.
Rename mapper to perpkt since this is what it actually is in libtrace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    r60e8e86 r17a3dff  
    111111
    112112/* Set once pstart is called used for backwards compatibility reasons */
    113 extern int libtrace_parallel = 0;
     113int libtrace_parallel = 0;
    114114
    115115/* strncpy is not assured to copy the final \0, so we
     
    263263        // libtrace->libtrace_lock
    264264        // libtrace->perpkt_cond;
    265         libtrace->perpkt_pausing = 0;
    266         libtrace->mapper_queue_full = false;
    267         libtrace->mappers_finishing = -1;
     265        libtrace->perpkts_pausing = 0;
     266        libtrace->perpkt_queue_full = false;
     267        libtrace->perpkts_finishing = -1;
    268268        libtrace->reducer_flags = 0;
    269269        libtrace->joined = false;
     
    273273        libtrace->hasher = NULL;
    274274        libtrace->packet_freelist_size = 0;
    275         libtrace->mapper_buffer_size = 0;
     275        libtrace->perpkt_buffer_size = 0;
    276276        libtrace->expected_key = 0;
    277277        libtrace_zero_ringbuffer(&libtrace->packet_freelist);
     
    280280        libtrace_zero_slidingwindow(&libtrace->sliding_window);
    281281        libtrace->reducer_thread.type = THREAD_EMPTY;
    282         libtrace->mapper_thread_count = 0;
    283         libtrace->mapper_threads = NULL;
     282        libtrace->perpkt_thread_count = 0;
     283        libtrace->perpkt_threads = NULL;
    284284
    285285        /* Parse the URI to determine what sort of trace we are dealing with */
     
    381381        // libtrace->libtrace_lock
    382382        // libtrace->perpkt_cond;
    383         libtrace->perpkt_pausing = 0;
    384         libtrace->mapper_queue_full = false;
    385         libtrace->mappers_finishing = -1;
     383        libtrace->perpkts_pausing = 0;
     384        libtrace->perpkt_queue_full = false;
     385        libtrace->perpkts_finishing = -1;
    386386        libtrace->reducer_flags = 0;
    387387        libtrace->joined = false;
     
    392392        libtrace->expected_key = 0;
    393393        libtrace->packet_freelist_size = 0;
    394         libtrace->mapper_buffer_size = 0;
     394        libtrace->perpkt_buffer_size = 0;
    395395        libtrace_zero_ringbuffer(&libtrace->packet_freelist);
    396396        libtrace_zero_thread(&libtrace->hasher_thread);
     
    398398        libtrace_zero_slidingwindow(&libtrace->sliding_window);
    399399        libtrace->reducer_thread.type = THREAD_EMPTY;
    400         libtrace->mapper_thread_count = 0;
    401         libtrace->mapper_threads = NULL;
     400        libtrace->perpkt_thread_count = 0;
     401        libtrace->perpkt_threads = NULL;
    402402       
    403403        for(tmp=formats_list;tmp;tmp=tmp->next) {
     
    655655        libtrace_ringbuffer_destroy(&libtrace->packet_freelist);
    656656       
    657         for (i = 0; i < libtrace->mapper_thread_count; ++i) {
    658                         assert (libtrace_vector_get_size(&libtrace->mapper_threads[i].vector) == 0);
    659                         libtrace_vector_destroy(&libtrace->mapper_threads[i].vector);
    660         }
    661         free(libtrace->mapper_threads);
    662         libtrace->mapper_threads = NULL;
    663         libtrace->mapper_thread_count = 0;
     657        for (i = 0; i < libtrace->perpkt_thread_count; ++i) {
     658                assert (libtrace_vector_get_size(&libtrace->perpkt_threads[i].vector) == 0);
     659                libtrace_vector_destroy(&libtrace->perpkt_threads[i].vector);
     660        }
     661        free(libtrace->perpkt_threads);
     662        libtrace->perpkt_threads = NULL;
     663        libtrace->perpkt_thread_count = 0;
    664664       
    665665        if (libtrace->event.packet) {
Note: See TracChangeset for help on using the changeset viewer.