From dc32ec4ab20cd2a47506cc3425df9f67af0c1789 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:14:39 +0100 Subject: [PATCH] DPL: add signposts to debug signals --- Framework/Core/src/DataProcessingDevice.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Framework/Core/src/DataProcessingDevice.cxx b/Framework/Core/src/DataProcessingDevice.cxx index 366bfafd7d801..6ae4b62241930 100644 --- a/Framework/Core/src/DataProcessingDevice.cxx +++ b/Framework/Core/src/DataProcessingDevice.cxx @@ -495,11 +495,12 @@ void DataProcessingDevice::Init() void on_signal_callback(uv_signal_t* handle, int signum) { - ZoneScopedN("Signal callaback"); - LOG(debug) << "Signal " << signum << " received."; + O2_SIGNPOST_ID_FROM_POINTER(sid, device, handle); + O2_SIGNPOST_START(device, sid, "signal_state", "Signal %d received.", signum); + auto* registry = (ServiceRegistry*)handle->data; if (!registry) { - LOG(debug) << "No registry active. Ignoring signal"; + O2_SIGNPOST_END(device, sid, "signal_state", "No registry active. Ignoring signal."); return; } ServiceRegistryRef ref{*registry}; @@ -516,6 +517,7 @@ void on_signal_callback(uv_signal_t* handle, int signum) // available and being offered, however we // want to get out of the woods for now. if (offer.valid && offer.sharedMemory != 0) { + O2_SIGNPOST_END(device, sid, "signal_state", "Memory already offered."); return; } ri++; @@ -532,6 +534,7 @@ void on_signal_callback(uv_signal_t* handle, int signum) } } stats.updateStats({(int)ProcessingStatsId::TOTAL_SIGUSR1, DataProcessingStats::Op::Add, 1}); + O2_SIGNPOST_END(device, sid, "signal_state", "Done processing signals."); } static auto toBeForwardedHeader = [](void* header) -> bool {