Skip to content

Commit 23f2ff7

Browse files
authored
DPL: use signposts to debug data creation (#12556)
1 parent 0f8acf9 commit 23f2ff7

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

Framework/Core/src/CommonServices.cxx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,17 @@ o2::framework::ServiceSpec CommonServices::streamContextSpec()
185185
// if we did not, but we still have didDispatched set to true
186186
// it means it was created out of band.
187187
bool didCreate = false;
188+
O2_SIGNPOST_ID_FROM_POINTER(cid, stream_context, service);
188189
for (size_t ri = 0; ri < routes.size(); ++ri) {
189190
if (stream->routeUserCreated[ri] == true) {
190191
didCreate = true;
191192
break;
192193
}
193194
}
194195
if (didCreate == false && messageContext.didDispatch() == true) {
195-
O2_SIGNPOST_ID_FROM_POINTER(cid, stream_context, service);
196-
O2_SIGNPOST_EVENT_EMIT(stream_context, cid, "postProcessingCallbacks", "Data created out of band");
197-
LOGP(debug, "Data created out of band");
196+
O2_SIGNPOST_EVENT_EMIT(stream_context, cid, "postProcessingCallbacks", "Data created out of band didCreate == %b && messageContext.didDispatch == %b",
197+
didCreate,
198+
messageContext.didDispatch());
198199
return;
199200
}
200201
if (didCreate == false && messageContext.didDispatch() == false) {
@@ -203,18 +204,23 @@ o2::framework::ServiceSpec CommonServices::streamContextSpec()
203204
return;
204205
}
205206
for (size_t ri = 0; ri < routes.size(); ++ri) {
207+
auto &route = routes[ri];
208+
auto &matcher = route.matcher;
206209
if (stream->routeUserCreated[ri] == true) {
210+
O2_SIGNPOST_EVENT_EMIT(stream_context, cid, "postProcessingCallbacks", "Data created by user. ri = %" PRIu64 ", %{public}s",
211+
(uint64_t)ri, DataSpecUtils::describe(matcher).c_str());
207212
continue;
208213
}
209-
auto &route = routes[ri];
210-
auto &matcher = route.matcher;
211214
if ((timeslice % route.maxTimeslices) != route.timeslice) {
215+
O2_SIGNPOST_EVENT_EMIT(stream_context, cid, "postProcessingCallbacks", "Route ri = %" PRIu64 ", skipped",
216+
(uint64_t)ri);
212217
continue;
213218
}
214219
if (matcher.lifetime == Lifetime::Timeframe) {
215220
LOGP(error, "Expected Lifetime::Timeframe data {} was not created for timeslice {} and might result in dropped timeframes", DataSpecUtils::describe(matcher), timeslice);
216221
}
217-
} },
222+
}
223+
},
218224
.kind = ServiceKind::Stream};
219225
}
220226

@@ -515,10 +521,11 @@ o2::framework::ServiceSpec CommonServices::decongestionSpec()
515521
},
516522
.postForwarding = [](ProcessingContext& ctx, void* service) {
517523
auto* decongestion = reinterpret_cast<DecongestionService*>(service);
518-
if (decongestion->isFirstInTopology == false) {
519-
LOGP(debug, "We are not the first in the topology, do not update the oldest possible timeslice");
524+
if (O2_BUILTIN_LIKELY(decongestion->isFirstInTopology == false)) {
520525
return;
521526
}
527+
O2_SIGNPOST_ID_FROM_POINTER(cid, data_processor_context, service);
528+
O2_SIGNPOST_EVENT_EMIT(data_processor_context, cid, "postForwardingCallbacks", "We are the first one in the topology, we need to update the oldest possible timeslice");
522529
auto& timesliceIndex = ctx.services().get<TimesliceIndex>();
523530
auto& relayer = ctx.services().get<DataRelayer>();
524531
timesliceIndex.updateOldestPossibleOutput();

0 commit comments

Comments
 (0)