Changeset a330384
- Timestamp:
- 03/25/15 14:22:27 (6 years ago)
- 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:
- f01c479
- Parents:
- e0be8382
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/libtrace_parallel.h
r6b98325 ra330384 594 594 * 595 595 * @param[in] trace The parallel input trace 596 * @param[in] intervalThe interval in milliseconds. If 0 this is disabled [default].596 * @param[in] millisec The interval in milliseconds. If 0 this is disabled [default]. 597 597 * @return 0 if successful otherwise -1 598 598 * … … 606 606 * @see MESSAGE_TICK_INTERVAL, trace_set_tick_count() 607 607 */ 608 DLLEXPORT int trace_set_tick_interval(libtrace_t *trace, size_t interval);608 DLLEXPORT int trace_set_tick_interval(libtrace_t *trace, size_t millisec); 609 609 610 610 /** Set the count between tick messages. … … 1008 1008 1009 1009 /** TODO WHAT TO DO WITH THIS ? */ 1010 DLLEXPORT uint64_t tv_to_usec( struct timeval *tv);1010 DLLEXPORT uint64_t tv_to_usec(const struct timeval *tv); 1011 1011 1012 1012 … … 1024 1024 * -1 is returned if an error occurs, such as supplied a invalid thread. 1025 1025 * 1026 * The packet returned by this function is shared by all threads and remains1027 * valid until MESSAGE_PAUSING is received.1026 * The packet and timeval returned by this function is shared by all threads 1027 * and remain valid until MESSAGE_PAUSING is received. 1028 1028 */ 1029 1029 DLLEXPORT int trace_get_first_packet(libtrace_t *libtrace, 1030 1030 libtrace_thread_t *t, 1031 libtrace_packet_t **packet,1032 struct timeval **tv);1031 const libtrace_packet_t **packet, 1032 const struct timeval **tv); 1033 1033 1034 1034 /** Makes a packet safe, a packet will become invalid after a … … 1092 1092 * 1093 1093 * @note a environment variable interface is provided by default to users via 1094 * LIBTRACE_CONF IG, see Parallel Configuration for more information.1094 * LIBTRACE_CONF, see Parallel Configuration for more information. 1095 1095 * 1096 1096 * @note this interface is provided to allow a user to configure an application -
lib/trace_parallel.c
r773d5e2 ra330384 944 944 DLLEXPORT int trace_get_first_packet(libtrace_t *libtrace, 945 945 libtrace_thread_t *t, 946 libtrace_packet_t **packet,947 struct timeval **tv)946 const libtrace_packet_t **packet, 947 const struct timeval **tv) 948 948 { 949 949 void * tmp; … … 957 957 /* Throw away these which we don't use */ 958 958 if (!packet) 959 packet = ( libtrace_packet_t **) &tmp;959 packet = (const libtrace_packet_t **) &tmp; 960 960 if (!tv) 961 tv = ( struct timeval **) &tmp;961 tv = (const struct timeval **) &tmp; 962 962 963 963 ASSERT_RET(pthread_spin_lock(&libtrace->first_packets.lock), == 0); … … 991 991 992 992 993 DLLEXPORT uint64_t tv_to_usec( struct timeval *tv)993 DLLEXPORT uint64_t tv_to_usec(const struct timeval *tv) 994 994 { 995 995 return (uint64_t) tv->tv_sec*1000000ull + (uint64_t) tv->tv_usec; … … 1131 1131 1132 1132 if (!t->tracetime_offset_usec) { 1133 libtrace_packet_t *first_pkt;1134 struct timeval *sys_tv;1133 const libtrace_packet_t *first_pkt; 1134 const struct timeval *sys_tv; 1135 1135 int64_t initial_offset; 1136 1136 int stable = trace_get_first_packet(libtrace, NULL, &first_pkt, &sys_tv); … … 2205 2205 } 2206 2206 2207 DLLEXPORT int trace_set_tick_interval(libtrace_t *trace, size_t interval) {2207 DLLEXPORT int trace_set_tick_interval(libtrace_t *trace, size_t millisec) { 2208 2208 if (!trace_is_configurable(trace)) return -1; 2209 2209 2210 trace->config.tick_interval = interval;2210 trace->config.tick_interval = millisec; 2211 2211 return 0; 2212 2212 } -
tools/tracertstats/tracertstats_parallel.c
r6b98325 ra330384 236 236 int64_t offset; 237 237 struct timeval *tv, tv_real; 238 libtrace_packet_t *first_packet = NULL;238 const libtrace_packet_t *first_packet = NULL; 239 239 trace_get_first_packet(trace, NULL, &first_packet, &tv); 240 240 if (first_packet != NULL) {
Note: See TracChangeset
for help on using the changeset viewer.