Commit 2ee01afb authored by Joanne Hugé's avatar Joanne Hugé

Add tracemark and remove trace start

parent 5eda49f8
......@@ -109,6 +109,7 @@ static void *packet_receiving_thread(void *p) {
struct timespec current, previous;
cpu_set_t mask;
int prev_packet_id = 0;
char tracemark_message[128];
// Set thread CPU affinity
if (enable_affinity) {
......@@ -118,9 +119,6 @@ static void *packet_receiving_thread(void *p) {
error(EXIT_FAILURE, errno, "Could not set CPU affinity to CPU #1\n");
}
// Start tracing
if (main_params.enable_tracing) tracing(1);
clock_gettime(CLOCK_MONOTONIC, &measures_start);
// Packet receiving loop
......@@ -168,6 +166,8 @@ static void *packet_receiving_thread(void *p) {
// If the latency hits the tracing threshold, stop tracing
if (main_params.enable_tracing &&
(ingress_stats.max_interval > thread_params.latency_threshold)) {
sprintf(tracemark_message, "Jitter threshold hit: %dus\n", ingress_stats.max_interval);
tracemark(tracemark_message);
tracing(0);
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment