Changeset b13b939 for tools


Ignore:
Timestamp:
06/18/14 16:12:46 (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:
85e87b5
Parents:
82facc5
Message:

Adds a configuration option for the tick messages.
Adds the trace_information structure which contains information about traces.
Updates trace_rt_stats to use both of these.

Replaced libtrace_t->joined internally with a state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracertstats/tracertstats_parallel.c

    r82facc5 rb13b939  
    158158                result_t * res = libtrace_result_get_value(&result);
    159159                static result_t *  last_res = NULL;
     160                // Memory manager might falsely trigger this
    160161                assert(res != last_res);
    161162                last_res = res;
     
    207208                while (packet_interval != UINT64_MAX && last_ts<ts) {
    208209                        // Publish and make a new one new
    209                         fprintf(stderr, "Publishing result %"PRIu64"\n", last_ts);
     210                        //fprintf(stderr, "Publishing result %"PRIu64"\n", last_ts);
    210211                        trace_publish_result(trace, (uint64_t) last_ts, results);
    211212                        trace_post_reduce(trace);
     
    258259                                        next_update_time = (last_ts*packet_interval + packet_interval) * 1000000 + offset;
    259260                                        if (next_update_time <= mesg->additional.uint64) {
    260                                                 fprintf(stderr, "Got a tick and publishing early!!\n");
     261                                                //fprintf(stderr, "Got a tick and publishing early!!\n");
    261262                                                trace_publish_result(trace, (uint64_t) last_ts, results);
    262263                                                trace_post_reduce(trace);
     
    264265                                                last_ts++;
    265266                                        } else {
    266                                                 fprintf(stderr, "Got a tick but no publish ...\n");
     267                                                //fprintf(stderr, "Got a tick but no publish ...\n");
    267268                                        }
    268269                                } else {
    269                                         fprintf(stderr, "Got a tick but no packets seen yet!!!\n");
     270                                        //fprintf(stderr, "Got a tick but no packets seen yet!!!\n");
    270271                                }
    271272                        }
     
    309310        int i = 1;
    310311        trace_parallel_config(trace, TRACE_OPTION_ORDERED, &i);
    311         trace_parallel_config(trace, TRACE_OPTION_TRACETIME, &i);
    312         trace_set_hasher(trace, HASHER_CUSTOM, &bad_hash, NULL);
    313 #if TRACE_TIME
    314         if (trace_pstart(trace, NULL, &per_packet_tracetime, NULL)==-1) {
    315 #else
     312        /* trace_parallel_config(trace, TRACE_OPTION_TRACETIME, &i); */
     313        //trace_set_hasher(trace, HASHER_CUSTOM, &bad_hash, NULL);
     314
     315        if (trace_get_information(trace)->live) {
     316                i = (int) (packet_interval * 1000); // Every interval send a tick
     317                trace_parallel_config(trace, TRACE_OPTION_TICK_INTERVAL, &i);
     318        }
     319
    316320        if (trace_pstart(trace, NULL, &per_packet, NULL)==-1) {
    317 #endif
    318321                trace_perror(trace,"Failed to start trace");
    319322                trace_destroy(trace);
     
    462465
    463466
    464         return 0;
    465 }
     467        return 0;
     468}
Note: See TracChangeset for help on using the changeset viewer.