X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.c;h=d07e5b4925317f026fbe8b9483b54eae19c7ae77;hp=b2feb3945c8a40f3c1476e4dba7d9b659b8f9f8b;hb=80957876b66b7b666a01680a4f5f44f81a79063b;hpb=01ea340e0a3914f12a50875e6477bfd9a9eee099 diff --git a/src/common/consumer/consumer.c b/src/common/consumer/consumer.c index b2feb3945..d07e5b492 100644 --- a/src/common/consumer/consumer.c +++ b/src/common/consumer/consumer.c @@ -67,6 +67,7 @@ struct consumer_channel_msg { uint64_t key; /* del */ }; +/* Flag used to temporarily pause data consumption from testpoints. */ int data_consumption_paused; /* @@ -2554,6 +2555,12 @@ void *consumer_thread_data_poll(void *data) goto end; } + if (caa_unlikely(data_consumption_paused)) { + DBG("Data consumption paused, sleeping..."); + sleep(1); + goto restart; + } + /* * If the consumer_data_pipe triggered poll go directly to the * beginning of the loop to update the array. We want to prioritize