Skip to content

Commit 7f0abfb

Browse files
authored
DPL: improve instrumentation for the preProcessingCallbacks (#13104)
1 parent 67e9df4 commit 7f0abfb

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Framework/Core/src/DataProcessingDevice.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2321,6 +2321,7 @@ bool DataProcessingDevice::tryDispatchComputation(ServiceRegistryRef ref, std::v
23212321
*context.registry};
23222322
ProcessingContext processContext{record, ref, ref.get<DataAllocator>()};
23232323
{
2324+
O2_SIGNPOST_EVENT_EMIT(device, aid, "device", "Invoking preProcessingCallbacks");
23242325
// Notice this should be thread safe and reentrant
23252326
// as it is called from many threads.
23262327
streamContext.preProcessingCallbacks(processContext);

Framework/Core/src/StreamContext.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ void StreamContext::preStartStreamCallbacks(ServiceRegistryRef ref)
3131
/// Invoke callbacks to be executed before every process method invokation
3232
void StreamContext::preProcessingCallbacks(ProcessingContext& pcx)
3333
{
34+
O2_SIGNPOST_ID_FROM_POINTER(dpid, stream_context, &pcx);
35+
O2_SIGNPOST_START(stream_context, dpid, "callbacks", "Starting StreamContext preProcessingCallbacks");
3436
for (auto& handle : preProcessingHandles) {
35-
LOG(debug) << "Invoking preProcessingCallbacks for" << handle.service;
37+
O2_SIGNPOST_ID_FROM_POINTER(cid, stream_context, handle.service);
38+
O2_SIGNPOST_START(stream_context, cid, "callbacks", "Starting StreamContext::preProcessingCallbacks for service %{public}s", handle.spec.name.c_str());
3639
assert(handle.service);
3740
assert(handle.callback);
3841
handle.callback(pcx, handle.service);
42+
O2_SIGNPOST_END(stream_context, cid, "callbacks", "Ending StreamContext::preProcessingCallbacks for service %{public}s", handle.spec.name.c_str());
3943
}
44+
O2_SIGNPOST_END(stream_context, dpid, "callbacks", "Ending StreamContext preProcessingCallbacks");
4045
}
4146

4247
/// Invoke callbacks to be executed after every process method invokation

0 commit comments

Comments
 (0)