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
  • test/test-format-parallel-singlethreaded.c

    r59ef093 rf051c1b  
    9595        bool seen_start_message;
    9696        bool seen_stop_message;
    97         bool seen_paused_message;
     97        bool seen_resuming_message;
    9898        bool seen_pausing_message;
    9999        int count;
     
    125125        }
    126126        else switch (mesg->code) {
    127                 case MESSAGE_STARTED:
     127                case MESSAGE_STARTING:
    128128                        assert(tls == NULL);
    129129                        tls = calloc(sizeof(struct TLS), 1);
     
    132132                        tls->seen_start_message = true;
    133133                        break;
    134                 case MESSAGE_STOPPED:
     134                case MESSAGE_STOPPING:
    135135                        assert(tls->seen_start_message);
    136136                        assert(tls != NULL);
     
    139139
    140140                        // All threads publish to verify the thread count
    141                         trace_publish_result(trace, (uint64_t) 0, (void *) tls->count);
    142                         trace_post_reduce(trace);
     141                        trace_publish_result(trace, t, (uint64_t) 0, (void *) tls->count, RESULT_NORMAL);
     142                        trace_post_reporter(trace);
    143143                        free(tls);
    144144                        break;
     
    152152                        tls->seen_pausing_message = true;
    153153                        break;
    154                 case MESSAGE_PAUSED:
    155                         assert(tls->seen_pausing_message);
    156                         tls->seen_paused_message = true;
     154                case MESSAGE_RESUMING:
     155                        assert(tls->seen_pausing_message || tls->seen_start_message);
     156                        tls->seen_resuming_message = true;
    157157                        break;
    158158        }
Note: See TracChangeset for help on using the changeset viewer.