@@ -86,6 +86,8 @@ struct formatter<o2::framework::CompletionPolicy::CompletionOp> : ostream_format
8686
8787// A log to use for general device logging
8888O2_DECLARE_DYNAMIC_LOG (device);
89+ // A log to use for general device logging
90+ O2_DECLARE_DYNAMIC_LOG (sockets);
8991// Special log to keep track of the lifetime of the parts
9092O2_DECLARE_DYNAMIC_LOG (parts);
9193// Stream which keeps track of the calibration lifetime logic
@@ -339,21 +341,21 @@ void on_socket_polled(uv_poll_t* poller, int status, int events)
339341{
340342 auto * context = (PollerContext*)poller->data ;
341343 assert (context);
342- O2_SIGNPOST_ID_FROM_POINTER (sid, device , poller);
344+ O2_SIGNPOST_ID_FROM_POINTER (sid, sockets , poller);
343345 context->state ->loopReason |= DeviceState::DATA_SOCKET_POLLED;
344346 switch (events) {
345347 case UV_READABLE: {
346- O2_SIGNPOST_EVENT_EMIT (device , sid, " socket_state" , " Data pending on socket for channel %{public}s" , context->name );
348+ O2_SIGNPOST_EVENT_EMIT (sockets , sid, " socket_state" , " Data pending on socket for channel %{public}s" , context->name );
347349 context->state ->loopReason |= DeviceState::DATA_INCOMING;
348350 } break ;
349351 case UV_WRITABLE: {
350- O2_SIGNPOST_END (device , sid, " socket_state" , " Socket connected for channel %{public}s" , context->name );
352+ O2_SIGNPOST_END (sockets , sid, " socket_state" , " Socket connected for channel %{public}s" , context->name );
351353 if (context->read ) {
352- O2_SIGNPOST_START (device , sid, " socket_state" , " Socket connected for read in context %{public}s" , context->name );
354+ O2_SIGNPOST_START (sockets , sid, " socket_state" , " Socket connected for read in context %{public}s" , context->name );
353355 uv_poll_start (poller, UV_READABLE | UV_DISCONNECT | UV_PRIORITIZED, &on_socket_polled);
354356 context->state ->loopReason |= DeviceState::DATA_CONNECTED;
355357 } else {
356- O2_SIGNPOST_START (device , sid, " socket_state" , " Socket connected for write for channel %{public}s" , context->name );
358+ O2_SIGNPOST_START (sockets , sid, " socket_state" , " Socket connected for write for channel %{public}s" , context->name );
357359 context->state ->loopReason |= DeviceState::DATA_OUTGOING;
358360 // If the socket is writable, fairmq will handle the rest, so we can stop polling and
359361 // just wait for the disconnect.
@@ -362,18 +364,18 @@ void on_socket_polled(uv_poll_t* poller, int status, int events)
362364 context->pollerState = PollerContext::PollerState::Connected;
363365 } break ;
364366 case UV_DISCONNECT: {
365- O2_SIGNPOST_END (device , sid, " socket_state" , " Socket disconnected in context %{public}s" , context->name );
367+ O2_SIGNPOST_END (sockets , sid, " socket_state" , " Socket disconnected in context %{public}s" , context->name );
366368 } break ;
367369 case UV_PRIORITIZED: {
368- O2_SIGNPOST_EVENT_EMIT (device , sid, " socket_state" , " Socket prioritized for context %{public}s" , context->name );
370+ O2_SIGNPOST_EVENT_EMIT (sockets , sid, " socket_state" , " Socket prioritized for context %{public}s" , context->name );
369371 } break ;
370372 }
371373 // We do nothing, all the logic for now stays in DataProcessingDevice::doRun()
372374}
373375
374376void on_out_of_band_polled (uv_poll_t * poller, int status, int events)
375377{
376- O2_SIGNPOST_ID_FROM_POINTER (sid, device , poller);
378+ O2_SIGNPOST_ID_FROM_POINTER (sid, sockets , poller);
377379 auto * context = (PollerContext*)poller->data ;
378380 context->state ->loopReason |= DeviceState::OOB_ACTIVITY;
379381 if (status < 0 ) {
@@ -382,27 +384,27 @@ void on_out_of_band_polled(uv_poll_t* poller, int status, int events)
382384 }
383385 switch (events) {
384386 case UV_READABLE: {
385- O2_SIGNPOST_EVENT_EMIT (device , sid, " socket_state" , " Data pending on socket for channel %{public}s" , context->name );
387+ O2_SIGNPOST_EVENT_EMIT (sockets , sid, " socket_state" , " Data pending on socket for channel %{public}s" , context->name );
386388 context->state ->loopReason |= DeviceState::DATA_INCOMING;
387389 assert (context->channelInfo );
388390 context->channelInfo ->readPolled = true ;
389391 } break ;
390392 case UV_WRITABLE: {
391- O2_SIGNPOST_END (device , sid, " socket_state" , " OOB socket connected for channel %{public}s" , context->name );
393+ O2_SIGNPOST_END (sockets , sid, " socket_state" , " OOB socket connected for channel %{public}s" , context->name );
392394 if (context->read ) {
393- O2_SIGNPOST_START (device , sid, " socket_state" , " OOB socket connected for read in context %{public}s" , context->name );
395+ O2_SIGNPOST_START (sockets , sid, " socket_state" , " OOB socket connected for read in context %{public}s" , context->name );
394396 uv_poll_start (poller, UV_READABLE | UV_DISCONNECT | UV_PRIORITIZED, &on_out_of_band_polled);
395397 } else {
396- O2_SIGNPOST_START (device , sid, " socket_state" , " OOB socket connected for write for channel %{public}s" , context->name );
398+ O2_SIGNPOST_START (sockets , sid, " socket_state" , " OOB socket connected for write for channel %{public}s" , context->name );
397399 context->state ->loopReason |= DeviceState::DATA_OUTGOING;
398400 }
399401 } break ;
400402 case UV_DISCONNECT: {
401- O2_SIGNPOST_END (device , sid, " socket_state" , " OOB socket disconnected in context %{public}s" , context->name );
403+ O2_SIGNPOST_END (sockets , sid, " socket_state" , " OOB socket disconnected in context %{public}s" , context->name );
402404 uv_poll_start (poller, UV_WRITABLE, &on_out_of_band_polled);
403405 } break ;
404406 case UV_PRIORITIZED: {
405- O2_SIGNPOST_EVENT_EMIT (device , sid, " socket_state" , " OOB socket prioritized for context %{public}s" , context->name );
407+ O2_SIGNPOST_EVENT_EMIT (sockets , sid, " socket_state" , " OOB socket prioritized for context %{public}s" , context->name );
406408 } break ;
407409 }
408410 // We do nothing, all the logic for now stays in DataProcessingDevice::doRun()
0 commit comments