Changeset 82facc5 for lib/libtrace.h.in


Ignore:
Timestamp:
06/04/14 02:28:58 (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:
b13b939
Parents:
fac8c46
Message:

Adds a thread keepalive that sends a messages to the perpkt threads every second(still todo make this configurable)
Updated tracertstats to use this rather than the temporary result system which has been removed
Also fixes a handful of compile warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h.in

    rfac8c46 r82facc5  
    31143114typedef void* (*fn_per_pkt)(libtrace_t* trace, libtrace_packet_t *p, libtrace_message_t *m, libtrace_thread_t *thread);
    31153115typedef void* (*fn_reducer)(libtrace_t* trace, void* global_blob);
    3116 typedef uint64_t (*fn_hasher)(libtrace_packet_t* packet, void *data);
     3116typedef uint64_t (*fn_hasher)(const libtrace_packet_t* packet, void *data);
    31173117
    31183118DLLEXPORT int trace_pstart(libtrace_t *libtrace, void* global_blob, fn_per_pkt per_pkt, fn_reducer reducer);
     
    31223122DLLEXPORT void trace_join(libtrace_t * trace);
    31233123DLLEXPORT void print_contention_stats (libtrace_t *libtrace);
    3124 DLLEXPORT libtrace_result_t *trace_create_result();
    31253124
    31263125DLLEXPORT void libtrace_result_set_key(libtrace_result_t * result, uint64_t key);
     
    31373136DLLEXPORT void * trace_get_tls(libtrace_thread_t *t);
    31383137
     3138
    31393139DLLEXPORT void trace_publish_result(libtrace_t *libtrace, uint64_t key, void * value);
    31403140DLLEXPORT void trace_publish_packet(libtrace_t *libtrace, libtrace_packet_t *packet);
     
    31423142DLLEXPORT int trace_get_results(libtrace_t *libtrace, libtrace_vector_t * results);
    31433143
    3144 DLLEXPORT libtrace_result_t *trace_create_result();
     3144DLLEXPORT int trace_post_reduce(libtrace_t *libtrace);
    31453145DLLEXPORT int libtrace_thread_get_message_count(libtrace_t * libtrace);
    31463146DLLEXPORT int libtrace_thread_get_message(libtrace_t * libtrace, libtrace_message_t * message);
     
    31483148DLLEXPORT int trace_send_message_to_reducer(libtrace_t * libtrace, libtrace_message_t * message);
    31493149DLLEXPORT int trace_send_message_to_perpkts(libtrace_t * libtrace, libtrace_message_t * message);
     3150DLLEXPORT int trace_send_message_to_thread(libtrace_t * libtrace, libtrace_thread_t *t, libtrace_message_t * message);
    31503151DLLEXPORT int trace_finished(libtrace_t * libtrace);
    31513152DLLEXPORT uint64_t trace_packet_get_order(libtrace_packet_t * packet);
     
    31533154DLLEXPORT void trace_packet_set_order(libtrace_packet_t * packet, uint64_t order);
    31543155DLLEXPORT void trace_packet_set_hash(libtrace_packet_t * packet, uint64_t hash);
     3156DLLEXPORT inline uint64_t tv_to_usec(struct timeval *tv);
    31553157
    31563158DLLEXPORT int retrive_first_packet(libtrace_t *libtrace, libtrace_packet_t **packet, struct timeval **tv);
     3159
     3160union libtrace_64byte_things {
     3161        void *ptr;
     3162        int64_t sint64;
     3163        uint64_t uint64;
     3164        uint32_t uint32s[2];
     3165        int32_t sint32s[2];
     3166        uint32_t uint32;
     3167        int32_t sint32;
     3168        int sint;
     3169        unsigned int uint;
     3170        char schars[8];
     3171        char uchars[8];
     3172};
     3173
     3174typedef struct libtrace_message_t {
     3175        int code;
     3176        union libtrace_64byte_things additional;
     3177        libtrace_thread_t *sender;
     3178} libtrace_message_t;
    31573179
    31583180typedef enum {
     
    32323254        MESSAGE_POST_REDUCE,
    32333255        MESSAGE_POST_RANGE,
     3256        MESSAGE_TICK,
    32343257        MESSAGE_USER
    32353258};
Note: See TracChangeset for help on using the changeset viewer.