Changeset f0e8bd6


Ignore:
Timestamp:
08/19/14 19:36:48 (6 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:
50b1bee
Parents:
5b4d121
Message:

Fixes reporter function bug.
Links configuration option for threads via the configuration struct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace_parallel.c

    r5b4d121 rf0e8bd6  
    15101510                libtrace->config.hasher_queue_size = 1000;
    15111511
    1512         if (libtrace->perpkt_thread_count <= 0) {
     1512        if (libtrace->config.perpkt_threads <= 0) {
    15131513                // TODO add BSD support
    15141514                libtrace->perpkt_thread_count = sysconf(_SC_NPROCESSORS_ONLN);
     
    15161516                        // Lets just use one
    15171517                        libtrace->perpkt_thread_count = 1;
     1518        } else {
     1519                libtrace->perpkt_thread_count = libtrace->config.perpkt_threads;
    15181520        }
    15191521
     
    20652067
    20662068        libtrace_result_set_key_value(&res, key, value);
     2069
    20672070        /*
    20682071        if (count == 1)
     
    20742077                printf("My vector size is %d\n", libtrace_deque_get_size(&t->deque));
    20752078        count = (count+1)%1000;*/
     2079
    20762080        if (libtrace->reporter_flags & (REDUCE_SEQUENTIAL | REDUCE_ORDERED)) {
    20772081                if (libtrace_deque_get_size(&t->deque) >= libtrace->config.reporter_thold) {
     
    21402144                while ((live_count == libtrace->perpkt_thread_count) || (live_count &&
    21412145                                ((flags & REDUCE_SEQUENTIAL && min_key == libtrace->expected_key) ||
    2142                                 libtrace->state == STATE_JOINED))) {
     2146                                trace_finished(libtrace)))) {
    21432147                        /* Get the minimum queue and then do stuff */
    21442148                        libtrace_result_t r;
     
    22242228                        return trace_set_hasher(libtrace, (enum hasher_types) *((int *) value), NULL, NULL);
    22252229                case TRACE_OPTION_SET_PERPKT_THREAD_COUNT:
    2226                         libtrace->perpkt_thread_count = *((int *) value);
     2230                        libtrace->config.perpkt_threads = *((int *) value);
    22272231                        return 1;
    22282232                case TRACE_DROP_OUT_OF_ORDER:
Note: See TracChangeset for help on using the changeset viewer.