Ignore:
Timestamp:
08/12/14 14:14:50 (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:
0862c20
Parents:
f9a70ca
Message:

Tidies up the state messages received, now all states are passed through created->resumed->paused->stopped this might simplify some code. Removed the extra paused state.
Hooks up the reporter method through trace_pstart, hopefully resulting in simpler code most of the time. Also renames this from reducer to reporter anywhere it was not already. Adds a test for this also.
Removes is_packet from a result in favour of a more generic type, with packet being one of these.
Moves configuration for tuning relelated settings into a single structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracestats/tracestats_parallel.c

    r9594cf9 rf051c1b  
    6767        // trace_interrupt();
    6868        // trace_pstop isn't really signal safe because its got lots of locks in it
    69         // trace_pstop(trace);
    70         if (s == 0) {
     69    trace_pstop(trace);
     70    /*if (s == 0) {
    7171                if (trace_ppause(trace) == -1)
    7272                        trace_perror(trace, "Pause failed");
     
    7575                if (trace_pstart(trace, NULL, NULL, NULL) == -1)
    7676                        trace_perror(trace, "Start failed");
    77         }
     77    }*/
    7878        s = !s;
    7979}
     
    129129                // printf ("%d.%06d READ #%"PRIu64"\n", tv.tv_sec, tv.tv_usec, trace_packet_get(packet));
    130130                switch (mesg->code) {
    131                         case MESSAGE_STOPPED:
    132                                 trace_publish_result(trace, 0, results); // Only ever using a single key 0
     131                        case MESSAGE_STOPPING:
     132                                trace_publish_result(trace, t, 0, results, RESULT_NORMAL); // Only ever using a single key 0
    133133                                fprintf(stderr, "Thread published resuslts WOWW\n");
    134134                                break;
    135                         case MESSAGE_STARTED:
     135                        case MESSAGE_STARTING:
    136136                                results = calloc(1, sizeof(statistics_t) * (filter_count + 1));
    137137                                break;
     
    142142                                fprintf(stderr, "Thread is pausing\n");
    143143                                break;
    144                         case MESSAGE_PAUSED:
     144                        case MESSAGE_RESUMING:
    145145                                fprintf(stderr, "Thread has paused\n");
    146146                                break;
     
    228228        int option = 2;
    229229        //option = 10000;
    230         trace_set_hasher(trace, HASHER_CUSTOM, &rand_hash, NULL);
     230    //trace_set_hasher(trace, HASHER_CUSTOM, &rand_hash, NULL);
    231231        option = 2;
    232232        trace_parallel_config(trace, TRACE_OPTION_SET_PERPKT_THREAD_COUNT, &option);
Note: See TracChangeset for help on using the changeset viewer.